Nektar++
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Nektar::LibUtilities Namespace Reference

Namespaces

 CompressData
 
 H5
 
 StdHexData
 
 StdPrismData
 
 StdPyrData
 
 StdQuadData
 
 StdSegData
 
 StdTetData
 
 StdTriData
 

Classes

class  Basis
 Represents a basis of a given type. More...
 
class  BasisKey
 Describes the specification for a Basis. More...
 
class  BLPoints
 
struct  CmdLineArg
 
class  Comm
 Base communications class. More...
 
class  CommCwipi
 A global linear system. More...
 
class  CommDataTypeTraits
 
class  CommDataTypeTraits< Array< OneD, elemT > >
 
class  CommDataTypeTraits< std::vector< elemT > >
 
class  CommMpi
 A global linear system. More...
 
class  CommSerial
 A global linear system. More...
 
class  CsvIO
 
class  DataSource
 
struct  defOpLessCreator
 
class  Equation
 
struct  FieldDefinitions
 Metadata that describes the storage properties of field output. More...
 
class  FieldIO
 Class for operating on Nektar++ input/output files. More...
 
class  FieldIOHdf5
 
class  FieldIOXml
 
class  FourierPoints
 
class  FourierSingleModePoints
 
struct  func
 
struct  functions
 
struct  FunctionVariableDefinition
 
class  GaussPoints
 
class  GitConsts
 
class  Graph
 
class  GraphEdgeObject
 
class  GraphVertexObject
 
class  H5DataSource
 
class  H5TagWriter
 
class  Interpolator
 A class that contains algorithms for interpolation between pts fields, expansions and different meshes. More...
 
class  Interpreter
 Interpreter class for the evaluation of mathematical expressions. More...
 
class  Kernel
 
class  NekFactory
 Provides a generic Factory class. More...
 
class  NekFFTW
 
class  NekManager
 
class  NektarFFT
 
class  NodalHexElec
 
class  NodalPrismElec
 
class  NodalPrismEvenlySpaced
 
class  NodalPrismSPI
 
class  NodalQuadElec
 
class  NodalTetElec
 
class  NodalTetEvenlySpaced
 
class  NodalTetSPI
 
class  NodalTriElec
 
class  NodalTriEvenlySpaced
 
class  NodalTriFekete
 
class  NodalTriSPI
 
class  NodalUtil
 A class to assist in the construction of nodal simplex and hybrid elements in two and three dimensions. More...
 
class  NodalUtilHex
 Specialisation of the NodalUtil class to support nodal hex elements. More...
 
class  NodalUtilPrism
 Specialisation of the NodalUtil class to support nodal prismatic elements. More...
 
class  NodalUtilQuad
 Specialisation of the NodalUtil class to support nodal quad elements. More...
 
class  NodalUtilTetrahedron
 Specialisation of the NodalUtil class to support nodal tetrahedral elements. More...
 
class  NodalUtilTriangle
 Specialisation of the NodalUtil class to support nodal triangular elements. More...
 
class  Points
 Stores a set of points of datatype DataT, defined by a PointKey. More...
 
class  PointsKey
 Defines a specification for a set of points. More...
 
class  PolyEPoints
 
class  PtsField
 
class  PtsIO
 
class  SessionReader
 Reads and parses information from a Nektar++ XML session file. More...
 
class  TagWriter
 Base class for writing hierarchical data (XML or HDF5). More...
 
class  TimeIntegrationAdamsBashforthOrder2
 
class  TimeIntegrationAdamsBashforthOrder3
 
class  TimeIntegrationAdamsBashforthOrder4
 
class  TimeIntegrationAdamsMoultonOrder2
 
class  TimeIntegrationBackwardEuler
 
class  TimeIntegrationBDFImplicitOrder1
 
class  TimeIntegrationBDFImplicitOrder2
 
class  TimeIntegrationClassicalRungeKutta4
 
class  TimeIntegrationCNAB
 
class  TimeIntegrationDIRKOrder2
 
class  TimeIntegrationDIRKOrder3
 
class  TimeIntegrationForwardEuler
 
class  TimeIntegrationIMEXdirk_1_1_1
 
class  TimeIntegrationIMEXdirk_1_2_1
 
class  TimeIntegrationIMEXdirk_1_2_2
 
class  TimeIntegrationIMEXdirk_2_2_2
 
class  TimeIntegrationIMEXdirk_2_3_2
 
class  TimeIntegrationIMEXdirk_2_3_3
 
class  TimeIntegrationIMEXdirk_3_4_3
 
class  TimeIntegrationIMEXdirk_4_4_3
 
class  TimeIntegrationIMEXGear
 
class  TimeIntegrationIMEXOrder1
 
class  TimeIntegrationIMEXOrder2
 
class  TimeIntegrationIMEXOrder3
 
class  TimeIntegrationIMEXOrder4
 
class  TimeIntegrationMCNAB
 
class  TimeIntegrationMidpoint
 
class  TimeIntegrationRungeKutta2
 
class  TimeIntegrationRungeKutta2_ImprovedEuler
 
class  TimeIntegrationRungeKutta2_SSP
 
class  TimeIntegrationRungeKutta3_SSP
 
class  TimeIntegrationRungeKutta4
 
class  TimeIntegrationRungeKutta5
 
class  TimeIntegrationScheme
 
class  TimeIntegrationSchemeKey
 
class  TimeIntegrationSchemeOperators
 
class  TimeIntegrationSolution
 
class  TimeIntegrationWrapper
 
class  Timer
 
class  Transposition
 
class  XmlDataSource
 
class  XmlTagWriter
 

Typedefs

typedef std::shared_ptr< CsvIOCsvIOSharedPtr
 
typedef std::shared_ptr< EquationEquationSharedPtr
 
typedef std::map< std::string, std::string > FieldMetaDataMap
 
typedef std::shared_ptr< TagWriterTagWriterSharedPtr
 
typedef std::shared_ptr< DataSourceDataSourceSharedPtr
 
typedef std::shared_ptr< FieldDefinitionsFieldDefinitionsSharedPtr
 
typedef LibUtilities::NekFactory< std::string, FieldIO, LibUtilities::CommSharedPtr, bool > FieldIOFactory
 Datatype of the NekFactory used to instantiate classes. More...
 
typedef std::shared_ptr< FieldIOFieldIOSharedPtr
 
typedef std::shared_ptr< H5DataSourceH5DataSourceSharedPtr
 
typedef std::shared_ptr< H5TagWriterH5TagWriterSharedPtr
 
typedef std::shared_ptr< XmlDataSourceXmlDataSourceSharedPtr
 
typedef std::shared_ptr< XmlTagWriterXmlTagWriterSharedPtr
 
typedef std::shared_ptr< InterpolatorInterpolatorSharedPtr
 
typedef std::shared_ptr< PtsFieldPtsFieldSharedPtr
 
typedef std::map< std::string, std::string > PtsMetaDataMap
 
typedef std::shared_ptr< PtsIOPtsIOSharedPtr
 
typedef std::map< std::string, std::string > SolverInfoMap
 
typedef std::map< std::string, NekDoubleParameterMap
 
typedef std::map< std::string, std::string > GeometricInfoMap
 
typedef std::map< std::string, std::string > ExpressionMap
 
typedef std::vector< std::string > VariableList
 
typedef std::map< std::string, std::string > TagMap
 
typedef std::map< std::string, std::string > FilterParams
 
typedef std::vector< std::pair< std::string, FilterParams > > FilterMap
 
typedef std::map< std::string, CmdLineArgCmdLineArgMap
 
typedef std::map< std::string, int > EnumMap
 
typedef std::map< std::string, EnumMapEnumMapList
 
typedef std::map< std::string, std::string > GloSysInfoMap
 
typedef std::map< std::string, GloSysInfoMapGloSysSolnInfoList
 
typedef std::map< std::pair< std::string, int >, FunctionVariableDefinitionFunctionVariableMap
 
typedef std::map< std::string, FunctionVariableMapFunctionMap
 
typedef std::shared_ptr< SessionReaderSessionReaderSharedPtr
 
typedef std::shared_ptr< CommCommSharedPtr
 Pointer to a Communicator object. More...
 
typedef LibUtilities::NekFactory< std::string, Comm, int, char ** > CommFactory
 Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class. More...
 
typedef std::shared_ptr< CommCwipiCommCwipiSharedPtr
 Pointer to a Communicator object. More...
 
typedef std::shared_ptr< CommMpiCommMpiSharedPtr
 Pointer to a Communicator object. More...
 
typedef std::shared_ptr< CommSerialCommSerialSharedPtr
 Pointer to a Communicator object. More...
 
typedef std::shared_ptr< TranspositionTranspositionSharedPtr
 
typedef std::shared_ptr< NekFFTWNekFFTWSharedPtr
 
typedef std::shared_ptr< NektarFFTNektarFFTSharedPtr
 
typedef LibUtilities::NekFactory< std::string, NektarFFT, int > NektarFFTFactory
 Datatype of the NekFactory used to instantiate classes derived from the NektarFFT class. More...
 
typedef std::vector< BasisKeyBasisKeyVector
 Name for a vector of BasisKeys. More...
 
typedef std::shared_ptr< BasisBasisSharedPtr
 
typedef std::vector< BasisSharedPtrBasisVector
 
typedef Points< NekDoublePointsBaseType
 
typedef std::shared_ptr< Points< NekDouble > > PointsSharedPtr
 
typedef int GraphVertexID
 
typedef NekManager< PointsKey, Points< NekDouble >, PointsKey::opLessPointsManagerT
 
typedef NekManager< BasisKey, Basis, BasisKey::opLessBasisManagerT
 
typedef std::shared_ptr< NekMatrix< NekDouble > > SharedMatrix
 
typedef std::vector< PointsKeyPointsKeyVector
 
typedef NekDouble(* PFD) ()
 
typedef NekDouble(* PFD1) (NekDouble)
 
typedef NekDouble(* PFD2) (NekDouble, NekDouble)
 
typedef NekDouble(* PFD3) (NekDouble, NekDouble, NekDouble)
 
typedef NekDouble(* PFD4) (NekDouble, NekDouble, NekDouble, NekDouble)
 
typedef std::shared_ptr< InterpreterInterpreterSharedPtr
 
typedef std::shared_ptr< KernelKernelSharedPtr
 
typedef std::shared_ptr< TimeIntegrationSchemeTimeIntegrationSchemeSharedPtr
 
typedef std::vector< TimeIntegrationSchemeSharedPtrTimeIntegrationSchemeVector
 
typedef std::vector< TimeIntegrationSchemeSharedPtr >::iterator TimeIntegrationSchemeVectorIter
 
typedef std::shared_ptr< TimeIntegrationSolutionTimeIntegrationSolutionSharedPtr
 
typedef std::vector< TimeIntegrationSolutionSharedPtrTimeIntegrationSolutionVector
 
typedef std::vector< TimeIntegrationSolutionSharedPtr >::iterator TimeIntegrationSolutionVectorIter
 
typedef NekManager< TimeIntegrationSchemeKey, TimeIntegrationScheme, TimeIntegrationSchemeKey::opLessTimeIntegrationSchemeManagerT
 
typedef NekFactory< std::string, TimeIntegrationWrapperTimeIntegrationWrapperFactory
 Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class. More...
 
typedef std::shared_ptr< TimeIntegrationWrapperTimeIntegrationWrapperSharedPtr
 
typedef std::shared_ptr< TimeIntegrationIMEXOrder1TimeIntegrationIMEXOrder1SharedPtr
 

Enumerations

enum  EndianType {
  eEndianUnknown, eEndianBig, eEndianLittle, eEndianBigWord,
  eEndianLittleWord
}
 
enum  FieldIOType { eXML, eHDF5 }
 Enumerator for auto-detection of FieldIO types. More...
 
enum  InterpMethod {
  eNoMethod, eNearestNeighbour, eQuadratic, eShepard,
  eGauss
}
 
enum  PtsType {
  ePtsFile, ePtsLine, ePtsPlane, ePtsBox,
  ePtsSegBlock, ePtsTriBlock, ePtsTetBlock
}
 
enum  PtsInfo { eIsEquiSpacedData, ePtsPerElmtEdge }
 
enum  FunctionType { eFunctionTypeExpression, eFunctionTypeFile, eFunctionTypeTransientFile, eSIZE_FunctionType }
 
enum  ShapeType {
  eNoShapeType, ePoint, eSegment, eTriangle,
  eQuadrilateral, eTetrahedron, ePyramid, ePrism,
  eHexahedron, SIZE_ShapeType
}
 
enum  ReduceOperator { ReduceSum, ReduceMax, ReduceMin, SIZE_ReduceOperator }
 Type of operation to perform in AllReduce. More...
 
enum  CommDataType {
  MPI_CHAR, MPI_INT, MPI_UNSIGNED, MPI_LONG,
  MPI_UNSIGNED_LONG, MPI_LONG_LONG, MPI_UNSIGNED_LONG_LONG, MPI_FLOAT,
  MPI_DOUBLE, MPI_LONG_DOUBLE
}
 
enum  TranspositionDir {
  eXYtoZ, eZtoXY, eXtoYZ, eYZtoX,
  eYZtoZY, eZYtoYZ, eXtoY, eYtoZ,
  eZtoX, eNoTrans
}
 
enum  BasisType {
  eNoBasisType, eOrtho_A, eOrtho_B, eOrtho_C,
  eModified_A, eModified_B, eModified_C, eOrthoPyr_C,
  eModifiedPyr_C, eFourier, eGLL_Lagrange, eGauss_Lagrange,
  eLegendre, eChebyshev, eMonomial, eFourierSingleMode,
  eFourierHalfModeRe, eFourierHalfModeIm, SIZE_BasisType
}
 
enum  PointsType {
  eNoPointsType, eGaussGaussLegendre, eGaussRadauMLegendre, eGaussRadauPLegendre,
  eGaussLobattoLegendre, eGaussGaussChebyshev, eGaussRadauMChebyshev, eGaussRadauPChebyshev,
  eGaussLobattoChebyshev, eGaussRadauMAlpha0Beta1, eGaussRadauMAlpha0Beta2, eGaussRadauMAlpha1Beta0,
  eGaussRadauMAlpha2Beta0, eGaussKronrodLegendre, eGaussRadauKronrodMLegendre, eGaussRadauKronrodMAlpha1Beta0,
  eGaussLobattoKronrodLegendre, ePolyEvenlySpaced, eFourierEvenlySpaced, eFourierSingleModeSpaced,
  eBoundaryLayerPoints, eBoundaryLayerPointsRev, eNodalTriElec, eNodalTriFekete,
  eNodalTriEvenlySpaced, eNodalTetEvenlySpaced, eNodalTetElec, eNodalPrismEvenlySpaced,
  eNodalPrismElec, eNodalTriSPI, eNodalTetSPI, eNodalPrismSPI,
  eNodalQuadElec, eNodalHexElec, SIZE_PointsType
}
 
enum  TimeIntegrationMethod {
  eNoTimeIntegrationMethod, eAdamsBashforthOrder1, eAdamsBashforthOrder2, eAdamsBashforthOrder3,
  eAdamsBashforthOrder4, eAdamsMoultonOrder1, eAdamsMoultonOrder2, eBDFImplicitOrder1,
  eBDFImplicitOrder2, eClassicalRungeKutta4, eRungeKutta4, eRungeKutta5,
  eRungeKutta3_SSP, eRungeKutta2_ImprovedEuler, eRungeKutta2_SSP, eForwardEuler,
  eBackwardEuler, eIMEXOrder1, eIMEXOrder2, eIMEXOrder3,
  eIMEXOrder4, eMidpoint, eRungeKutta2, eDIRKOrder2,
  eDIRKOrder3, eCNAB, eIMEXGear, eMCNAB,
  eIMEXdirk_1_1_1, eIMEXdirk_1_2_1, eIMEXdirk_1_2_2, eIMEXdirk_2_2_2,
  eIMEXdirk_2_3_2, eIMEXdirk_2_3_3, eIMEXdirk_3_4_3, eIMEXdirk_4_4_3,
  SIZE_TimeIntegrationMethod
}
 
enum  TimeIntegrationSchemeType {
  eNoTimeIntegrationSchemeType, eExplicit, eDiagonallyImplicit, eIMEX,
  eImplicit
}
 

Functions

template<class To , class Ti , class = typename std::enable_if < std::is_floating_point<typename std::remove_reference<Ti>::type>::value && std::is_integral <typename std::remove_reference<To>::type>::value >::type>
To checked_cast (const Ti param)
 checked cast from float types only to int types More...
 
EndianType Endianness (void)
 
FieldIOFactoryGetFieldIOFactory ()
 Returns the FieldIO factory. More...
 
void Write (const std::string &outFile, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, const FieldMetaDataMap &fieldinfomap, const bool backup)
 This function allows for data to be written to an FLD file when a session and/or communicator is not instantiated. Typically used in utilities which do not take XML input and operate in serial only. More...
 
void Import (const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, FieldMetaDataMap &fieldinfomap, const Array< OneD, int > &ElementIDs)
 This function allows for data to be imported from an FLD file when a session and/or communicator is not instantiated. Typically used in utilities which only operate in serial. More...
 
std::string PortablePath (const boost::filesystem::path &path)
 create portable path on different platforms for boost::filesystem path More...
 
int PrintProgressbar (const int position, const int goal, const std::string message, int lastprogress=-1)
 Prints a progressbar. More...
 
int GetNumberOfCoefficients (ShapeType shape, std::vector< unsigned int > &modes, int offset)
 
int GetNumberOfCoefficients (ShapeType shape, int na, int nb, int nc)
 
CommFactoryGetCommFactory ()
 
int CommDataTypeGetSize (CommDataType dt)
 Return the size in bytes of a data type dt. More...
 
NektarFFTFactoryGetNektarFFTFactory ()
 
bool operator< (const BasisKey &lhs, const BasisKey &rhs)
 
bool operator> (const BasisKey &lhs, const BasisKey &rhs)
 
std::ostream & operator<< (std::ostream &os, const BasisKey &rhs)
 
bool operator== (const BasisKey &x, const BasisKey &y)
 
bool operator== (const BasisKey *x, const BasisKey &y)
 
bool operator== (const BasisKey &x, const BasisKey *y)
 
bool operator!= (const BasisKey &x, const BasisKey &y)
 
bool operator!= (const BasisKey *x, const BasisKey &y)
 
bool operator!= (const BasisKey &x, const BasisKey *y)
 
static const BasisKey NullBasisKey (eNoBasisType, 0, NullPointsKey)
 Defines a null basis with no type or points. More...
 
bool operator== (const GraphVertexObject &x, const GraphVertexObject &y)
 
bool operator!= (const GraphVertexObject &x, const GraphVertexObject &y)
 
void Interp1D (const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
 this function interpolates a 1D function \(f\) evaluated at the quadrature points of the basis fbasis0 to the function values at the quadrature points of the basis tbasis0 More...
 
void Interp1D (const PointsKey &fpoints0, const Array< OneD, const NekDouble > &from, const PointsKey &tpoints0, Array< OneD, NekDouble > &to)
 
void Interp1D (const BasisKey &fbasis0, const NekDouble *from, const BasisKey &tbasis0, NekDouble *to)
 
void Interp1D (const PointsKey &fpoints0, const NekDouble *from, const PointsKey &tpoints0, NekDouble *to)
 
void Interp2D (const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
 this function interpolates a 2D function \(f\) evaluated at the quadrature points of the 2D basis, constructed by fbasis0 and fbasis1, to the function values at the quadrature points of the 2D basis, constructed by tbasis0 and tbasis1 More...
 
void Interp2D (const PointsKey &fpoints0, const PointsKey &fpoints1, const Array< OneD, const NekDouble > &from, const PointsKey &tpoints0, const PointsKey &tpoints1, Array< OneD, NekDouble > &to)
 
void Interp2D (const PointsKey &fpoints0, const PointsKey &fpoints1, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, NekDouble *to)
 
void Interp3D (const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, Array< OneD, NekDouble > &to)
 this function interpolates a 3D function \(f\) evaluated at the quadrature points of the 3D basis, constructed by fbasis0, fbasis1, and fbasis2 to the function values at the quadrature points of the 3D basis, constructed by tbasis0, tbasis1, and tbasis2. More...
 
void Interp3D (const PointsKey &fpoints0, const PointsKey &fpoints1, const PointsKey &fpoints2, const Array< OneD, const NekDouble > &from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, Array< OneD, NekDouble > &to)
 
void Interp3D (const PointsKey &fpoints0, const PointsKey &fpoints1, const PointsKey &fpoints2, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, NekDouble *to)
 
void InterpCoeff1D (const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
 
void InterpCoeff2D (const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
 
void InterpCoeff2D (const BasisKey &fbasis0, const BasisKey &fbasis1, const NekDouble *from, const BasisKey &tbasis0, const BasisKey &tbasis1, NekDouble *to)
 
void InterpCoeff3D (const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, Array< OneD, NekDouble > &to)
 
void InterpCoeff3D (const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const NekDouble *from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, NekDouble *to)
 
PointsManagerTPointsManager (void)
 
BasisManagerTBasisManager (void)
 
void PhysGalerkinProject1D (const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
 
void PhysGalerkinProject1D (const PointsKey &fpoints0, const Array< OneD, const NekDouble > &from, const PointsKey &tpoints0, Array< OneD, NekDouble > &to)
 
void PhysGalerkinProject1D (const BasisKey &fbasis0, const NekDouble *from, const BasisKey &tbasis0, NekDouble *to)
 
void PhysGalerkinProject1D (const PointsKey &fpoints0, const NekDouble *from, const PointsKey &tpoints0, NekDouble *to)
 
void PhysGalerkinProject2D (const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
 
void PhysGalerkinProject2D (const PointsKey &fpoints0, const PointsKey &fpoints1, const Array< OneD, const NekDouble > &from, const PointsKey &tpoints0, const PointsKey &tpoints1, Array< OneD, NekDouble > &to)
 
void PhysGalerkinProject2D (const PointsKey &fpoints0, const PointsKey &fpoints1, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, NekDouble *to)
 
void PhysGalerkinProject3D (const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, Array< OneD, NekDouble > &to)
 
void PhysGalerkinProject3D (const PointsKey &fpoints0, const PointsKey &fpoints1, const PointsKey &fpoints2, const Array< OneD, const NekDouble > &from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, Array< OneD, NekDouble > &to)
 
void PhysGalerkinProject3D (const PointsKey &fpoints0, const PointsKey &fpoints1, const PointsKey &fpoints2, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, NekDouble *to)
 
bool operator== (const PointsKey &lhs, const PointsKey &rhs)
 
bool operator< (const PointsKey &lhs, const PointsKey &rhs)
 
std::ostream & operator<< (std::ostream &os, const PointsKey &rhs)
 
static const PointsKey NullPointsKey (0, eNoPointsType)
 
NekDouble sign (NekDouble arg)
 
NekDouble awgn (NekDouble sigma)
 
static NekDouble rad (NekDouble x, NekDouble y)
 
static NekDouble ang (NekDouble x, NekDouble y)
 
TimeIntegrationSchemeManagerTTimeIntegrationSchemeManager (void)
 
bool operator== (const TimeIntegrationSchemeKey &lhs, const TimeIntegrationSchemeKey &rhs)
 
bool operator< (const TimeIntegrationSchemeKey &lhs, const TimeIntegrationSchemeKey &rhs)
 
std::ostream & operator<< (std::ostream &os, const TimeIntegrationSchemeKey &rhs)
 
std::ostream & operator<< (std::ostream &os, const TimeIntegrationSchemeSharedPtr &rhs)
 
std::ostream & operator<< (std::ostream &os, const TimeIntegrationScheme &rhs)
 
static const TimeIntegrationSchemeKey NullTimeIntegrationSchemeKey (eNoTimeIntegrationMethod)
 
TimeIntegrationWrapperFactoryGetTimeIntegrationWrapperFactory ()
 

Variables

const std::string EndianTypeMap []
 
std::string fldCmdFormat
 
static FieldMetaDataMap NullFieldMetaDataMap
 
static std::map< PtsInfo, int > NullPtsInfoMap
 
static PtsFieldSharedPtr NullPtsField
 
static PtsMetaDataMap NullPtsMetaDataMap
 
const char *const FunctionTypeMap []
 
const char *const ShapeTypeMap []
 
const unsigned int ShapeTypeDimMap [SIZE_ShapeType]
 
static std::vector< NekDoubleNullNekDoubleVector
 
static std::vector< unsigned int > NullUnsignedIntVector
 
static std::vector< std::vector< NekDouble > > NullVectorNekDoubleVector = { NullNekDoubleVector }
 
const char *const ReduceOperatorMap []
 
static BasisSharedPtr NullBasisSharedPtr
 
static Array< OneD, BasisSharedPtrNullBasisSharedPtr1DArray
 
const char *const BasisTypeMap []
 
const std::string kPointsTypeStr []
 
static const unsigned int perm4_3d [4][4] = {{0,1,2,3},{3,0,1,2},{2,3,0,1},{1,2,3,0}}
 
static const unsigned int perm6_3d [6][4] = {{0,1,2,3},{0,2,1,3},{0,2,3,1},{2,0,1,3},{2,0,3,1},{2,3,0,1}}
 
static const unsigned int perm12A_3d [12][4]
 
static const unsigned int perm12B_3d [12][4]
 
static const unsigned int perm12C_3d [12][4]
 
static const unsigned int perm24_3d [24][4]
 
const unsigned int NodalTetElecAvailable = 10
 
static const unsigned int NodalTetElecNPTS [NodalTetElecAvailable] = {1,2,3,5,6,9,11,15,18,23}
 
static const NekDouble NodalTetElecData [][9]
 
const unsigned int NodalTetSPIAvailable = 10
 
static const unsigned int NodalTetSPINPTS [NodalTetSPIAvailable]
 
static const NekDouble NodalTetSPIData [][4]
 
static const unsigned int perm3A_2d [3][3] = {{0,1,2},{2,0,1},{0,2,1}}
 
static const unsigned int perm3B_2d [3][3] = {{0,1,2},{1,0,2},{1,2,0}}
 
static const unsigned int perm6_2d [6][3]
 
const unsigned int NodalTriElecAvailable = 16
 
static const unsigned int NodalTriElecNPTS [NodalTriElecAvailable] = {1,2,3,4,5,7,8,10,12,14,16,19,21,24,27,30}
 
static const NekDouble NodalTriElecData [][6]
 
static const unsigned int perm3A_2d [3][3] = {{0,1,2},{2,0,1},{0,2,1}}
 
static const unsigned int perm3B_2d [3][3] = {{0,1,2},{1,0,2},{1,2,0}}
 
static const unsigned int perm3C_2d [3][3] = {{0,1,2},{2,0,1},{1,2,0}}
 
static const unsigned int perm6_2d [6][3]
 
const unsigned int NodalTriFeketeAvailable = 16
 
static const unsigned int NodalTriFeketeNPTS [NodalTriFeketeAvailable] = {1,2,3,4,5,7,8,10,12,14,16,19,21,24,27,30}
 
static const NekDouble NodalTriFeketeData [][6]
 
const unsigned int NodalTriSPIAvailable = 10
 
static const unsigned int NodalTriSPINPTS [NodalTriSPIAvailable]
 
static const NekDouble NodalTriSPIData [][3]
 
static std::vector< LibUtilities::PointsTypeNullPointsTypeVector
 
Nektar::LibUtilities::functions functions_p
 
const char *const TimeIntegrationMethodMap []
 
const char *const TimeIntegrationSchemeTypeMap []
 

Typedef Documentation

◆ BasisKeyVector

Name for a vector of BasisKeys.

Definition at line 68 of file FoundationsFwd.hpp.

◆ BasisManagerT

Definition at line 50 of file ManagerAccess.h.

◆ BasisSharedPtr

typedef std::shared_ptr<Basis> Nektar::LibUtilities::BasisSharedPtr

Definition at line 74 of file FoundationsFwd.hpp.

◆ BasisVector

Definition at line 75 of file FoundationsFwd.hpp.

◆ CmdLineArgMap

typedef std::map<std::string, CmdLineArg> Nektar::LibUtilities::CmdLineArgMap

Definition at line 74 of file SessionReader.h.

◆ CommCwipiSharedPtr

Pointer to a Communicator object.

Definition at line 49 of file CommCwipi.h.

◆ CommFactory

Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.

Definition at line 60 of file Comm.h.

◆ CommMpiSharedPtr

Pointer to a Communicator object.

Definition at line 54 of file CommMpi.h.

◆ CommSerialSharedPtr

Pointer to a Communicator object.

Definition at line 48 of file CommSerial.h.

◆ CommSharedPtr

typedef std::shared_ptr<Comm> Nektar::LibUtilities::CommSharedPtr

Pointer to a Communicator object.

Definition at line 53 of file Comm.h.

◆ CsvIOSharedPtr

typedef std::shared_ptr<CsvIO> Nektar::LibUtilities::CsvIOSharedPtr

Definition at line 81 of file CsvIO.h.

◆ DataSourceSharedPtr

Definition at line 79 of file FieldIO.h.

◆ EnumMap

typedef std::map<std::string, int> Nektar::LibUtilities::EnumMap

Definition at line 76 of file SessionReader.h.

◆ EnumMapList

typedef std::map<std::string, EnumMap> Nektar::LibUtilities::EnumMapList

Definition at line 77 of file SessionReader.h.

◆ EquationSharedPtr

Definition at line 131 of file Equation.h.

◆ ExpressionMap

typedef std::map<std::string, std::string> Nektar::LibUtilities::ExpressionMap

Definition at line 60 of file SessionReader.h.

◆ FieldDefinitionsSharedPtr

Definition at line 179 of file FieldIO.h.

◆ FieldIOFactory

Datatype of the NekFactory used to instantiate classes.

Definition at line 195 of file FieldIO.h.

◆ FieldIOSharedPtr

Definition at line 306 of file FieldIO.h.

◆ FieldMetaDataMap

typedef std::map<std::string, std::string> Nektar::LibUtilities::FieldMetaDataMap

Definition at line 52 of file FieldIO.h.

◆ FilterMap

typedef std::vector< std::pair<std::string, FilterParams> > Nektar::LibUtilities::FilterMap

Definition at line 65 of file SessionReader.h.

◆ FilterParams

typedef std::map<std::string, std::string> Nektar::LibUtilities::FilterParams

Definition at line 63 of file SessionReader.h.

◆ FunctionMap

typedef std::map<std::string, FunctionVariableMap > Nektar::LibUtilities::FunctionMap

Definition at line 110 of file SessionReader.h.

◆ FunctionVariableMap

typedef std::map<std::pair<std::string,int>, FunctionVariableDefinition> Nektar::LibUtilities::FunctionVariableMap

Definition at line 108 of file SessionReader.h.

◆ GeometricInfoMap

typedef std::map<std::string, std::string> Nektar::LibUtilities::GeometricInfoMap

Definition at line 59 of file SessionReader.h.

◆ GloSysInfoMap

typedef std::map< std::string, std::string > Nektar::LibUtilities::GloSysInfoMap

Definition at line 79 of file SessionReader.h.

◆ GloSysSolnInfoList

typedef std::map< std::string, GloSysInfoMap > Nektar::LibUtilities::GloSysSolnInfoList

Definition at line 80 of file SessionReader.h.

◆ GraphVertexID

Definition at line 79 of file FoundationsFwd.hpp.

◆ H5DataSourceSharedPtr

Definition at line 88 of file FieldIOHdf5.h.

◆ H5TagWriterSharedPtr

Definition at line 116 of file FieldIOHdf5.h.

◆ InterpolatorSharedPtr

Definition at line 222 of file LibUtilities/BasicUtils/Interpolator.h.

◆ InterpreterSharedPtr

Definition at line 325 of file Interpreter.h.

◆ KernelSharedPtr

Definition at line 214 of file kernel.h.

◆ NekFFTWSharedPtr

Definition at line 55 of file NekFFTW.h.

◆ NektarFFTFactory

Datatype of the NekFactory used to instantiate classes derived from the NektarFFT class.

Definition at line 62 of file NektarFFT.h.

◆ NektarFFTSharedPtr

Definition at line 55 of file NektarFFT.h.

◆ ParameterMap

typedef std::map<std::string, NekDouble> Nektar::LibUtilities::ParameterMap

Definition at line 58 of file SessionReader.h.

◆ PFD

typedef NekDouble(* Nektar::LibUtilities::PFD) ()

Definition at line 100 of file Interpreter.cpp.

◆ PFD1

typedef NekDouble(* Nektar::LibUtilities::PFD1) (NekDouble)

Definition at line 101 of file Interpreter.cpp.

◆ PFD2

typedef NekDouble(* Nektar::LibUtilities::PFD2) (NekDouble, NekDouble)

Definition at line 102 of file Interpreter.cpp.

◆ PFD3

typedef NekDouble(* Nektar::LibUtilities::PFD3) (NekDouble, NekDouble, NekDouble)

Definition at line 103 of file Interpreter.cpp.

◆ PFD4

typedef NekDouble(* Nektar::LibUtilities::PFD4) (NekDouble, NekDouble, NekDouble, NekDouble)

Definition at line 104 of file Interpreter.cpp.

◆ PointsBaseType

Definition at line 77 of file FoundationsFwd.hpp.

◆ PointsKeyVector

Definition at line 246 of file Points.h.

◆ PointsManagerT

Definition at line 49 of file ManagerAccess.h.

◆ PointsSharedPtr

Definition at line 78 of file FoundationsFwd.hpp.

◆ PtsFieldSharedPtr

Definition at line 179 of file PtsField.h.

◆ PtsIOSharedPtr

typedef std::shared_ptr<PtsIO> Nektar::LibUtilities::PtsIOSharedPtr

Definition at line 96 of file PtsIO.h.

◆ PtsMetaDataMap

typedef std::map<std::string, std::string> Nektar::LibUtilities::PtsMetaDataMap

Definition at line 57 of file PtsIO.h.

◆ SessionReaderSharedPtr

Definition at line 112 of file SessionReader.h.

◆ SharedMatrix

Definition at line 55 of file NodalUtil.h.

◆ SolverInfoMap

typedef std::map<std::string, std::string> Nektar::LibUtilities::SolverInfoMap

Definition at line 57 of file SessionReader.h.

◆ TagMap

typedef std::map<std::string, std::string> Nektar::LibUtilities::TagMap

Definition at line 62 of file SessionReader.h.

◆ TagWriterSharedPtr

Definition at line 69 of file FieldIO.h.

◆ TimeIntegrationIMEXOrder1SharedPtr

Definition at line 119 of file TimeIntegrationWrapper.h.

◆ TimeIntegrationSchemeManagerT

Definition at line 371 of file TimeIntegrationScheme.h.

◆ TimeIntegrationSchemeSharedPtr

Definition at line 52 of file TimeIntegrationScheme.h.

◆ TimeIntegrationSchemeVector

Definition at line 56 of file TimeIntegrationScheme.h.

◆ TimeIntegrationSchemeVectorIter

Definition at line 57 of file TimeIntegrationScheme.h.

◆ TimeIntegrationSolutionSharedPtr

Definition at line 58 of file TimeIntegrationScheme.h.

◆ TimeIntegrationSolutionVector

Definition at line 59 of file TimeIntegrationScheme.h.

◆ TimeIntegrationSolutionVectorIter

Definition at line 60 of file TimeIntegrationScheme.h.

◆ TimeIntegrationWrapperFactory

Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.

Definition at line 45 of file TimeIntegrationWrapper.h.

◆ TimeIntegrationWrapperSharedPtr

Definition at line 56 of file TimeIntegrationWrapper.h.

◆ TranspositionSharedPtr

Definition at line 165 of file Transposition.h.

◆ VariableList

typedef std::vector<std::string> Nektar::LibUtilities::VariableList

Definition at line 61 of file SessionReader.h.

◆ XmlDataSourceSharedPtr

Definition at line 109 of file FieldIOXml.h.

◆ XmlTagWriterSharedPtr

Definition at line 163 of file FieldIOXml.h.

Enumeration Type Documentation

◆ BasisType

Enumerator
eNoBasisType 
eOrtho_A 

Principle Orthogonal Functions \(\widetilde{\psi}^a_p(z_i)\).

eOrtho_B 

Principle Orthogonal Functions \(\widetilde{\psi}^b_{pq}(z_i)\).

eOrtho_C 

Principle Orthogonal Functions \(\widetilde{\psi}^c_{pqr}(z_i)\).

eModified_A 

Principle Modified Functions \( \phi^a_p(z_i) \).

eModified_B 

Principle Modified Functions \( \phi^b_{pq}(z_i) \).

eModified_C 

Principle Modified Functions \( \phi^c_{pqr}(z_i) \).

eOrthoPyr_C 

Principle Orthogonal Functions \(\widetilde{\psi}^c_{pqr}(z_i) for Pyramids\).

eModifiedPyr_C 

Principle Modified Functions \( \phi^c_{pqr}(z_i) for Pyramids\).

eFourier 

Fourier Expansion \( \exp(i p\pi z_i)\).

eGLL_Lagrange 

Lagrange for SEM basis \( h_p(z_i) \).

eGauss_Lagrange 

Lagrange Polynomials using the Gauss points \( h_p(z_i) \).

eLegendre 

Legendre Polynomials \( L_p(z_i) = P^{0,0}_p(z_i)\). Same as Ortho_A.

eChebyshev 

Chebyshev Polynomials \( T_p(z_i) = P^{-1/2,-1/2}_p(z_i)\).

eMonomial 

Monomial polynomials \( L_p(z_i) = z_i^{p}\).

eFourierSingleMode 

Fourier ModifiedExpansion with just the first mode \( \exp(i \pi z_i)\).

eFourierHalfModeRe 

Fourier Modified expansions with just the real part of the first mode \( Re[\exp(i \pi z_i)]\).

eFourierHalfModeIm 

Fourier Modified expansions with just the imaginary part of the first mode \( Im[\exp(i \pi z_i)]\).

SIZE_BasisType 

Length of enum list.

Definition at line 42 of file BasisType.h.

43  {
45  eOrtho_A, //!< Principle Orthogonal Functions \f$\widetilde{\psi}^a_p(z_i)\f$
46  eOrtho_B, //!< Principle Orthogonal Functions \f$\widetilde{\psi}^b_{pq}(z_i)\f$
47  eOrtho_C, //!< Principle Orthogonal Functions \f$\widetilde{\psi}^c_{pqr}(z_i)\f$
48  eModified_A, //!< Principle Modified Functions \f$ \phi^a_p(z_i) \f$
49  eModified_B, //!< Principle Modified Functions \f$ \phi^b_{pq}(z_i) \f$
50  eModified_C, //!< Principle Modified Functions \f$ \phi^c_{pqr}(z_i) \f$
51  eOrthoPyr_C, //!< Principle Orthogonal Functions \f$\widetilde{\psi}^c_{pqr}(z_i) for Pyramids\f$
52  eModifiedPyr_C, //!< Principle Modified Functions \f$ \phi^c_{pqr}(z_i) for Pyramids\f$
53  eFourier, //!< Fourier Expansion \f$ \exp(i p\pi z_i)\f$
54  eGLL_Lagrange, //!< Lagrange for SEM basis \f$ h_p(z_i) \f$
55  eGauss_Lagrange, //!< Lagrange Polynomials using the Gauss points \f$ h_p(z_i) \f$
56  eLegendre, //!< Legendre Polynomials \f$ L_p(z_i) = P^{0,0}_p(z_i)\f$. Same as Ortho_A
57  eChebyshev, //!< Chebyshev Polynomials \f$ T_p(z_i) = P^{-1/2,-1/2}_p(z_i)\f$
58  eMonomial, //!< Monomial polynomials \f$ L_p(z_i) = z_i^{p}\f$
59  eFourierSingleMode, //!< Fourier ModifiedExpansion with just the first mode \f$ \exp(i \pi z_i)\f$
60  eFourierHalfModeRe, //!< Fourier Modified expansions with just the real part of the first mode \f$ Re[\exp(i \pi z_i)]\f$
61  eFourierHalfModeIm, //!< Fourier Modified expansions with just the imaginary part of the first mode \f$ Im[\exp(i \pi z_i)]\f$
62  SIZE_BasisType //!< Length of enum list
63  };
Principle Modified Functions .
Definition: BasisType.h:50
Principle Modified Functions .
Definition: BasisType.h:52
Principle Modified Functions .
Definition: BasisType.h:48
Lagrange Polynomials using the Gauss points .
Definition: BasisType.h:55
Fourier Expansion .
Definition: BasisType.h:53
Chebyshev Polynomials .
Definition: BasisType.h:57
Principle Orthogonal Functions .
Definition: BasisType.h:46
Fourier Modified expansions with just the real part of the first mode .
Definition: BasisType.h:60
Principle Modified Functions .
Definition: BasisType.h:49
Principle Orthogonal Functions .
Definition: BasisType.h:47
Principle Orthogonal Functions .
Definition: BasisType.h:45
Fourier Modified expansions with just the imaginary part of the first mode .
Definition: BasisType.h:61
Principle Orthogonal Functions .
Definition: BasisType.h:51
Fourier ModifiedExpansion with just the first mode .
Definition: BasisType.h:59
Legendre Polynomials . Same as Ortho_A.
Definition: BasisType.h:56
Lagrange for SEM basis .
Definition: BasisType.h:54
Monomial polynomials .
Definition: BasisType.h:58

◆ CommDataType

◆ EndianType

Enumerator
eEndianUnknown 
eEndianBig 
eEndianLittle 
eEndianBigWord 
eEndianLittleWord 

Definition at line 50 of file CompressData.h.

◆ FieldIOType

Enumerator for auto-detection of FieldIO types.

Enumerator
eXML 
eHDF5 

Definition at line 79 of file FieldIO.cpp.

◆ FunctionType

Enumerator
eFunctionTypeExpression 
eFunctionTypeFile 
eFunctionTypeTransientFile 
eSIZE_FunctionType 

Definition at line 85 of file SessionReader.h.

◆ InterpMethod

◆ PointsType

Enumerator
eNoPointsType 
eGaussGaussLegendre 

1D Gauss-Gauss-Legendre quadrature points

eGaussRadauMLegendre 

1D Gauss-Radau-Legendre quadrature points, pinned at x=-1

eGaussRadauPLegendre 

1D Gauss-Radau-Legendre quadrature points, pinned at x=1

eGaussLobattoLegendre 

1D Gauss-Lobatto-Legendre quadrature points

eGaussGaussChebyshev 

1D Gauss-Gauss-Chebyshev quadrature points

eGaussRadauMChebyshev 

1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1

eGaussRadauPChebyshev 

1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1

eGaussLobattoChebyshev 

1D Gauss-Lobatto-Legendre quadrature points

eGaussRadauMAlpha0Beta1 

Gauss Radau pinned at x=-1, \( \alpha = 0, \beta = 1 \).

eGaussRadauMAlpha0Beta2 

Gauss Radau pinned at x=-1, \( \alpha = 0, \beta = 2 \).

eGaussRadauMAlpha1Beta0 

Gauss Radau pinned at x=-1, \( \alpha = 1, \beta = 0 \).

eGaussRadauMAlpha2Beta0 

Gauss Radau pinned at x=-1, \( \alpha = 2, \beta = 0 \).

eGaussKronrodLegendre 

1D Gauss-Kronrod-Legendre quadrature points

eGaussRadauKronrodMLegendre 

1D Gauss-Radau-Kronrod-Legendre quadrature points, pinned at x=-1

eGaussRadauKronrodMAlpha1Beta0 

1D Gauss-Radau-Kronrod-Legendre pinned at x=-1, \( \alpha = 1, \beta = 0 \)

eGaussLobattoKronrodLegendre 

1D Lobatto Kronrod quadrature points

ePolyEvenlySpaced 

1D Evenly-spaced points using Lagrange polynomial

eFourierEvenlySpaced 

1D Evenly-spaced points using Fourier Fit

eFourierSingleModeSpaced 

1D Non Evenly-spaced points for Single Mode analysis

eBoundaryLayerPoints 

1D power law distribution for boundary layer points

eBoundaryLayerPointsRev 

1D power law distribution for boundary layer points

eNodalTriElec 

2D Nodal Electrostatic Points on a Triangle

eNodalTriFekete 

2D Nodal Fekete Points on a Triangle

eNodalTriEvenlySpaced 

2D Evenly-spaced points on a Triangle

eNodalTetEvenlySpaced 

3D Evenly-spaced points on a Tetrahedron

eNodalTetElec 

3D Nodal Electrostatic Points on a Tetrahedron

eNodalPrismEvenlySpaced 

3D Evenly-spaced points on a Prism

eNodalPrismElec 

3D electrostatically spaced points on a Prism

eNodalTriSPI 

2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)

eNodalTetSPI 

3D Nodal Symmetric positive internal tet (Whitherden, Vincent)

eNodalPrismSPI 

3D prism SPI

eNodalQuadElec 

2D GLL for quad

eNodalHexElec 

3D GLL for hex

SIZE_PointsType 

Length of enum list.

Definition at line 45 of file PointsType.h.

46  {
48  eGaussGaussLegendre, //!< 1D Gauss-Gauss-Legendre quadrature points
49  eGaussRadauMLegendre, //!< 1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
50  eGaussRadauPLegendre, //!< 1D Gauss-Radau-Legendre quadrature points, pinned at x=1
51  eGaussLobattoLegendre, //!< 1D Gauss-Lobatto-Legendre quadrature points
52  eGaussGaussChebyshev, //!< 1D Gauss-Gauss-Chebyshev quadrature points
53  eGaussRadauMChebyshev, //!< 1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1
54  eGaussRadauPChebyshev, //!< 1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1
55  eGaussLobattoChebyshev, //!< 1D Gauss-Lobatto-Legendre quadrature points
56  eGaussRadauMAlpha0Beta1, //!< Gauss Radau pinned at x=-1, \f$ \alpha = 0, \beta = 1 \f$
57  eGaussRadauMAlpha0Beta2, //!< Gauss Radau pinned at x=-1, \f$ \alpha = 0, \beta = 2 \f$
58  eGaussRadauMAlpha1Beta0, //!< Gauss Radau pinned at x=-1, \f$ \alpha = 1, \beta = 0 \f$
59  eGaussRadauMAlpha2Beta0, //!< Gauss Radau pinned at x=-1, \f$ \alpha = 2, \beta = 0 \f$
60  eGaussKronrodLegendre, //!< 1D Gauss-Kronrod-Legendre quadrature points
61  eGaussRadauKronrodMLegendre, //!< 1D Gauss-Radau-Kronrod-Legendre quadrature points, pinned at x=-1
62  eGaussRadauKronrodMAlpha1Beta0, //!< 1D Gauss-Radau-Kronrod-Legendre pinned at x=-1, \f$ \alpha = 1, \beta = 0 \f$
63  eGaussLobattoKronrodLegendre, //!< 1D Lobatto Kronrod quadrature points
64  ePolyEvenlySpaced, //!< 1D Evenly-spaced points using Lagrange polynomial
65  eFourierEvenlySpaced, //!< 1D Evenly-spaced points using Fourier Fit
66  eFourierSingleModeSpaced, //!< 1D Non Evenly-spaced points for Single Mode analysis
67  eBoundaryLayerPoints, //!< 1D power law distribution for boundary layer points
68  eBoundaryLayerPointsRev, //!< 1D power law distribution for boundary layer points
69  eNodalTriElec, //!< 2D Nodal Electrostatic Points on a Triangle
70  eNodalTriFekete, //!< 2D Nodal Fekete Points on a Triangle
71  eNodalTriEvenlySpaced, //!< 2D Evenly-spaced points on a Triangle
72  eNodalTetEvenlySpaced, //!< 3D Evenly-spaced points on a Tetrahedron
73  eNodalTetElec, //!< 3D Nodal Electrostatic Points on a Tetrahedron
74  eNodalPrismEvenlySpaced, //!< 3D Evenly-spaced points on a Prism
75  eNodalPrismElec, //!< 3D electrostatically spaced points on a Prism
76  eNodalTriSPI, //!< 2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)
77  eNodalTetSPI, //!< 3D Nodal Symmetric positive internal tet (Whitherden, Vincent)
78  eNodalPrismSPI, //!< 3D prism SPI
79  eNodalQuadElec, //!< 2D GLL for quad
80  eNodalHexElec, //!< 3D GLL for hex
81  SIZE_PointsType //!< Length of enum list
82  };
1D Gauss-Radau-Kronrod-Legendre quadrature points, pinned at x=-1
Definition: PointsType.h:61
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=-1
Definition: PointsType.h:53
1D Gauss-Radau-Legendre quadrature points, pinned at x=1
Definition: PointsType.h:50
1D Gauss-Kronrod-Legendre quadrature points
Definition: PointsType.h:60
3D Nodal Symmetric positive internal tet (Whitherden, Vincent)
Definition: PointsType.h:77
1D Gauss-Gauss-Legendre quadrature points
Definition: PointsType.h:48
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:58
1D Gauss-Radau-Kronrod-Legendre pinned at x=-1,
Definition: PointsType.h:62
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:64
1D Lobatto Kronrod quadrature points
Definition: PointsType.h:63
1D Evenly-spaced points using Fourier Fit
Definition: PointsType.h:65
3D Nodal Electrostatic Points on a Tetrahedron
Definition: PointsType.h:73
1D Gauss-Radau-Chebyshev quadrature points, pinned at x=1
Definition: PointsType.h:54
1D Gauss-Gauss-Chebyshev quadrature points
Definition: PointsType.h:52
3D Evenly-spaced points on a Tetrahedron
Definition: PointsType.h:72
2D Nodal Fekete Points on a Triangle
Definition: PointsType.h:70
1D power law distribution for boundary layer points
Definition: PointsType.h:68
1D Non Evenly-spaced points for Single Mode analysis
Definition: PointsType.h:66
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:59
1D power law distribution for boundary layer points
Definition: PointsType.h:67
3D Evenly-spaced points on a Prism
Definition: PointsType.h:74
2D Evenly-spaced points on a Triangle
Definition: PointsType.h:71
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:57
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:56
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:51
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:69
3D electrostatically spaced points on a Prism
Definition: PointsType.h:75
1D Gauss-Radau-Legendre quadrature points, pinned at x=-1
Definition: PointsType.h:49
2D Nodal Symmetric positive internal triangle (Whitherden, Vincent)
Definition: PointsType.h:76
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:55

◆ PtsInfo

Enumerator
eIsEquiSpacedData 
ePtsPerElmtEdge 

Definition at line 64 of file PtsField.h.

◆ PtsType

Enumerator
ePtsFile 
ePtsLine 
ePtsPlane 
ePtsBox 
ePtsSegBlock 
ePtsTriBlock 
ePtsTetBlock 

Definition at line 53 of file PtsField.h.

◆ ReduceOperator

Type of operation to perform in AllReduce.

Enumerator
ReduceSum 
ReduceMax 
ReduceMin 
SIZE_ReduceOperator 

Definition at line 65 of file Comm.h.

◆ ShapeType

◆ TimeIntegrationMethod

Enumerator
eNoTimeIntegrationMethod 
eAdamsBashforthOrder1 

Adams-Bashforth Forward multi-step scheme of order 1.

eAdamsBashforthOrder2 

Adams-Bashforth Forward multi-step scheme of order 2.

eAdamsBashforthOrder3 

Adams-Bashforth Forward multi-step scheme of order 3.

eAdamsBashforthOrder4 

Adams-Bashforth Forward multi-step scheme of order 4.

eAdamsMoultonOrder1 

Adams-Moulton Forward multi-step scheme of order 1.

eAdamsMoultonOrder2 

Adams-Moulton Forward multi-step scheme of order 2.

eBDFImplicitOrder1 

BDF multi-step scheme of order 1 (implicit)

eBDFImplicitOrder2 

BDF multi-step scheme of order 2 (implicit)

eClassicalRungeKutta4 

Runge-Kutta multi-stage scheme 4th order explicit (old name)

eRungeKutta4 

Classical RungeKutta4 method (new name for eClassicalRungeKutta4)

eRungeKutta5 

RungeKutta5 method.

eRungeKutta3_SSP 

Nonlinear SSP RungeKutta3 explicit.

eRungeKutta2_ImprovedEuler 

Improved RungeKutta2 explicit (old name meaning Heun's method)

eRungeKutta2_SSP 

Nonlinear SSP RungeKutta2 explicit (surrogate for eRungeKutta2_ImprovedEuler)

eForwardEuler 

Forward Euler scheme.

eBackwardEuler 

Backward Euler scheme.

eIMEXOrder1 

IMEX 1st order scheme using Euler Backwards/Euler Forwards.

eIMEXOrder2 

IMEX 2nd order scheme using Backward Different Formula & Extrapolation.

eIMEXOrder3 

IMEX 3rd order scheme using Backward Different Formula & Extrapolation.

eIMEXOrder4 

IMEX 4th order scheme using Backward Different Formula & Extrapolation.

eMidpoint 

midpoint method (old name)

eRungeKutta2 

Classical RungeKutta2 method (new name for eMidpoint)

eDIRKOrder2 

Diagonally Implicit Runge Kutta scheme of order 2.

eDIRKOrder3 

Diagonally Implicit Runge Kutta scheme of order 3.

eCNAB 

Crank-Nicolson/Adams-Bashforth Order 2 (CNAB)

eIMEXGear 

IMEX Gear Order 2.

eMCNAB 

Modified Crank-Nicolson/Adams-Bashforth Order 2 (MCNAB)

eIMEXdirk_1_1_1 

Forward-Backward Euler IMEX DIRK(1,1,1)

eIMEXdirk_1_2_1 

Forward-Backward Euler IMEX DIRK(1,2,1)

eIMEXdirk_1_2_2 

Implicit-Explicit Midpoint IMEX DIRK(1,2,2)

eIMEXdirk_2_2_2 

L-stable, two stage, second order IMEX DIRK(2,2,2)

eIMEXdirk_2_3_2 

L-stable, three stage, third order IMEX DIRK(3,4,3)

eIMEXdirk_2_3_3 

L-stable, two stage, third order IMEX DIRK(2,3,3)

eIMEXdirk_3_4_3 

L-stable, three stage, third order IMEX DIRK(3,4,3)

eIMEXdirk_4_4_3 

L-stable, four stage, third order IMEX DIRK(4,4,3)

SIZE_TimeIntegrationMethod 

Length of enum list.

Definition at line 65 of file TimeIntegrationScheme.h.

66  {
68  eAdamsBashforthOrder1, //!< Adams-Bashforth Forward multi-step scheme of order 1
69  eAdamsBashforthOrder2, //!< Adams-Bashforth Forward multi-step scheme of order 2
70  eAdamsBashforthOrder3, //!< Adams-Bashforth Forward multi-step scheme of order 3
71  eAdamsBashforthOrder4, //!< Adams-Bashforth Forward multi-step scheme of order 4
72  eAdamsMoultonOrder1, //!< Adams-Moulton Forward multi-step scheme of order 1
73  eAdamsMoultonOrder2, //!< Adams-Moulton Forward multi-step scheme of order 2
74  eBDFImplicitOrder1, //!< BDF multi-step scheme of order 1 (implicit)
75  eBDFImplicitOrder2, //!< BDF multi-step scheme of order 2 (implicit)
76  eClassicalRungeKutta4, //!< Runge-Kutta multi-stage scheme 4th order explicit (old name)
77  eRungeKutta4, //!< Classical RungeKutta4 method (new name for eClassicalRungeKutta4)
78  eRungeKutta5, //!< RungeKutta5 method
79  eRungeKutta3_SSP, //!< Nonlinear SSP RungeKutta3 explicit
80  eRungeKutta2_ImprovedEuler, //!< Improved RungeKutta2 explicit (old name meaning Heun's method)
81  eRungeKutta2_SSP, //!< Nonlinear SSP RungeKutta2 explicit (surrogate for eRungeKutta2_ImprovedEuler)
82  eForwardEuler, //!< Forward Euler scheme
83  eBackwardEuler, //!< Backward Euler scheme
84  eIMEXOrder1, //!< IMEX 1st order scheme using Euler Backwards/Euler Forwards
85  eIMEXOrder2, //!< IMEX 2nd order scheme using Backward Different Formula & Extrapolation
86  eIMEXOrder3, //!< IMEX 3rd order scheme using Backward Different Formula & Extrapolation
87  eIMEXOrder4, //!< IMEX 4th order scheme using Backward Different Formula & Extrapolation
88  eMidpoint, //!< midpoint method (old name)
89  eRungeKutta2, //!< Classical RungeKutta2 method (new name for eMidpoint)
90  eDIRKOrder2, //!< Diagonally Implicit Runge Kutta scheme of order 2
91  eDIRKOrder3, //!< Diagonally Implicit Runge Kutta scheme of order 3
92  eCNAB, //!< Crank-Nicolson/Adams-Bashforth Order 2 (CNAB)
93  eIMEXGear, //!< IMEX Gear Order 2
94  eMCNAB, //!< Modified Crank-Nicolson/Adams-Bashforth Order 2 (MCNAB)
95  eIMEXdirk_1_1_1, //!< Forward-Backward Euler IMEX DIRK(1,1,1)
96  eIMEXdirk_1_2_1, //!< Forward-Backward Euler IMEX DIRK(1,2,1)
97  eIMEXdirk_1_2_2, //!< Implicit-Explicit Midpoint IMEX DIRK(1,2,2)
98  eIMEXdirk_2_2_2, //!< L-stable, two stage, second order IMEX DIRK(2,2,2)
99  eIMEXdirk_2_3_2, //!< L-stable, three stage, third order IMEX DIRK(3,4,3)
100  eIMEXdirk_2_3_3, //!< L-stable, two stage, third order IMEX DIRK(2,3,3)
101  eIMEXdirk_3_4_3, //!< L-stable, three stage, third order IMEX DIRK(3,4,3)
102  eIMEXdirk_4_4_3, //!< L-stable, four stage, third order IMEX DIRK(4,4,3)
103  SIZE_TimeIntegrationMethod //!< Length of enum list
104  };
BDF multi-step scheme of order 1 (implicit)
Adams-Bashforth Forward multi-step scheme of order 2.
Runge-Kutta multi-stage scheme 4th order explicit (old name)
Implicit-Explicit Midpoint IMEX DIRK(1,2,2)
Classical RungeKutta4 method (new name for eClassicalRungeKutta4)
L-stable, four stage, third order IMEX DIRK(4,4,3)
Forward-Backward Euler IMEX DIRK(1,2,1)
Nonlinear SSP RungeKutta3 explicit.
Adams-Moulton Forward multi-step scheme of order 2.
Adams-Bashforth Forward multi-step scheme of order 3.
Crank-Nicolson/Adams-Bashforth Order 2 (CNAB)
IMEX 2nd order scheme using Backward Different Formula & Extrapolation.
Classical RungeKutta2 method (new name for eMidpoint)
Adams-Moulton Forward multi-step scheme of order 1.
Adams-Bashforth Forward multi-step scheme of order 1.
L-stable, three stage, third order IMEX DIRK(3,4,3)
Nonlinear SSP RungeKutta2 explicit (surrogate for eRungeKutta2_ImprovedEuler)
Improved RungeKutta2 explicit (old name meaning Heun&#39;s method)
Forward-Backward Euler IMEX DIRK(1,1,1)
BDF multi-step scheme of order 2 (implicit)
L-stable, two stage, second order IMEX DIRK(2,2,2)
Diagonally Implicit Runge Kutta scheme of order 2.
IMEX 3rd order scheme using Backward Different Formula & Extrapolation.
L-stable, three stage, third order IMEX DIRK(3,4,3)
Diagonally Implicit Runge Kutta scheme of order 3.
L-stable, two stage, third order IMEX DIRK(2,3,3)
IMEX 4th order scheme using Backward Different Formula & Extrapolation.
Modified Crank-Nicolson/Adams-Bashforth Order 2 (MCNAB)
IMEX 1st order scheme using Euler Backwards/Euler Forwards.
midpoint method (old name)
Adams-Bashforth Forward multi-step scheme of order 4.

◆ TimeIntegrationSchemeType

Enumerator
eNoTimeIntegrationSchemeType 
eExplicit 

Formally explicit scheme.

eDiagonallyImplicit 

Diagonally implicit scheme (e.g. the DIRK schemes)

eIMEX 

Implicit Explicit General Linear Method.

eImplicit 

Fully implicit scheme.

Definition at line 146 of file TimeIntegrationScheme.h.

147  {
149  eExplicit, //!< Formally explicit scheme
150  eDiagonallyImplicit, //!< Diagonally implicit scheme (e.g. the DIRK schemes)
151  eIMEX, //!< Implicit Explicit General Linear Method
152  eImplicit, //!< Fully implicit scheme
153  };
Implicit Explicit General Linear Method.
Diagonally implicit scheme (e.g. the DIRK schemes)

◆ TranspositionDir

Function Documentation

◆ ang()

static NekDouble Nektar::LibUtilities::ang ( NekDouble  x,
NekDouble  y 
)
static

◆ awgn()

NekDouble Nektar::LibUtilities::awgn ( NekDouble  sigma)

Definition at line 78 of file Interpreter.cpp.

Referenced by Nektar::LibUtilities::functions::functions().

79 {
80  boost::mt19937 rng;
81  boost::variate_generator<boost::mt19937 &, boost::normal_distribution<>>
82  _normal(rng, boost::normal_distribution<>(0, sigma));
83  return _normal();
84 }

◆ BasisManager()

BasisManagerT & Nektar::LibUtilities::BasisManager ( void  )

◆ checked_cast()

template<class To , class Ti , class = typename std::enable_if < std::is_floating_point<typename std::remove_reference<Ti>::type>::value && std::is_integral <typename std::remove_reference<To>::type>::value >::type>
To Nektar::LibUtilities::checked_cast ( const Ti  param)
inline

checked cast from float types only to int types

Definition at line 57 of file CheckedCast.hpp.

References ASSERTL0.

Referenced by Nektar::LibUtilities::SessionReader::LoadParameter().

58 {
59  Ti min = std::numeric_limits<To>::min();
60  Ti max = std::numeric_limits<To>::max();
61  ASSERTL0(param >= min, "Casting would narrow (underflow).");
62  ASSERTL0(param <= max, "Casting would narrow (overflow).");
63  return static_cast<To>(param);
64 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216

◆ CommDataTypeGetSize()

int Nektar::LibUtilities::CommDataTypeGetSize ( CommDataType  dt)

Return the size in bytes of a data type dt.

Parameters
dtData type
Returns
Size of dt in bytes.

Definition at line 54 of file CommDataType.cpp.

References ASSERTL0, MPI_CHAR, MPI_DOUBLE, MPI_FLOAT, MPI_INT, MPI_LONG, MPI_LONG_DOUBLE, MPI_LONG_LONG, MPI_UNSIGNED, MPI_UNSIGNED_LONG, and MPI_UNSIGNED_LONG_LONG.

Referenced by Nektar::LibUtilities::CommSerial::v_Gather(), and Nektar::LibUtilities::CommSerial::v_Scatter().

55 {
56 #ifdef NEKTAR_USE_MPI
57  int size;
58  MPI_Type_size(dt, &size);
59  return size;
60 #elif NEKTAR_USING_PETSC
61  if (dt == MPI_CHAR)
62  return sizeof(char);
63  else if (dt == MPI_INT)
64  return sizeof(int);
65  else if (dt == MPI_UNSIGNED)
66  return sizeof(unsigned);
67  else if (dt == MPI_LONG)
68  return sizeof(long);
69  else if (dt == MPI_UNSIGNED_LONG)
70  return sizeof(unsigned long);
71  else if (dt == MPI_LONG_LONG)
72  return sizeof(long long);
73  else if (dt == MPI_UNSIGNED_LONG_LONG)
74  return sizeof(unsigned long long);
75  else if (dt == MPI_FLOAT)
76  return sizeof(float);
77  else if (dt == MPI_DOUBLE)
78  return sizeof(double);
79  else if (dt == MPI_LONG_DOUBLE)
80  return sizeof(long double);
81  return sizeof(int);
82 #else
83  switch (dt)
84  {
85  case MPI_CHAR:
86  return sizeof(char);
87  case MPI_INT:
88  return sizeof(int);
89  case MPI_UNSIGNED:
90  return sizeof(unsigned);
91  case MPI_LONG:
92  return sizeof(long);
93  case MPI_UNSIGNED_LONG:
94  return sizeof(unsigned long);
95  case MPI_LONG_LONG:
96  return sizeof(long long);
98  return sizeof(unsigned long long);
99  case MPI_FLOAT:
100  return sizeof(float);
101  case MPI_DOUBLE:
102  return sizeof(double);
103  case MPI_LONG_DOUBLE:
104  return sizeof(long double);
105  default:
106  ASSERTL0(false, "Unrecognised datatype!");
107  }
108  return sizeof(int);
109 #endif
110 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216

◆ Endianness()

EndianType Nektar::LibUtilities::Endianness ( void  )

run time determination of endianness, returning an EndianType

Definition at line 68 of file CompressData.cpp.

References eEndianBig, eEndianBigWord, eEndianLittle, eEndianLittleWord, and eEndianUnknown.

Referenced by Nektar::LibUtilities::CompressData::GetCompressString(), and Nektar::FieldUtils::InputSemtex::Process().

69  {
70  union
71  {
72  std::uint32_t value;
73  std::uint8_t data[sizeof(std::uint32_t)];
74  } number;
75 
76  number.data[0] = 0x00;
77  number.data[1] = 0x01;
78  number.data[2] = 0x02;
79  number.data[3] = 0x03;
80 
81  switch (number.value)
82  {
83  case UINT32_C(0x00010203): return eEndianBig;
84  case UINT32_C(0x03020100): return eEndianLittle;
85  case UINT32_C(0x02030001): return eEndianBigWord;
86  case UINT32_C(0x01000302): return eEndianLittleWord;
87  default: return eEndianUnknown;
88  }
89  }

◆ GetCommFactory()

CommFactory & Nektar::LibUtilities::GetCommFactory ( )

Definition at line 63 of file Communication/Comm.cpp.

Referenced by Nektar::LibUtilities::SessionReader::CreateComm(), Import(), main(), Nektar::FieldUtils::ProcessInterpField::Process(), Nektar::FieldUtils::ProcessPointDataToFld::Process(), Nektar::FieldUtils::ProcessInterpPoints::Process(), Nektar::SpatialDomains::MeshPartition::ReadExpansions(), Nektar::Utilities::ProcessCurve::v_GenerateEdgeNodes(), Write(), and Nektar::FieldUtils::OutputFileBase::WriteFile().

64 {
65  static CommFactory instance;
66  return instance;
67 }
LibUtilities::NekFactory< std::string, Comm, int, char ** > CommFactory
Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class...
Definition: Comm.h:60

◆ GetFieldIOFactory()

FieldIOFactory & Nektar::LibUtilities::GetFieldIOFactory ( )

◆ GetNektarFFTFactory()

NektarFFTFactory & Nektar::LibUtilities::GetNektarFFTFactory ( )

Definition at line 69 of file NektarFFT.cpp.

Referenced by Nektar::LinearisedAdvection::DFT(), Nektar::MultiRegions::ExpListHomogeneous1D::ExpListHomogeneous1D(), Nektar::MultiRegions::ExpListHomogeneous2D::ExpListHomogeneous2D(), and Nektar::ForcingMovingBody::InitialiseCableModel().

70  {
71  static NektarFFTFactory instance;
72  return instance;
73  }
LibUtilities::NekFactory< std::string, NektarFFT, int > NektarFFTFactory
Datatype of the NekFactory used to instantiate classes derived from the NektarFFT class...
Definition: NektarFFT.h:62

◆ GetNumberOfCoefficients() [1/2]

int Nektar::LibUtilities::GetNumberOfCoefficients ( ShapeType  shape,
std::vector< unsigned int > &  modes,
int  offset 
)
inline

Definition at line 313 of file ShapeType.hpp.

References Nektar::ErrorUtil::efatal, eHexahedron, ePrism, ePyramid, eQuadrilateral, eSegment, eTetrahedron, eTriangle, Nektar::LibUtilities::StdTriData::getNumberOfCoefficients(), Nektar::LibUtilities::StdTetData::getNumberOfCoefficients(), Nektar::LibUtilities::StdPyrData::getNumberOfCoefficients(), Nektar::LibUtilities::StdPrismData::getNumberOfCoefficients(), and NEKERROR.

Referenced by Nektar::StdRegions::StdExpansion::PhysInterpToSimplexEquiSpaced(), Nektar::MultiRegions::ExpListHomogeneous1D::v_ExtractDataToCoeffs(), and Nektar::MultiRegions::ExpList::v_ExtractDataToCoeffs().

314  {
315  int returnval = 0;
316  switch(shape)
317  {
318  case eSegment:
319  returnval = modes[offset];
320  break;
321  case eTriangle:
322  returnval = StdTriData::getNumberOfCoefficients(modes[offset],modes[offset+1]);
323  break;
324  case eQuadrilateral:
325  returnval = modes[offset]*modes[offset+1];
326  break;
327  case eTetrahedron:
328  returnval = StdTetData::getNumberOfCoefficients(modes[offset],modes[offset+1],modes[offset+2]);
329  break;
330  case ePyramid:
331  returnval = StdPyrData::getNumberOfCoefficients(modes[offset],modes[offset+1],modes[offset+2]);
332  break;
333  case ePrism:
334  returnval = StdPrismData::getNumberOfCoefficients(modes[offset],modes[offset+1],modes[offset+2]);
335  break;
336  case eHexahedron:
337  returnval = modes[offset]*modes[offset+1]*modes[offset+2];
338  break;
339  default:
340  NEKERROR(ErrorUtil::efatal,"Unknown Shape Type");
341  break;
342  }
343 
344  return returnval;
345  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
int getNumberOfCoefficients(int Na, int Nb, int Nc)
Definition: ShapeType.hpp:287

◆ GetNumberOfCoefficients() [2/2]

int Nektar::LibUtilities::GetNumberOfCoefficients ( ShapeType  shape,
int  na,
int  nb,
int  nc 
)
inline

Definition at line 348 of file ShapeType.hpp.

References Nektar::ErrorUtil::efatal, eHexahedron, ePrism, ePyramid, eQuadrilateral, eSegment, eTetrahedron, eTriangle, Nektar::LibUtilities::StdTriData::getNumberOfCoefficients(), Nektar::LibUtilities::StdTetData::getNumberOfCoefficients(), Nektar::LibUtilities::StdPyrData::getNumberOfCoefficients(), Nektar::LibUtilities::StdPrismData::getNumberOfCoefficients(), and NEKERROR.

349  {
350  int returnval = 0;
351  switch(shape)
352  {
353  case eSegment:
354  returnval = na;
355  break;
356  case eTriangle:
357  returnval = StdTriData::getNumberOfCoefficients(na,nb);
358  break;
359  case eQuadrilateral:
360  returnval = na*nb;
361  break;
362  case eTetrahedron:
363  returnval = StdTetData::getNumberOfCoefficients(na,nb,nc);
364  break;
365  case ePyramid:
366  returnval = StdPyrData::getNumberOfCoefficients(na,nb,nc);
367  break;
368  case ePrism:
369  returnval = StdPrismData::getNumberOfCoefficients(na,nb,nc);
370  break;
371  case eHexahedron:
372  returnval = na*nb*nc;
373  break;
374  default:
375  NEKERROR(ErrorUtil::efatal,"Unknown Shape Type");
376  break;
377  }
378 
379  return returnval;
380  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
int getNumberOfCoefficients(int Na, int Nb, int Nc)
Definition: ShapeType.hpp:287

◆ GetTimeIntegrationWrapperFactory()

TimeIntegrationWrapperFactory & Nektar::LibUtilities::GetTimeIntegrationWrapperFactory ( )

Definition at line 41 of file TimeIntegrationWrapper.cpp.

Referenced by Nektar::UnsteadyAdvectionDiffusion::SetUpSubSteppingTimeIntegration(), Diffusion::TimeIntegrate(), Nektar::SolverUtils::UnsteadySystem::v_InitObject(), Nektar::LibUtilities::TimeIntegrationWrapper::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXOrder1::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXOrder3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXOrder4::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_1_1_1::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_1_2_1::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_1_2_2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_4_4_3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_2_2_2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_2_3_3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_2_3_2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_3_4_3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationForwardEuler::v_InitObject(), Nektar::LibUtilities::TimeIntegrationBackwardEuler::v_InitObject(), Nektar::LibUtilities::TimeIntegrationBDFImplicitOrder1::v_InitObject(), Nektar::LibUtilities::TimeIntegrationBDFImplicitOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationMidpoint::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta2_ImprovedEuler::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta2_SSP::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta3_SSP::v_InitObject(), Nektar::LibUtilities::TimeIntegrationClassicalRungeKutta4::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta4::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta5::v_InitObject(), Nektar::LibUtilities::TimeIntegrationDIRKOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationDIRKOrder3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder4::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsMoultonOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXGear::v_InitObject(), Nektar::LibUtilities::TimeIntegrationCNAB::v_InitObject(), and Nektar::SubSteppingExtrapolate::v_SubSteppingTimeIntegration().

42  {
43  static TimeIntegrationWrapperFactory instance;
44  return instance;
45  }
NekFactory< std::string, TimeIntegrationWrapper > TimeIntegrationWrapperFactory
Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class...

◆ Import()

void Nektar::LibUtilities::Import ( const std::string &  infilename,
std::vector< FieldDefinitionsSharedPtr > &  fielddefs,
std::vector< std::vector< NekDouble > > &  fielddata,
FieldMetaDataMap fieldinfomap,
const Array< OneD, int > &  ElementIDs 
)

This function allows for data to be imported from an FLD file when a session and/or communicator is not instantiated. Typically used in utilities which only operate in serial.

Parameters
infilenameInput filename (or directory if parallel format)
fielddefsOn return contains field definitions as read from the input.
fielddataOn return, contains binary field data that stores the input corresponding to fielddefs.
fieldinfoOn returnm, contains the associated field metadata map.
ElementIDsElement IDs that lie on this processor, which can be optionally supplied to avoid reading the entire file on each processor.

Definition at line 293 of file FieldIO.cpp.

References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), GetCommFactory(), GetFieldIOFactory(), and Nektar::LibUtilities::FieldIO::GetFileType().

Referenced by GetStreakLocation(), Nektar::SolverUtils::EquationSystem::ImportFldToMultiDomains(), main(), and Nektar::LibUtilities::FieldIO::~FieldIO().

299 {
300 #ifdef NEKTAR_USE_MPI
301  int size;
302  int init;
303  MPI_Initialized(&init);
304 
305  // If MPI has been initialised we can check the number of processes
306  // and, if > 1, tell the user he should not be running this
307  // function in parallel. If it is not initialised, we do not
308  // initialise it here, and assume the user knows what they are
309  // doing.
310  if (init)
311  {
312  MPI_Comm_size(MPI_COMM_WORLD, &size);
313  ASSERTL0(size == 1,
314  "This static function is not available in parallel. Please"
315  "instantiate a FieldIO object for parallel use.");
316  }
317 #endif
318  CommSharedPtr c = GetCommFactory().CreateInstance("Serial", 0, 0);
319  const std::string iofmt = FieldIO::GetFileType(infilename, c);
320  FieldIOSharedPtr f = GetFieldIOFactory().CreateInstance(iofmt, c, false);
321  f->Import(infilename, fielddefs, fielddata, fieldinfomap, ElementIDs);
322 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
Definition: Comm.h:53
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory.
Definition: FieldIO.cpp:72
CommFactory & GetCommFactory()
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
std::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:306

◆ Interp1D() [1/4]

void Nektar::LibUtilities::Interp1D ( const BasisKey fbasis0,
const Array< OneD, const NekDouble > &  from,
const BasisKey tbasis0,
Array< OneD, NekDouble > &  to 
)

this function interpolates a 1D function \(f\) evaluated at the quadrature points of the basis fbasis0 to the function values at the quadrature points of the basis tbasis0

Given a function \( f\) evaluated at the Q quadrature points of the basis fbasis0, this routine calculates, using (Q-1)th order polynomial interpolation, the function values at the Q2 quadrature points of the basis tbasis0.

Parameters
fbasis0the basis at which's quadrature points the function is given
fromthe array containg the function \( f\) evaluated at the quadrature points of fbasis0
tbasis0the basis to which's quadrature points the function should be interpolated
tothe array containg the function \( f\) evaluated at the quadrature points of tbasis0 (output of the function)

Definition at line 53 of file Interp.cpp.

References Nektar::LibUtilities::BasisKey::GetPointsKey().

Referenced by Nektar::SpatialDomains::GeomFactors::Interp(), Interp1D(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::SegExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::TriExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::Expansion::v_GetCoords(), Nektar::LocalRegions::QuadExp::v_GetEdgePhysVals(), Nektar::LocalRegions::TriExp::v_GetEdgePhysVals(), and Nektar::MultiRegions::ExpList1D::v_GetNormals().

57  {
58  Interp1D(fbasis0.GetPointsKey(),from,tbasis0.GetPointsKey(),to);
59  }
void Interp1D(const PointsKey &fpoints0, const NekDouble *from, const PointsKey &tpoints0, NekDouble *to)
Definition: Interp.cpp:91

◆ Interp1D() [2/4]

void Nektar::LibUtilities::Interp1D ( const PointsKey fpoints0,
const Array< OneD, const NekDouble > &  from,
const PointsKey tpoints0,
Array< OneD, NekDouble > &  to 
)

Definition at line 61 of file Interp.cpp.

References Nektar::eWrapper, Nektar::LibUtilities::PointsKey::GetNumPoints(), PointsManager(), and Vmath::Vcopy().

65  {
66  if(fpoints0 == tpoints0) //check to see if the same
67  {
68  Vmath::Vcopy(fpoints0.GetNumPoints(),from,1,to,1);
69  }
70  else // interpolate
71  {
73 
74  I0 = PointsManager()[fpoints0]->GetI(tpoints0);
75 
76  NekVector<NekDouble> in(fpoints0.GetNumPoints(),from,eWrapper);
77  NekVector<NekDouble> out(tpoints0.GetNumPoints(),to,eWrapper);
78 
79  out = (*I0)*in;
80  }
81  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
PointsManagerT & PointsManager(void)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ Interp1D() [3/4]

void Nektar::LibUtilities::Interp1D ( const BasisKey fbasis0,
const NekDouble from,
const BasisKey tbasis0,
NekDouble to 
)

Definition at line 83 of file Interp.cpp.

References Nektar::LibUtilities::BasisKey::GetPointsKey(), and Interp1D().

87  {
88  Interp1D(fbasis0.GetPointsKey(),from,tbasis0.GetPointsKey(),to);
89  }
void Interp1D(const PointsKey &fpoints0, const NekDouble *from, const PointsKey &tpoints0, NekDouble *to)
Definition: Interp.cpp:91

◆ Interp1D() [4/4]

void Nektar::LibUtilities::Interp1D ( const PointsKey fpoints0,
const NekDouble from,
const PointsKey tpoints0,
NekDouble to 
)

Definition at line 91 of file Interp.cpp.

References Blas::Dgemv(), Nektar::LibUtilities::PointsKey::GetNumPoints(), PointsManager(), and Vmath::Vcopy().

95  {
96  if(fpoints0 == tpoints0) //check to see if the same
97  {
98  Vmath::Vcopy(fpoints0.GetNumPoints(),from,1,to,1);
99  }
100  else // interpolate
101  {
102 
103  DNekMatSharedPtr I0;
104 
105  I0 = PointsManager()[fpoints0]
106  ->GetI(tpoints0);
107 
108  Blas::Dgemv('N', tpoints0.GetNumPoints(), fpoints0.GetNumPoints(),
109  1.0, I0->GetPtr().get(), tpoints0.GetNumPoints(),
110  from, 1, 0.0, to, 1);
111  }
112  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
PointsManagerT & PointsManager(void)
static void Dgemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = A x where A[m x n].
Definition: Blas.hpp:168
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ Interp2D() [1/3]

void Nektar::LibUtilities::Interp2D ( const BasisKey fbasis0,
const BasisKey fbasis1,
const Array< OneD, const NekDouble > &  from,
const BasisKey tbasis0,
const BasisKey tbasis1,
Array< OneD, NekDouble > &  to 
)

this function interpolates a 2D function \(f\) evaluated at the quadrature points of the 2D basis, constructed by fbasis0 and fbasis1, to the function values at the quadrature points of the 2D basis, constructed by tbasis0 and tbasis1

Given a function \( f\) evaluated at the Q quadrature points of the first expansion basis, this routine calculates, using (Q-1)th order polynomial interpolation, the function values at the Q2 quadrature points of the second basis.

Parameters
fbasis0the basis at which's quadrature points the function is given
fromthe array containg the function \( f\) evaluated at the quadrature points of fbasis0
tbasis0the basis to which's quadrature points the function should be interpolated
tothe array containg the function \( f\) evaluated at the quadrature points of tbasis0 (output of the function)

Definition at line 115 of file Interp.cpp.

References Nektar::LibUtilities::BasisKey::GetPointsKey().

Referenced by Nektar::FieldUtils::ProcessEquiSpacedOutput::GenOrthoModes(), Nektar::FieldUtils::ProcessQualityMetric::GetQ(), Nektar::SpatialDomains::GeomFactors::Interp(), Interp2D(), Nektar::GlobalMapping::UpdateGeometry(), Nektar::LocalRegions::TetExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeFaceNormal(), Nektar::LocalRegions::HexExp::v_ComputeFaceNormal(), Nektar::LocalRegions::QuadExp::v_ExtractDataToCoeffs(), Nektar::SpatialDomains::QuadGeom::v_FillGeom(), Nektar::SpatialDomains::TriGeom::v_FillGeom(), Nektar::LocalRegions::Expansion::v_GetCoords(), Nektar::LocalRegions::Expansion3D::v_GetFacePhysVals(), Nektar::MultiRegions::ExpList2D::v_GetNormals(), and Nektar::MultiRegions::ExpList2D::v_PhysInterp1DScaled().

121  {
122  Interp2D(fbasis0.GetPointsKey(),fbasis1.GetPointsKey(),from.data(),
123  tbasis0.GetPointsKey(),tbasis1.GetPointsKey(),to.data());
124  }
void Interp2D(const PointsKey &fpoints0, const PointsKey &fpoints1, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, NekDouble *to)
Definition: Interp.cpp:136

◆ Interp2D() [2/3]

void Nektar::LibUtilities::Interp2D ( const PointsKey fpoints0,
const PointsKey fpoints1,
const Array< OneD, const NekDouble > &  from,
const PointsKey tpoints0,
const PointsKey tpoints1,
Array< OneD, NekDouble > &  to 
)

Definition at line 126 of file Interp.cpp.

References Interp2D().

132  {
133  Interp2D(fpoints0,fpoints1,from.data(),tpoints0,tpoints1,to.data());
134  }
void Interp2D(const PointsKey &fpoints0, const PointsKey &fpoints1, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, NekDouble *to)
Definition: Interp.cpp:136

◆ Interp2D() [3/3]

void Nektar::LibUtilities::Interp2D ( const PointsKey fpoints0,
const PointsKey fpoints1,
const NekDouble from,
const PointsKey tpoints0,
const PointsKey tpoints1,
NekDouble to 
)

Definition at line 136 of file Interp.cpp.

References Blas::Dgemm(), Nektar::LibUtilities::PointsKey::GetNumPoints(), PointsManager(), and Vmath::Vcopy().

142  {
143  // default interpolation
144  if((fpoints0 == tpoints0)&&(fpoints1 == tpoints1))
145  {
146  Vmath::Vcopy(tpoints0.GetNumPoints()*tpoints1.GetNumPoints(),
147  from,1,to,1);
148  return;
149  }
150 
151  DNekMatSharedPtr I0,I1;
152  Array<OneD, NekDouble> wsp(tpoints1.GetNumPoints()*fpoints0.GetNumPoints()); // fnp0*tnp1
153 
154  int fnp0 = fpoints0.GetNumPoints();
155  int fnp1 = fpoints1.GetNumPoints();
156  int tnp0 = tpoints0.GetNumPoints();
157  int tnp1 = tpoints1.GetNumPoints();
158 
159  if(fpoints1 == tpoints1)
160  {
161  Vmath::Vcopy(fnp0*tnp1,from,1,wsp.get(),1);
162  }
163  else
164  {
165  I1 = PointsManager()[fpoints1]->GetI(tpoints1);
166  Blas::Dgemm('N', 'T', fnp0, tnp1, fnp1, 1.0, from, fnp0,
167  I1->GetPtr().get(), tnp1, 0.0, wsp.get(), fnp0);
168  }
169 
170  if(fpoints0 == tpoints0)
171  {
172  Vmath::Vcopy(tnp0*tnp1,wsp.get(),1,to,1);
173  }
174  else
175  {
176  I0 = PointsManager()[fpoints0]->GetI(tpoints0);
177  Blas::Dgemm('N', 'N', tnp0, tnp1, fnp0, 1.0, I0->GetPtr().get(),
178  tnp0, wsp.get(), fnp0, 0.0, to, tnp0);
179  }
180  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where A[m x n], B[n x k], C[m x k].
Definition: Blas.hpp:213
PointsManagerT & PointsManager(void)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ Interp3D() [1/3]

void Nektar::LibUtilities::Interp3D ( const BasisKey fbasis0,
const BasisKey fbasis1,
const BasisKey fbasis2,
const Array< OneD, const NekDouble > &  from,
const BasisKey tbasis0,
const BasisKey tbasis1,
const BasisKey tbasis2,
Array< OneD, NekDouble > &  to 
)

this function interpolates a 3D function \(f\) evaluated at the quadrature points of the 3D basis, constructed by fbasis0, fbasis1, and fbasis2 to the function values at the quadrature points of the 3D basis, constructed by tbasis0, tbasis1, and tbasis2.

Given a function \( f\) evaluated at the Q quadrature points of the first expansion basis, this routine calculates, using (Q-1)th order polynomial interpolation, the function values at the Q2 quadrature points of the second basis, and the function values at the Q3 quadrature points of the third basis.

Parameters
fbasis0the basis at which's quadrature points the function is given
fromthe array containg the function \( f\) evaluated at the quadrature points of fbasis0
tbasis0the basis to which's quadrature points the function should be interpolated
tothe array containg the function \( f\) evaluated at the quadrature points of tbasis0 (output of the function)

Definition at line 185 of file Interp.cpp.

References Nektar::LibUtilities::BasisKey::GetPointsKey().

Referenced by Nektar::FieldUtils::ProcessQualityMetric::GetQ(), Nektar::SpatialDomains::GeomFactors::Interp(), Interp3D(), Nektar::LocalRegions::HexExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::Expansion::v_GetCoords(), and Nektar::MultiRegions::ExpList3D::v_PhysInterp1DScaled().

193  {
194  Interp3D(fbasis0.GetPointsKey(),fbasis1.GetPointsKey(),
195  fbasis2.GetPointsKey(),from.data(),
196  tbasis0.GetPointsKey(),tbasis1.GetPointsKey(),
197  tbasis2.GetPointsKey(),to.data());
198  }
void Interp3D(const PointsKey &fpoints0, const PointsKey &fpoints1, const PointsKey &fpoints2, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, NekDouble *to)
Definition: Interp.cpp:214

◆ Interp3D() [2/3]

void Nektar::LibUtilities::Interp3D ( const PointsKey fpoints0,
const PointsKey fpoints1,
const PointsKey fpoints2,
const Array< OneD, const NekDouble > &  from,
const PointsKey tpoints0,
const PointsKey tpoints1,
const PointsKey tpoints2,
Array< OneD, NekDouble > &  to 
)

Definition at line 201 of file Interp.cpp.

References Interp3D().

209  {
210  Interp3D(fpoints0,fpoints1,fpoints2,from.data(),
211  tpoints0,tpoints1,tpoints2,to.data());
212  }
void Interp3D(const PointsKey &fpoints0, const PointsKey &fpoints1, const PointsKey &fpoints2, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, NekDouble *to)
Definition: Interp.cpp:214

◆ Interp3D() [3/3]

void Nektar::LibUtilities::Interp3D ( const PointsKey fpoints0,
const PointsKey fpoints1,
const PointsKey fpoints2,
const NekDouble from,
const PointsKey tpoints0,
const PointsKey tpoints1,
const PointsKey tpoints2,
NekDouble to 
)

Definition at line 214 of file Interp.cpp.

References Blas::Dgemm(), Nektar::LibUtilities::PointsKey::GetNumPoints(), and PointsManager().

222  {
223  int i;
224  DNekMatSharedPtr I0, I1, I2;
225 
226  int fnp0 = fpoints0.GetNumPoints();
227  int fnp1 = fpoints1.GetNumPoints();
228  int fnp2 = fpoints2.GetNumPoints();
229  int tnp0 = tpoints0.GetNumPoints();
230  int tnp1 = tpoints1.GetNumPoints();
231  int tnp2 = tpoints2.GetNumPoints();
232 
233  Array<OneD, NekDouble> wsp1(tnp0*tnp1*fnp2);
234  Array<OneD, NekDouble> wsp2(tnp0*fnp1*fnp2);
235 
236  I0 = PointsManager()[fpoints0]->GetI(tpoints0);
237  I1 = PointsManager()[fpoints1]->GetI(tpoints1);
238  I2 = PointsManager()[fpoints2]->GetI(tpoints2);
239 
240  Blas::Dgemm('N', 'N', tnp0, fnp1*fnp2, fnp0, 1.0, I0->GetPtr().get(),
241  tnp0, from, fnp0, 0.0, wsp2.get(), tnp0);
242 
243  for(i = 0; i < fnp2; i++)
244  {
245  Blas::Dgemm('N', 'T', tnp0, tnp1, fnp1, 1.0, wsp2.get()+i*tnp0*fnp1,
246  tnp0, I1->GetPtr().get(), tnp1, 0.0, wsp1.get()+i*tnp0*tnp1, tnp0);
247  }
248 
249  Blas::Dgemm('N', 'T', tnp0*tnp1, tnp2, fnp2, 1.0, wsp1.get(),
250  tnp0*tnp1, I2->GetPtr().get(), tnp2, 0.0, to, tnp0*tnp1);
251  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where A[m x n], B[n x k], C[m x k].
Definition: Blas.hpp:213
PointsManagerT & PointsManager(void)

◆ InterpCoeff1D()

void Nektar::LibUtilities::InterpCoeff1D ( const BasisKey fbasis0,
const Array< OneD, const NekDouble > &  from,
const BasisKey tbasis0,
Array< OneD, NekDouble > &  to 
)

Definition at line 46 of file InterpCoeff.cpp.

References ASSERTL0, BasisManager(), Nektar::eWrapper, Nektar::LibUtilities::BasisKey::GetBasisType(), Nektar::LibUtilities::BasisKey::GetNumModes(), and Vmath::Vcopy().

Referenced by Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::StdRegions::StdSegExp::v_ReduceOrderCoeffs(), and Nektar::SolverUtils::FilterEnergy1D::v_Update().

50  {
51  ASSERTL0(fbasis0.GetNumModes() == tbasis0.GetNumModes(),
52  "Number of modes must be the same for "
53  "interpolating coefficients");
54 
55  // Check to see if the same basis
56  if (fbasis0.GetBasisType() == tbasis0.GetBasisType())
57  {
58  Vmath::Vcopy(fbasis0.GetNumModes(), from, 1, to, 1);
59  }
60  else
61  {
62  // interpolate
63  DNekMatSharedPtr ftB = BasisManager()[fbasis0]->GetI(tbasis0);
64 
65  NekVector<NekDouble> in (fbasis0.GetNumModes(), from, eWrapper);
66  NekVector<NekDouble> out(tbasis0.GetNumModes(), to, eWrapper);
67 
68  out = (*ftB)*in;
69  }
70  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
BasisManagerT & BasisManager(void)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ InterpCoeff2D() [1/2]

void Nektar::LibUtilities::InterpCoeff2D ( const BasisKey fbasis0,
const BasisKey fbasis1,
const Array< OneD, const NekDouble > &  from,
const BasisKey tbasis0,
const BasisKey tbasis1,
Array< OneD, NekDouble > &  to 
)

Definition at line 72 of file InterpCoeff.cpp.

Referenced by Nektar::StdRegions::StdQuadExp::v_ReduceOrderCoeffs(), and Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs().

78  {
79  InterpCoeff2D(fbasis0, fbasis1, from.data(),
80  tbasis0, tbasis1, to. data());
81  }
void InterpCoeff2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const NekDouble *from, const BasisKey &tbasis0, const BasisKey &tbasis1, NekDouble *to)
Definition: InterpCoeff.cpp:83

◆ InterpCoeff2D() [2/2]

void Nektar::LibUtilities::InterpCoeff2D ( const BasisKey fbasis0,
const BasisKey fbasis1,
const NekDouble from,
const BasisKey tbasis0,
const BasisKey tbasis1,
NekDouble to 
)

Definition at line 83 of file InterpCoeff.cpp.

References BasisManager(), Blas::Dgemm(), Nektar::LibUtilities::BasisKey::GetBasisType(), Nektar::LibUtilities::BasisKey::GetNumModes(), and Vmath::Vcopy().

89  {
90  const int fnm0 = fbasis0.GetNumModes();
91  const int fnm1 = fbasis1.GetNumModes();
92  const int tnm0 = tbasis0.GetNumModes();
93  const int tnm1 = tbasis1.GetNumModes();
94 
95  Array<OneD, NekDouble> wsp(tnm1 * fnm0);
96 
97  if (fbasis1.GetBasisType() == tbasis1.GetBasisType())
98  {
99  Vmath::Vcopy(fnm0*tnm1, from, 1, wsp.get(), 1);
100  }
101  else
102  {
103  // interpolate
104  DNekMatSharedPtr ft1 = BasisManager()[fbasis1]->GetI(tbasis1);
105 
106  Blas::Dgemm('N', 'T', fnm0, tnm1, fnm1, 1.0, from, fnm0,
107  ft1->GetPtr().get(), tnm1, 0.0, wsp.get(), fnm0);
108  }
109 
110  if (fbasis0.GetBasisType() == tbasis0.GetBasisType())
111  {
112  Vmath::Vcopy(tnm0*tnm1, wsp.get(), 1, to, 1);
113  }
114  else
115  {
116  // interpolate
117  DNekMatSharedPtr ft0 = BasisManager()[fbasis0]->GetI(tbasis0);
118 
119  Blas::Dgemm('N', 'N', tnm0, tnm1, fnm0, 1.0, ft0->GetPtr().get(),
120  tnm0, wsp.get(), fnm0, 0.0, to, tnm0);
121  }
122  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where A[m x n], B[n x k], C[m x k].
Definition: Blas.hpp:213
BasisManagerT & BasisManager(void)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ InterpCoeff3D() [1/2]

void Nektar::LibUtilities::InterpCoeff3D ( const BasisKey fbasis0,
const BasisKey fbasis1,
const BasisKey fbasis2,
const Array< OneD, const NekDouble > &  from,
const BasisKey tbasis0,
const BasisKey tbasis1,
const BasisKey tbasis2,
Array< OneD, NekDouble > &  to 
)

Definition at line 124 of file InterpCoeff.cpp.

Referenced by Nektar::LocalRegions::HexExp::v_ReduceOrderCoeffs().

132  {
133  InterpCoeff3D(fbasis0, fbasis1, fbasis2, from.data(),
134  tbasis0, tbasis1, tbasis2, to. data());
135  }
void InterpCoeff3D(const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const NekDouble *from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, NekDouble *to)

◆ InterpCoeff3D() [2/2]

void Nektar::LibUtilities::InterpCoeff3D ( const BasisKey fbasis0,
const BasisKey fbasis1,
const BasisKey fbasis2,
const NekDouble from,
const BasisKey tbasis0,
const BasisKey tbasis1,
const BasisKey tbasis2,
NekDouble to 
)

Definition at line 137 of file InterpCoeff.cpp.

References BasisManager(), Blas::Dgemm(), and Nektar::LibUtilities::BasisKey::GetNumModes().

145  {
146  const int fnm0 = fbasis0.GetNumModes();
147  const int fnm1 = fbasis1.GetNumModes();
148  const int fnm2 = fbasis2.GetNumModes();
149  const int tnm0 = tbasis0.GetNumModes();
150  const int tnm1 = tbasis1.GetNumModes();
151  const int tnm2 = tbasis2.GetNumModes();
152 
153  Array<OneD, NekDouble> wsp1(tnm0 * tnm1 * fnm2);
154  Array<OneD, NekDouble> wsp2(tnm0 * fnm1 * fnm2);
155 
156  DNekMatSharedPtr ft0 = BasisManager()[fbasis0]->GetI(tbasis0);
157  DNekMatSharedPtr ft1 = BasisManager()[fbasis1]->GetI(tbasis1);
158  DNekMatSharedPtr ft2 = BasisManager()[fbasis2]->GetI(tbasis2);
159 
160  Blas::Dgemm('N', 'N', tnm0, fnm1*fnm2, fnm0, 1.0,
161  ft0->GetPtr().get(), tnm0, from, fnm0, 0.0,
162  wsp2.get(), tnm0);
163 
164  for (int i = 0; i < fnm2; i++)
165  {
166  Blas::Dgemm('N', 'T', tnm0, tnm1, fnm1, 1.0,
167  wsp2.get()+i*tnm0*fnm1, tnm0, ft1->GetPtr().get(),
168  tnm1, 0.0, wsp1.get()+i*tnm0*tnm1, tnm0);
169  }
170 
171  Blas::Dgemm('N', 'T', tnm0*tnm1, tnm2, fnm2, 1.0, wsp1.get(),
172  tnm0*tnm1, ft2->GetPtr().get(), tnm2,
173  0.0, to, tnm0*tnm1);
174  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where A[m x n], B[n x k], C[m x k].
Definition: Blas.hpp:213
BasisManagerT & BasisManager(void)

◆ NullBasisKey()

static const BasisKey Nektar::LibUtilities::NullBasisKey ( eNoBasisType  ,
,
NullPointsKey   
)
static

◆ NullPointsKey()

static const PointsKey Nektar::LibUtilities::NullPointsKey ( ,
eNoPointsType   
)
static

◆ NullTimeIntegrationSchemeKey()

static const TimeIntegrationSchemeKey Nektar::LibUtilities::NullTimeIntegrationSchemeKey ( eNoTimeIntegrationMethod  )
static

◆ operator!=() [1/4]

bool Nektar::LibUtilities::operator!= ( const GraphVertexObject x,
const GraphVertexObject y 
)

Definition at line 62 of file Graph.cpp.

References Nektar::LibUtilities::GraphVertexObject::m_id.

63  {
64  return (x.m_id != y.m_id);
65  }

◆ operator!=() [2/4]

bool Nektar::LibUtilities::operator!= ( const BasisKey x,
const BasisKey y 
)

Definition at line 891 of file Foundations/Basis.cpp.

892  {
893  return (!(x == y));
894  }

◆ operator!=() [3/4]

bool Nektar::LibUtilities::operator!= ( const BasisKey x,
const BasisKey y 
)

Definition at line 897 of file Foundations/Basis.cpp.

898  {
899  return (!(*x == y));
900  }

◆ operator!=() [4/4]

bool Nektar::LibUtilities::operator!= ( const BasisKey x,
const BasisKey y 
)

Definition at line 903 of file Foundations/Basis.cpp.

904  {
905  return (!(x == *y));
906  }

◆ operator<() [1/3]

bool Nektar::LibUtilities::operator< ( const BasisKey lhs,
const BasisKey rhs 
)

Definition at line 51 of file Foundations/Basis.cpp.

References Nektar::LibUtilities::BasisKey::GetPointsKey(), Nektar::LibUtilities::BasisKey::m_basistype, and Nektar::LibUtilities::BasisKey::m_nummodes.

Referenced by Nektar::LibUtilities::TimeIntegrationSchemeKey::operator!=(), and Nektar::LibUtilities::TimeIntegrationSchemeKey::TimeIntegrationSchemeKey().

52  {
53  PointsKey lhsPointsKey = lhs.GetPointsKey();
54  PointsKey rhsPointsKey = rhs.GetPointsKey();
55 
56  if (lhsPointsKey < rhsPointsKey)
57  {
58  return true;
59  }
60  if (lhsPointsKey != rhsPointsKey)
61  {
62  return false;
63  }
64 
65  if (lhs.m_nummodes < rhs.m_nummodes)
66  {
67  return true;
68  }
69  if (lhs.m_nummodes > rhs.m_nummodes)
70  {
71  return false;
72  }
73 
74  return (lhs.m_basistype < rhs.m_basistype);
75  }
StandardMatrixTag & lhs
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator<() [2/3]

bool Nektar::LibUtilities::operator< ( const PointsKey lhs,
const PointsKey rhs 
)

Definition at line 54 of file Foundations/Points.cpp.

References Nektar::LibUtilities::PointsKey::m_factor, Nektar::LibUtilities::PointsKey::m_numpoints, and Nektar::LibUtilities::PointsKey::m_pointstype.

55  {
56  if (lhs.m_pointstype < rhs.m_pointstype)
57  {
58  return true;
59  }
60 
61  if (lhs.m_pointstype > rhs.m_pointstype)
62  {
63  return false;
64  }
65 
66  if (lhs.m_numpoints < rhs.m_numpoints)
67  {
68  return true;
69  }
70 
71  if (lhs.m_numpoints > rhs.m_numpoints)
72  {
73  return false;
74  }
75 
76  if(lhs.m_factor < rhs.m_factor)
77  {
78  return true;
79  }
80 
81  if(lhs.m_factor > rhs.m_factor)
82  {
83  return true;
84  }
85 
86  return false;
87  }
StandardMatrixTag & lhs
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator<() [3/3]

bool Nektar::LibUtilities::operator< ( const TimeIntegrationSchemeKey lhs,
const TimeIntegrationSchemeKey rhs 
)

Definition at line 57 of file TimeIntegrationScheme.cpp.

References Nektar::LibUtilities::TimeIntegrationSchemeKey::m_method.

58  {
59  return (lhs.m_method < rhs.m_method);
60  }
StandardMatrixTag & lhs
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator<<() [1/5]

std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const TimeIntegrationSchemeKey rhs 
)

Definition at line 67 of file TimeIntegrationScheme.cpp.

References Nektar::LibUtilities::TimeIntegrationSchemeKey::GetIntegrationMethod(), and TimeIntegrationMethodMap.

68  {
69  os << "Time Integration Scheme: " << TimeIntegrationMethodMap[rhs.GetIntegrationMethod()] << std::endl;
70 
71  return os;
72  }
const char *const TimeIntegrationMethodMap[]
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator<<() [2/5]

std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const BasisKey rhs 
)

Definition at line 87 of file Foundations/Basis.cpp.

References BasisTypeMap, Nektar::LibUtilities::BasisKey::GetBasisType(), Nektar::LibUtilities::BasisKey::GetNumModes(), and Nektar::LibUtilities::BasisKey::GetPointsKey().

Referenced by Nektar::LibUtilities::Basis::Basis(), operator<<(), and Nektar::LibUtilities::TimeIntegrationSchemeKey::TimeIntegrationSchemeKey().

88  {
89  os << "NumModes: " << rhs.GetNumModes() << " BasisType: " << BasisTypeMap[rhs.GetBasisType()];
90  os << " " << rhs.GetPointsKey() << std::endl;
91 
92  return os;
93  }
const char *const BasisTypeMap[]
Definition: Foundations.hpp:46
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator<<() [3/5]

std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const PointsKey rhs 
)

Definition at line 94 of file Foundations/Points.cpp.

References Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::LibUtilities::PointsKey::GetPointsType(), and kPointsTypeStr.

95  {
96  os << "NumPoints: " << rhs.GetNumPoints() << " PointsType: " << kPointsTypeStr[rhs.GetPointsType()] << std::endl;
97 
98  return os;
99  }
const std::string kPointsTypeStr[]
Definition: Foundations.hpp:70
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator<<() [4/5]

std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const TimeIntegrationSchemeSharedPtr rhs 
)

Definition at line 1929 of file TimeIntegrationScheme.cpp.

References operator<<().

1930  {
1931  return operator<<(os,*rhs);
1932  }
std::ostream & operator<<(std::ostream &os, const TimeIntegrationScheme &rhs)
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator<<() [5/5]

std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const TimeIntegrationScheme rhs 
)

Definition at line 1934 of file TimeIntegrationScheme.cpp.

References Nektar::LibUtilities::TimeIntegrationScheme::A(), Nektar::LibUtilities::TimeIntegrationScheme::A_IMEX(), Nektar::LibUtilities::TimeIntegrationScheme::B(), Nektar::LibUtilities::TimeIntegrationScheme::B_IMEX(), eIMEX, Nektar::LibUtilities::TimeIntegrationScheme::GetIntegrationMethod(), Nektar::LibUtilities::TimeIntegrationScheme::GetIntegrationSchemeType(), Nektar::LibUtilities::TimeIntegrationScheme::GetNstages(), Nektar::LibUtilities::TimeIntegrationScheme::GetNsteps(), TimeIntegrationMethodMap, TimeIntegrationSchemeTypeMap, Nektar::LibUtilities::TimeIntegrationScheme::U(), and Nektar::LibUtilities::TimeIntegrationScheme::V().

1935  {
1936  int i,j;
1937  int r = rhs.GetNsteps();
1938  int s = rhs.GetNstages();
1939  TimeIntegrationSchemeType type = rhs.GetIntegrationSchemeType();
1940 
1941  int oswidth = 9;
1942  int osprecision = 6;
1943 
1944  os << "Time Integration Scheme: " << TimeIntegrationMethodMap[rhs.GetIntegrationMethod()] << std::endl;
1945  os << "- number of steps: " << r << std::endl;
1946  os << "- number of stages: " << s << std::endl;
1947  os << "- type of scheme: " << TimeIntegrationSchemeTypeMap[rhs.GetIntegrationSchemeType()] << std::endl;
1948  os << "General linear method tableau: " << std::endl;
1949 
1950  for(i = 0; i < s; i++)
1951  {
1952  for(j = 0; j < s; j++)
1953  {
1954  os.width(oswidth);
1955  os.precision(osprecision);
1956  os << std::right << rhs.A(i,j) << " ";
1957  }
1958  if(type == eIMEX)
1959  {
1960  os << " '";
1961  for(j = 0; j < s; j++)
1962  {
1963  os.width(oswidth);
1964  os.precision(osprecision);
1965  os << std::right << rhs.A_IMEX(i,j) << " ";
1966  }
1967  }
1968  os << " |";
1969 
1970  for(j = 0; j < r; j++)
1971  {
1972  os.width(oswidth);
1973  os.precision(osprecision);
1974  os << std::right << rhs.U(i,j);
1975  }
1976  os << std::endl;
1977  }
1978  int imexflag = (type == eIMEX)?2:1;
1979  for(int i = 0; i < (r+imexflag*s)*(oswidth+1)+imexflag*2-1; i++)
1980  {
1981  os << "-";
1982  }
1983  os << std::endl;
1984  for(i = 0; i < r; i++)
1985  {
1986  for(j = 0; j < s; j++)
1987  {
1988  os.width(oswidth);
1989  os.precision(osprecision);
1990  os << std::right << rhs.B(i,j) << " ";
1991  }
1992  if(type == eIMEX)
1993  {
1994  os << " '";
1995  for(j = 0; j < s; j++)
1996  {
1997  os.width(oswidth);
1998  os.precision(osprecision);
1999  os << std::right << rhs.B_IMEX(i,j) << " ";
2000  }
2001  }
2002  os << " |";
2003 
2004  for(j = 0; j < r; j++)
2005  {
2006  os.width(oswidth);
2007  os.precision(osprecision);
2008  os << std::right << rhs.V(i,j);
2009  }
2010  os << std::endl;
2011  }
2012  return os;
2013  }
const char *const TimeIntegrationSchemeTypeMap[]
Implicit Explicit General Linear Method.
const char *const TimeIntegrationMethodMap[]
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator==() [1/6]

bool Nektar::LibUtilities::operator== ( const PointsKey lhs,
const PointsKey rhs 
)

Definition at line 48 of file Foundations/Points.cpp.

References Nektar::LibUtilities::PointsKey::m_numpoints, and Nektar::LibUtilities::PointsKey::m_pointstype.

49  {
50  return (lhs.m_numpoints == rhs.m_numpoints &&
51  lhs.m_pointstype == rhs.m_pointstype);
52  }
StandardMatrixTag & lhs
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator==() [2/6]

bool Nektar::LibUtilities::operator== ( const TimeIntegrationSchemeKey lhs,
const TimeIntegrationSchemeKey rhs 
)

Definition at line 52 of file TimeIntegrationScheme.cpp.

References Nektar::LibUtilities::TimeIntegrationSchemeKey::m_method.

53  {
54  return (lhs.m_method == rhs.m_method);
55  }
StandardMatrixTag & lhs
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ operator==() [3/6]

bool Nektar::LibUtilities::operator== ( const GraphVertexObject x,
const GraphVertexObject y 
)

Definition at line 57 of file Graph.cpp.

References Nektar::LibUtilities::GraphVertexObject::m_id.

58  {
59  return (x.m_id == y.m_id);
60  }

◆ operator==() [4/6]

bool Nektar::LibUtilities::operator== ( const BasisKey x,
const BasisKey y 
)

Definition at line 871 of file Foundations/Basis.cpp.

References Nektar::LibUtilities::BasisKey::GetNumModes(), Nektar::LibUtilities::BasisKey::GetPointsKey(), and Nektar::LibUtilities::BasisKey::m_basistype.

Referenced by Nektar::LibUtilities::TimeIntegrationSchemeKey::operator!=(), and Nektar::LibUtilities::TimeIntegrationSchemeKey::TimeIntegrationSchemeKey().

872  {
873  return (x.GetPointsKey() == y.GetPointsKey() &&
874  x.m_basistype == y.m_basistype &&
875  x.GetNumModes() == y.GetNumModes());
876  }

◆ operator==() [5/6]

bool Nektar::LibUtilities::operator== ( const BasisKey x,
const BasisKey y 
)

Definition at line 879 of file Foundations/Basis.cpp.

880  {
881  return (*x == y);
882  }

◆ operator==() [6/6]

bool Nektar::LibUtilities::operator== ( const BasisKey x,
const BasisKey y 
)

Definition at line 885 of file Foundations/Basis.cpp.

886  {
887  return (x == *y);
888  }

◆ operator>()

bool Nektar::LibUtilities::operator> ( const BasisKey lhs,
const BasisKey rhs 
)

Definition at line 77 of file Foundations/Basis.cpp.

Referenced by Nektar::LibUtilities::Basis::Basis().

78  {
79  return (rhs < lhs);
80  }
StandardMatrixTag & lhs
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs

◆ PhysGalerkinProject1D() [1/4]

void Nektar::LibUtilities::PhysGalerkinProject1D ( const BasisKey fbasis0,
const Array< OneD, const NekDouble > &  from,
const BasisKey tbasis0,
Array< OneD, NekDouble > &  to 
)

Definition at line 52 of file PhysGalerkinProject.cpp.

References Nektar::LibUtilities::BasisKey::GetPointsKey().

Referenced by PhysGalerkinProject1D().

56  {
57  PhysGalerkinProject1D(fbasis0.GetPointsKey(),from,tbasis0.GetPointsKey(),to);
58  }
void PhysGalerkinProject1D(const PointsKey &fpoints0, const NekDouble *from, const PointsKey &tpoints0, NekDouble *to)

◆ PhysGalerkinProject1D() [2/4]

void Nektar::LibUtilities::PhysGalerkinProject1D ( const PointsKey fpoints0,
const Array< OneD, const NekDouble > &  from,
const PointsKey tpoints0,
Array< OneD, NekDouble > &  to 
)

Definition at line 60 of file PhysGalerkinProject.cpp.

References Nektar::eWrapper, Nektar::LibUtilities::PointsKey::GetNumPoints(), PointsManager(), and Vmath::Vcopy().

64  {
65  if(fpoints0 == tpoints0) //check to see if the same
66  {
67  Vmath::Vcopy(fpoints0.GetNumPoints(),from,1,to,1);
68  }
69  else // interpolate
70  {
71  DNekMatSharedPtr GP0;
72 
73  GP0 = PointsManager()[tpoints0]->GetGalerkinProjection(fpoints0);
74 
75  NekVector<NekDouble> in(fpoints0.GetNumPoints(),from,eWrapper);
76  NekVector<NekDouble> out(tpoints0.GetNumPoints(),to,eWrapper);
77 
78  GP0->Transpose();
79  out = (*GP0)*in;
80  }
81  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
PointsManagerT & PointsManager(void)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ PhysGalerkinProject1D() [3/4]

void Nektar::LibUtilities::PhysGalerkinProject1D ( const BasisKey fbasis0,
const NekDouble from,
const BasisKey tbasis0,
NekDouble to 
)

Definition at line 83 of file PhysGalerkinProject.cpp.

References Nektar::LibUtilities::BasisKey::GetPointsKey(), and PhysGalerkinProject1D().

87  {
88  PhysGalerkinProject1D(fbasis0.GetPointsKey(),from,tbasis0.GetPointsKey(),to);
89  }
void PhysGalerkinProject1D(const PointsKey &fpoints0, const NekDouble *from, const PointsKey &tpoints0, NekDouble *to)

◆ PhysGalerkinProject1D() [4/4]

void Nektar::LibUtilities::PhysGalerkinProject1D ( const PointsKey fpoints0,
const NekDouble from,
const PointsKey tpoints0,
NekDouble to 
)

Definition at line 91 of file PhysGalerkinProject.cpp.

References Blas::Dgemv(), Nektar::LibUtilities::PointsKey::GetNumPoints(), PointsManager(), and Vmath::Vcopy().

95  {
96  if(fpoints0 == tpoints0) //check to see if the same
97  {
98  Vmath::Vcopy(fpoints0.GetNumPoints(),from,1,to,1);
99  }
100  else // interpolate
101  {
102 
103  DNekMatSharedPtr GP0;
104 
105  GP0 = PointsManager()[tpoints0]
106  ->GetGalerkinProjection(fpoints0);
107 
108  Blas::Dgemv('T', tpoints0.GetNumPoints(), fpoints0.GetNumPoints(),
109  1.0, GP0->GetPtr().get(), tpoints0.GetNumPoints(),
110  from, 1, 0.0, to, 1);
111  }
112  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
PointsManagerT & PointsManager(void)
static void Dgemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = A x where A[m x n].
Definition: Blas.hpp:168
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ PhysGalerkinProject2D() [1/3]

void Nektar::LibUtilities::PhysGalerkinProject2D ( const BasisKey fbasis0,
const BasisKey fbasis1,
const Array< OneD, const NekDouble > &  from,
const BasisKey tbasis0,
const BasisKey tbasis1,
Array< OneD, NekDouble > &  to 
)

Definition at line 115 of file PhysGalerkinProject.cpp.

References Nektar::LibUtilities::BasisKey::GetPointsKey().

Referenced by PhysGalerkinProject2D(), and Nektar::MultiRegions::ExpList2D::v_PhysGalerkinProjection1DScaled().

121  {
122  PhysGalerkinProject2D(fbasis0.GetPointsKey(),fbasis1.GetPointsKey(),from.data(),
123  tbasis0.GetPointsKey(),tbasis1.GetPointsKey(),to.data());
124  }
void PhysGalerkinProject2D(const PointsKey &fpoints0, const PointsKey &fpoints1, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, NekDouble *to)

◆ PhysGalerkinProject2D() [2/3]

void Nektar::LibUtilities::PhysGalerkinProject2D ( const PointsKey fpoints0,
const PointsKey fpoints1,
const Array< OneD, const NekDouble > &  from,
const PointsKey tpoints0,
const PointsKey tpoints1,
Array< OneD, NekDouble > &  to 
)

Definition at line 126 of file PhysGalerkinProject.cpp.

References PhysGalerkinProject2D().

132  {
133  PhysGalerkinProject2D(fpoints0,fpoints1,from.data(),tpoints0,tpoints1,to.data());
134  }
void PhysGalerkinProject2D(const PointsKey &fpoints0, const PointsKey &fpoints1, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, NekDouble *to)

◆ PhysGalerkinProject2D() [3/3]

void Nektar::LibUtilities::PhysGalerkinProject2D ( const PointsKey fpoints0,
const PointsKey fpoints1,
const NekDouble from,
const PointsKey tpoints0,
const PointsKey tpoints1,
NekDouble to 
)

Definition at line 136 of file PhysGalerkinProject.cpp.

References Blas::Dgemm(), Nektar::LibUtilities::PointsKey::GetNumPoints(), PointsManager(), and Vmath::Vcopy().

142  {
143  DNekMatSharedPtr GP0,GP1;
144  Array<OneD, NekDouble> wsp(tpoints1.GetNumPoints()*fpoints0.GetNumPoints()); // fnp0*tnp1
145 
146  int fnp0 = fpoints0.GetNumPoints();
147  int fnp1 = fpoints1.GetNumPoints();
148  int tnp0 = tpoints0.GetNumPoints();
149  int tnp1 = tpoints1.GetNumPoints();
150 
151  if(fpoints1 == tpoints1)
152  {
153  Vmath::Vcopy(fnp0*tnp1,from,1,wsp.get(),1);
154  }
155  else
156  {
157  GP1 = PointsManager()[tpoints1]->GetGalerkinProjection(fpoints1);
158  Blas::Dgemm('N', 'T', fnp0, tnp1, fnp1, 1.0, from, fnp0,
159  GP1->GetPtr().get(), tnp1, 0.0, wsp.get(), fnp0);
160  }
161 
162  if(fpoints0 == tpoints0)
163  {
164  Vmath::Vcopy(tnp0*tnp1,wsp.get(),1,to,1);
165  }
166  else
167  {
168  GP0 = PointsManager()[tpoints0]->GetGalerkinProjection(fpoints0);
169  Blas::Dgemm('N', 'N', tnp0, tnp1, fnp0, 1.0,
170  GP0->GetPtr().get(),
171  tnp0, wsp.get(), fnp0, 0.0, to, tnp0);
172  }
173  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where A[m x n], B[n x k], C[m x k].
Definition: Blas.hpp:213
PointsManagerT & PointsManager(void)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ PhysGalerkinProject3D() [1/3]

void Nektar::LibUtilities::PhysGalerkinProject3D ( const BasisKey fbasis0,
const BasisKey fbasis1,
const BasisKey fbasis2,
const Array< OneD, const NekDouble > &  from,
const BasisKey tbasis0,
const BasisKey tbasis1,
const BasisKey tbasis2,
Array< OneD, NekDouble > &  to 
)

Definition at line 177 of file PhysGalerkinProject.cpp.

References Nektar::LibUtilities::BasisKey::GetPointsKey().

Referenced by PhysGalerkinProject3D(), and Nektar::MultiRegions::ExpList3D::v_PhysGalerkinProjection1DScaled().

185  {
186  PhysGalerkinProject3D(fbasis0.GetPointsKey(),
187  fbasis1.GetPointsKey(),
188  fbasis2.GetPointsKey(),
189  from.data(),
190  tbasis0.GetPointsKey(),
191  tbasis1.GetPointsKey(),
192  tbasis2.GetPointsKey(),
193  to.data());
194  }
void PhysGalerkinProject3D(const PointsKey &fpoints0, const PointsKey &fpoints1, const PointsKey &fpoints2, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, NekDouble *to)

◆ PhysGalerkinProject3D() [2/3]

void Nektar::LibUtilities::PhysGalerkinProject3D ( const PointsKey fpoints0,
const PointsKey fpoints1,
const PointsKey fpoints2,
const Array< OneD, const NekDouble > &  from,
const PointsKey tpoints0,
const PointsKey tpoints1,
const PointsKey tpoints2,
Array< OneD, NekDouble > &  to 
)

Definition at line 196 of file PhysGalerkinProject.cpp.

References PhysGalerkinProject3D().

204  {
205  PhysGalerkinProject3D(fpoints0,fpoints1,fpoints2,from.data(),
206  tpoints0,tpoints1,tpoints2,to.data());
207  }
void PhysGalerkinProject3D(const PointsKey &fpoints0, const PointsKey &fpoints1, const PointsKey &fpoints2, const NekDouble *from, const PointsKey &tpoints0, const PointsKey &tpoints1, const PointsKey &tpoints2, NekDouble *to)

◆ PhysGalerkinProject3D() [3/3]

void Nektar::LibUtilities::PhysGalerkinProject3D ( const PointsKey fpoints0,
const PointsKey fpoints1,
const PointsKey fpoints2,
const NekDouble from,
const PointsKey tpoints0,
const PointsKey tpoints1,
const PointsKey tpoints2,
NekDouble to 
)

Definition at line 209 of file PhysGalerkinProject.cpp.

References Blas::Dgemm(), Nektar::LibUtilities::PointsKey::GetNumPoints(), and PointsManager().

217  {
218  DNekMatSharedPtr GP0,GP1,GP2;
219 
220  int fnp0 = fpoints0.GetNumPoints();
221  int fnp1 = fpoints1.GetNumPoints();
222  int fnp2 = fpoints2.GetNumPoints();
223  int tnp0 = tpoints0.GetNumPoints();
224  int tnp1 = tpoints1.GetNumPoints();
225  int tnp2 = tpoints2.GetNumPoints();
226 
227  Array<OneD, NekDouble> wsp1(fnp0*tnp1*tnp2);
228  Array<OneD, NekDouble> wsp2(fnp0*fnp1*tnp2);
229 
230  GP2 = PointsManager()[tpoints2]->GetGalerkinProjection(fpoints2);
231  Blas::Dgemm('N', 'T', fnp0*fnp1, tnp2, fnp2, 1.0, from, fnp0*fnp1,
232  GP2->GetPtr().get(), tnp2, 0.0, wsp2.get(), fnp0*fnp1);
233 
234  GP1 = PointsManager()[tpoints1]->GetGalerkinProjection(fpoints1);
235  for(int i = 0; i < tnp2; i++)
236  {
237  Blas::Dgemm('N', 'T', fnp0, tnp1, fnp1, 1.0,
238  wsp2.get()+i*fnp0*fnp1,
239  fnp0, GP1->GetPtr().get(),tnp1, 0.0,
240  wsp1.get()+i*fnp0*tnp1,
241  fnp0);
242  }
243 
244  GP0 = PointsManager()[tpoints0]->GetGalerkinProjection(fpoints0);
245  Blas::Dgemm('N', 'N', tnp0, tnp1*tnp2, fnp0, 1.0,
246  GP0->GetPtr().get(), tnp0, wsp1.get(), fnp0, 0.0,
247  to, tnp0);
248  }
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
static void Dgemm(const char &transa, const char &transb, const int &m, const int &n, const int &k, const double &alpha, const double *a, const int &lda, const double *b, const int &ldb, const double &beta, double *c, const int &ldc)
BLAS level 3: Matrix-matrix multiply C = A x B where A[m x n], B[n x k], C[m x k].
Definition: Blas.hpp:213
PointsManagerT & PointsManager(void)

◆ PointsManager()

PointsManagerT & Nektar::LibUtilities::PointsManager ( void  )

Definition at line 42 of file ManagerAccess.cpp.

Referenced by Nektar::Utilities::ProcessBL::BoundaryLayer2D(), Nektar::Utilities::ProcessBL::BoundaryLayer3D(), Nektar::Utilities::ProcessVarOpti::BuildDerivUtil(), Nektar::LibUtilities::GaussPoints::CalculateGalerkinProjectionMatrix(), Nektar::LibUtilities::NodalPrismSPI::CalculatePoints(), Nektar::LibUtilities::NodalQuadElec::CalculatePoints(), Nektar::LibUtilities::NodalHexElec::CalculatePoints(), Nektar::LibUtilities::NodalPrismElec::CalculatePoints(), Nektar::LibUtilities::PolyEPoints::CalculateWeights(), Nektar::LibUtilities::FourierSingleModePoints::CreateMatrix(), Nektar::LibUtilities::FourierPoints::CreateMatrix(), Nektar::LibUtilities::GaussPoints::CreateMatrix(), Nektar::LibUtilities::BLPoints::CreateMatrix(), Nektar::LibUtilities::Basis::GenBasis(), Nektar::LibUtilities::NodalTetElec::GetI(), Nektar::LibUtilities::NodalTriElec::GetI(), Nektar::LibUtilities::PolyEPoints::GetI(), Nektar::LibUtilities::NodalPrismElec::GetI(), Nektar::LibUtilities::NodalTriEvenlySpaced::GetI(), Nektar::LibUtilities::NodalTriFekete::GetI(), Nektar::LibUtilities::NodalPrismEvenlySpaced::GetI(), Nektar::LibUtilities::NodalTetEvenlySpaced::GetI(), Nektar::StdRegions::StdNodalPrismExp::GetNodalPoints(), Nektar::StdRegions::StdNodalTetExp::GetNodalPoints(), Nektar::StdRegions::StdNodalTriExp::GetNodalPoints(), Interp1D(), Interp2D(), Interp3D(), Nektar::Utilities::InputNek::LoadHOSurfaces(), Nektar::NekMeshUtils::Line::MakeOrder(), Nektar::NekMeshUtils::Prism::MakeOrder(), Nektar::NekMeshUtils::Quadrilateral::MakeOrder(), Nektar::NekMeshUtils::Tetrahedron::MakeOrder(), Nektar::NekMeshUtils::Triangle::MakeOrder(), Nektar::NekMeshUtils::Hexahedron::MakeOrder(), Nektar::NekMeshUtils::Edge::MakeOrder(), Nektar::NekMeshUtils::Face::MakeOrder(), Nektar::Utilities::ElUtil::MappingIdealToRef(), PhysGalerkinProject1D(), PhysGalerkinProject2D(), PhysGalerkinProject3D(), Points_Create(), Nektar::MultiRegions::ExpList1D::PostProcess(), Nektar::NekMeshUtils::HOSurfaceMesh::Process(), Nektar::Utilities::InputNek5000::Process(), Nektar::Utilities::ProcessTetSplit::Process(), Nektar::Utilities::ProcessProjectCAD::Process(), Nektar::NekMeshUtils::BLMesh::Setup(), Nektar::MultiRegions::LocTraceToTraceMap::Setup2D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup3D(), Nektar::SpatialDomains::TriGeom::v_FillGeom(), and Nektar::SpatialDomains::SegGeom::v_FillGeom().

43 {
44  static PointsManagerT instance;
45  return instance;
46 }
NekManager< PointsKey, Points< NekDouble >, PointsKey::opLess > PointsManagerT
Definition: ManagerAccess.h:49

◆ PortablePath()

std::string Nektar::LibUtilities::PortablePath ( const boost::filesystem::path &  path)

◆ PrintProgressbar()

int Nektar::LibUtilities::PrintProgressbar ( const int  position,
const int  goal,
const std::string  message,
int  lastprogress = -1 
)
inline

Prints a progressbar.

Parameters
positionState of the current process
goalGoal of the current process
messageShort Description of the current process

This function plots a simple progressbar to the console or log file to visualize the current state of an ongoing process. Make sure you minimize calling this routine. Ideally, this should be called only when the percentage is increased by an integer.

Definition at line 67 of file Progressbar.hpp.

References ISTTY.

Referenced by Nektar::NekMeshUtils::Octree::CompileSourcePointList(), Nektar::Utilities::ProcessVarOpti::CreateColoursets(), Nektar::Utilities::ProcessSpherigon::FindNormalFromPlyFile(), Nektar::FieldUtils::Iso::GlobalCondense(), Nektar::NekMeshUtils::Mesh::MakeOrder(), Nektar::FieldUtils::ProcessInterpField::PrintProgressbar(), Nektar::FieldUtils::ProcessInterpPoints::PrintProgressbar(), Nektar::FieldUtils::ProcessInterpPtsToPts::PrintProgressbar(), Nektar::FieldUtils::ProcessInterpPointDataToFld::PrintProgressbar(), Nektar::SolverUtils::SessionFunction::PrintProgressbar(), Nektar::SolverUtils::EquationSystem::PrintProgressbar(), Nektar::NekMeshUtils::HOSurfaceMesh::Process(), Nektar::NekMeshUtils::SurfaceMesh::Process(), Nektar::NekMeshUtils::Generator2D::Process(), Nektar::Utilities::ProcessProjectCAD::Process(), and Nektar::FieldUtils::Iso::SeparateRegions().

70 {
71  std::cout.unsetf ( std::ios::floatfield );
72  if (ISTTY)
73  {
74  float progress = position / float(goal);
75  int numeq = static_cast<int>(ceil(progress *49));
76  if(lastprogress == numeq)
77  {
78  return numeq;
79  }
80  else
81  {
82  // carriage return
83  std::cout << "\r";
84 
85  std::cout << message << ": ";
86 
87  std::cout << std::setw(3) << ceil(100 * progress) << "% [";
88  for (int j = 0; j < numeq; j++)
89  {
90  std::cout << "=";
91  }
92  for (int j = numeq; j < 49; j++)
93  {
94  std::cout << " ";
95  }
96  std::cout << "]" << std::flush;
97  return numeq;
98  }
99  }
100  else
101  {
102  // print only every 2 percent
103  if (int(ceil(double(100 * position / goal))) % 2 == 0)
104  {
105  std::cout << "." << std::flush;
106  }
107  return -1;
108  }
109 }
#define ISTTY
Definition: Progressbar.hpp:47

◆ rad()

static NekDouble Nektar::LibUtilities::rad ( NekDouble  x,
NekDouble  y 
)
static

◆ sign()

NekDouble Nektar::LibUtilities::sign ( NekDouble  arg)

Definition at line 70 of file Interpreter.cpp.

Referenced by Nektar::LibUtilities::Interpreter::ExpressionEvaluator::ExpressionEvaluator(), and Nektar::LibUtilities::functions::functions().

71 {
72  return (arg > 0.0) - (arg < 0.0);
73 }

◆ TimeIntegrationSchemeManager()

TimeIntegrationSchemeManagerT & Nektar::LibUtilities::TimeIntegrationSchemeManager ( void  )

Definition at line 44 of file TimeIntegrationScheme.cpp.

References Nektar::LibUtilities::TimeIntegrationScheme::Create(), and Nektar::LibUtilities::NekManager< KeyType, ValueT, opLessCreator >::RegisterGlobalCreator().

Referenced by Nektar::LibUtilities::TimeIntegrationIMEXOrder1::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXOrder3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXOrder4::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_1_1_1::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_1_2_1::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_1_2_2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_4_4_3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_2_2_2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_2_3_3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_2_3_2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXdirk_3_4_3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationForwardEuler::v_InitObject(), Nektar::LibUtilities::TimeIntegrationBackwardEuler::v_InitObject(), Nektar::LibUtilities::TimeIntegrationBDFImplicitOrder1::v_InitObject(), Nektar::LibUtilities::TimeIntegrationBDFImplicitOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationMidpoint::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta2_ImprovedEuler::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta2_SSP::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta3_SSP::v_InitObject(), Nektar::LibUtilities::TimeIntegrationClassicalRungeKutta4::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta4::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta5::v_InitObject(), Nektar::LibUtilities::TimeIntegrationDIRKOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationDIRKOrder3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder4::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsMoultonOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXGear::v_InitObject(), Nektar::LibUtilities::TimeIntegrationCNAB::v_InitObject(), and Nektar::LibUtilities::TimeIntegrationMCNAB::v_InitObject().

45  {
46  static TimeIntegrationSchemeManagerT instance;
47  instance.RegisterGlobalCreator(TimeIntegrationScheme::Create);
48  return instance;
49  }
NekManager< TimeIntegrationSchemeKey, TimeIntegrationScheme, TimeIntegrationSchemeKey::opLess > TimeIntegrationSchemeManagerT

◆ Write()

void Nektar::LibUtilities::Write ( const std::string &  outFile,
std::vector< FieldDefinitionsSharedPtr > &  fielddefs,
std::vector< std::vector< NekDouble > > &  fielddata,
const FieldMetaDataMap fieldinfomap,
const bool  backup 
)

This function allows for data to be written to an FLD file when a session and/or communicator is not instantiated. Typically used in utilities which do not take XML input and operate in serial only.

Parameters
outFileOutput filename
fielddefsField definitions that define the output
fielddataBinary field data that stores the output corresponding to fielddefs.
fieldinfomapAssociated field metadata map.

Definition at line 249 of file FieldIO.cpp.

References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), GetCommFactory(), and GetFieldIOFactory().

Referenced by main(), Nektar::PulseWaveSystem::WriteVessels(), and Nektar::LibUtilities::FieldIO::~FieldIO().

254 {
255 #ifdef NEKTAR_USE_MPI
256  int size;
257  int init;
258  MPI_Initialized(&init);
259 
260  // If MPI has been initialised we can check the number of processes
261  // and, if > 1, tell the user he should not be running this
262  // function in parallel. If it is not initialised, we do not
263  // initialise it here, and assume the user knows what they are
264  // doing.
265  if (init)
266  {
267  MPI_Comm_size(MPI_COMM_WORLD, &size);
268  ASSERTL0(size == 1,
269  "This static function is not available in parallel. Please"
270  "instantiate a FieldIO object for parallel use.");
271  }
272 #endif
273  CommSharedPtr c = GetCommFactory().CreateInstance("Serial", 0, 0);
274  FieldIOSharedPtr f = GetFieldIOFactory().CreateInstance("Xml", c, false);
275  f->Write(outFile, fielddefs, fielddata, fieldinfomap, backup);
276 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
Definition: Comm.h:53
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory.
Definition: FieldIO.cpp:72
CommFactory & GetCommFactory()
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
std::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:306

Variable Documentation

◆ BasisTypeMap

const char* const Nektar::LibUtilities::BasisTypeMap[]
Initial value:
=
{
"NoBasisType",
"Ortho_A",
"Ortho_B",
"Ortho_C",
"Modified_A",
"Modified_B",
"Modified_C",
"OrthoPyr_C",
"ModifiedPyr_C",
"Fourier",
"GLL_Lagrange",
"Gauss_Lagrange",
"Legendre",
"Chebyshev",
"Monomial",
"FourierSingleMode",
"FourierHalfModeRe",
"FourierHalfModeIm"
}

Definition at line 46 of file Foundations.hpp.

Referenced by export_Basis(), Nektar::LibUtilities::FieldIOXml::ImportFieldDefs(), operator<<(), Nektar::SpatialDomains::MeshGraph::ReadExpansions(), Nektar::SolverUtils::DriverAdaptive::ReplaceExpansion(), and Nektar::LibUtilities::FieldIOXml::v_Write().

◆ EndianTypeMap

const std::string Nektar::LibUtilities::EndianTypeMap[]
Initial value:
=
{
"UnknownEndian",
"BigEndian",
"LittleEndian",
"BigWordEndian",
"LittleWordEndian"
}

Definition at line 59 of file CompressData.h.

Referenced by Nektar::LibUtilities::CompressData::GetCompressString().

◆ fldCmdFormat

std::string Nektar::LibUtilities::fldCmdFormat
Initial value:
= SessionReader::RegisterCmdLineArgument(
"io-format", "i", "Default input/output format (e.g. Xml, Hdf5)")

Definition at line 66 of file FieldIO.cpp.

◆ functions_p

Nektar::LibUtilities::functions Nektar::LibUtilities::functions_p
static

◆ FunctionTypeMap

const char* const Nektar::LibUtilities::FunctionTypeMap[]
Initial value:
=
{
"No Function type",
"Expression",
"File"
}

Definition at line 92 of file SessionReader.h.

◆ kPointsTypeStr

const std::string Nektar::LibUtilities::kPointsTypeStr[]

◆ NodalTetElecAvailable

const unsigned int Nektar::LibUtilities::NodalTetElecAvailable = 10

Definition at line 23 of file NodalTetElecData.h.

◆ NodalTetElecData

const NekDouble Nektar::LibUtilities::NodalTetElecData[][9]
static

◆ NodalTetElecNPTS

const unsigned int Nektar::LibUtilities::NodalTetElecNPTS[NodalTetElecAvailable] = {1,2,3,5,6,9,11,15,18,23}
static

◆ NodalTetSPIAvailable

const unsigned int Nektar::LibUtilities::NodalTetSPIAvailable = 10

Definition at line 42 of file NodalTetSPIData.h.

◆ NodalTetSPIData

const NekDouble Nektar::LibUtilities::NodalTetSPIData[][4]
static

◆ NodalTetSPINPTS

const unsigned int Nektar::LibUtilities::NodalTetSPINPTS[NodalTetSPIAvailable]
static
Initial value:
= {
1, 4, 8, 14, 14, 28, 36, 81, 121, 180
}

Definition at line 43 of file NodalTetSPIData.h.

Referenced by Nektar::LibUtilities::NodalTetSPI::CalculatePoints(), and Nektar::LibUtilities::NodalTetSPI::CalculateWeights().

◆ NodalTriElecAvailable

const unsigned int Nektar::LibUtilities::NodalTriElecAvailable = 16

Definition at line 10 of file NodalTriElecData.h.

◆ NodalTriElecData

const NekDouble Nektar::LibUtilities::NodalTriElecData[][6]
static

◆ NodalTriElecNPTS

const unsigned int Nektar::LibUtilities::NodalTriElecNPTS[NodalTriElecAvailable] = {1,2,3,4,5,7,8,10,12,14,16,19,21,24,27,30}
static

◆ NodalTriFeketeAvailable

const unsigned int Nektar::LibUtilities::NodalTriFeketeAvailable = 16

Definition at line 10 of file NodalTriFeketeData.h.

◆ NodalTriFeketeData

const NekDouble Nektar::LibUtilities::NodalTriFeketeData[][6]
static

◆ NodalTriFeketeNPTS

const unsigned int Nektar::LibUtilities::NodalTriFeketeNPTS[NodalTriFeketeAvailable] = {1,2,3,4,5,7,8,10,12,14,16,19,21,24,27,30}
static

◆ NodalTriSPIAvailable

const unsigned int Nektar::LibUtilities::NodalTriSPIAvailable = 10

Definition at line 42 of file NodalTriSPIData.h.

◆ NodalTriSPIData

const NekDouble Nektar::LibUtilities::NodalTriSPIData[][3]
static

◆ NodalTriSPINPTS

const unsigned int Nektar::LibUtilities::NodalTriSPINPTS[NodalTriSPIAvailable]
static
Initial value:
= {
1, 3, 6, 6, 7, 13, 16, 18, 22, 25
}

Definition at line 43 of file NodalTriSPIData.h.

Referenced by Nektar::LibUtilities::NodalTriSPI::CalculatePoints(), and Nektar::LibUtilities::NodalTriSPI::CalculateWeights().

◆ NullBasisSharedPtr

BasisSharedPtr Nektar::LibUtilities::NullBasisSharedPtr
static

Definition at line 365 of file Basis.h.

Referenced by Nektar::MultiRegions::ExpList::v_GetHomogeneousBasis().

◆ NullBasisSharedPtr1DArray

Array<OneD, BasisSharedPtr> Nektar::LibUtilities::NullBasisSharedPtr1DArray
static

Definition at line 366 of file Basis.h.

Referenced by Nektar::MultiRegions::ExpList::GetNumElmts().

◆ NullFieldMetaDataMap

FieldMetaDataMap Nektar::LibUtilities::NullFieldMetaDataMap
static

◆ NullNekDoubleVector

std::vector<NekDouble> Nektar::LibUtilities::NullNekDoubleVector
static

Definition at line 809 of file SharedArray.hpp.

Referenced by Nektar::MultiRegions::ExpList::GetNumElmts().

◆ NullPointsTypeVector

std::vector<LibUtilities::PointsType> Nektar::LibUtilities::NullPointsTypeVector
static

Definition at line 84 of file PointsType.h.

◆ NullPtsField

PtsFieldSharedPtr Nektar::LibUtilities::NullPtsField
static

◆ NullPtsInfoMap

std::map<PtsInfo, int> Nektar::LibUtilities::NullPtsInfoMap
static

Definition at line 70 of file PtsField.h.

Referenced by Nektar::LibUtilities::PtsIO::v_ImportFieldData().

◆ NullPtsMetaDataMap

PtsMetaDataMap Nektar::LibUtilities::NullPtsMetaDataMap
static

Definition at line 58 of file PtsIO.h.

◆ NullUnsignedIntVector

std::vector<unsigned int> Nektar::LibUtilities::NullUnsignedIntVector
static

◆ NullVectorNekDoubleVector

std::vector<std::vector<NekDouble> > Nektar::LibUtilities::NullVectorNekDoubleVector = { NullNekDoubleVector }
static

◆ perm12A_3d

const unsigned int Nektar::LibUtilities::perm12A_3d[12][4]
static
Initial value:
= {{0,1,2,3},{0,1,3,2},{0,2,1,3},{0,2,3,1},{0,3,1,2},{0,3,2,1},
{2,0,1,3},{2,0,3,1},{2,3,0,1},{3,0,1,2},{3,0,2,1},{3,2,0,1}}

Definition at line 9 of file NodalTetElecData.h.

Referenced by Nektar::LibUtilities::NodalTetElec::CalculatePoints().

◆ perm12B_3d

const unsigned int Nektar::LibUtilities::perm12B_3d[12][4]
static
Initial value:
= {{0,1,2,3},{0,2,1,3},{0,2,3,1},{1,0,2,3},{1,2,0,3},{1,2,3,0},
{2,0,1,3},{2,0,3,1},{2,1,0,3},{2,1,3,0},{2,3,0,1},{2,3,1,0}}

Definition at line 11 of file NodalTetElecData.h.

Referenced by Nektar::LibUtilities::NodalTetElec::CalculatePoints().

◆ perm12C_3d

const unsigned int Nektar::LibUtilities::perm12C_3d[12][4]
static
Initial value:
= {{0,1,2,3},{0,1,3,2},{0,3,1,2},{1,0,2,3},{1,0,3,2},{1,2,0,3},
{1,2,3,0},{1,3,0,2},{1,3,2,0},{3,0,1,2},{3,1,0,2},{3,1,2,0}}

Definition at line 13 of file NodalTetElecData.h.

Referenced by Nektar::LibUtilities::NodalTetElec::CalculatePoints().

◆ perm24_3d

const unsigned int Nektar::LibUtilities::perm24_3d[24][4]
static
Initial value:
= {
{0,1,2,3},{0,1,3,2},{0,2,1,3},{0,2,3,1},{0,3,1,2},{0,3,2,1},
{1,0,2,3},{1,0,3,2},{1,2,0,3},{1,2,3,0},{1,3,0,2},{1,3,2,0},
{2,0,1,3},{2,0,3,1},{2,1,0,3},{2,1,3,0},{2,3,0,1},{2,3,1,0},
{3,0,1,2},{3,0,2,1},{3,1,0,2},{3,1,2,0},{3,2,0,1},{3,2,1,0}
}

Definition at line 16 of file NodalTetElecData.h.

Referenced by Nektar::LibUtilities::NodalTetElec::CalculatePoints().

◆ perm3A_2d [1/2]

const unsigned int Nektar::LibUtilities::perm3A_2d[3][3] = {{0,1,2},{2,0,1},{0,2,1}}
static

Definition at line 5 of file NodalTriFeketeData.h.

◆ perm3A_2d [2/2]

const unsigned int Nektar::LibUtilities::perm3A_2d[3][3] = {{0,1,2},{2,0,1},{0,2,1}}
static

◆ perm3B_2d [1/2]

const unsigned int Nektar::LibUtilities::perm3B_2d[3][3] = {{0,1,2},{1,0,2},{1,2,0}}
static

Definition at line 6 of file NodalTriFeketeData.h.

◆ perm3B_2d [2/2]

const unsigned int Nektar::LibUtilities::perm3B_2d[3][3] = {{0,1,2},{1,0,2},{1,2,0}}
static

◆ perm3C_2d

const unsigned int Nektar::LibUtilities::perm3C_2d[3][3] = {{0,1,2},{2,0,1},{1,2,0}}
static

Definition at line 7 of file NodalTriFeketeData.h.

◆ perm4_3d

const unsigned int Nektar::LibUtilities::perm4_3d[4][4] = {{0,1,2,3},{3,0,1,2},{2,3,0,1},{1,2,3,0}}
static

◆ perm6_2d [1/2]

const unsigned int Nektar::LibUtilities::perm6_2d[6][3]
static
Initial value:
= {{0,1,2},{1,0,2},{2,0,1},
{2,1,0},{0,2,1},{1,2,0}}

Definition at line 8 of file NodalTriFeketeData.h.

◆ perm6_2d [2/2]

const unsigned int Nektar::LibUtilities::perm6_2d[6][3]
static
Initial value:
= {{0,1,2},{1,0,2},{2,0,1},
{2,1,0},{0,2,1},{1,2,0}}

Definition at line 8 of file NodalTriElecData.h.

Referenced by Nektar::LibUtilities::NodalTriElec::CalculatePoints(), and Nektar::LibUtilities::NodalTriFekete::CalculatePoints().

◆ perm6_3d

const unsigned int Nektar::LibUtilities::perm6_3d[6][4] = {{0,1,2,3},{0,2,1,3},{0,2,3,1},{2,0,1,3},{2,0,3,1},{2,3,0,1}}
static

◆ ReduceOperatorMap

const char* const Nektar::LibUtilities::ReduceOperatorMap[]
Initial value:
=
{
"ReduceSum",
"ReduceMax",
"ReduceMin"
}

Definition at line 73 of file Comm.h.

Referenced by export_Comm().

◆ ShapeTypeDimMap

const unsigned int Nektar::LibUtilities::ShapeTypeDimMap[SIZE_ShapeType]
Initial value:
=
{
0,
0,
1,
2,
2,
3,
3,
3,
3,
}

Definition at line 82 of file ShapeType.hpp.

Referenced by Nektar::StdRegions::operator<(), Nektar::StdRegions::operator<<(), and Nektar::StdRegions::operator==().

◆ ShapeTypeMap

const char* const Nektar::LibUtilities::ShapeTypeMap[]

◆ TimeIntegrationMethodMap

const char* const Nektar::LibUtilities::TimeIntegrationMethodMap[]

◆ TimeIntegrationSchemeTypeMap

const char* const Nektar::LibUtilities::TimeIntegrationSchemeTypeMap[]
Initial value:
=
{
"NoTimeIntegrationSchemeType",
"Explicit",
"DiagonallyImplicit",
"IMEX",
"Implicit"
}

Definition at line 155 of file TimeIntegrationScheme.h.

Referenced by operator<<().