Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Nektar::LibUtilities Namespace Reference

Namespaces

namespace  StdHexData
namespace  StdPrismData
namespace  StdPyrData
namespace  StdQuadData
namespace  StdSegData
namespace  StdTetData
namespace  StdTriData

Classes

class  Equation
struct  FieldDefinitions
class  FieldIO
 Class for operating on FLD files. More...
class  MeshPartition
class  MeshPartitionMetis
class  MeshPartitionScotch
struct  none
class  NekFactory
 Provides a generic Factory class. More...
struct  defOpLessCreator
class  NekManager
struct  CmdLineArg
struct  FunctionVariableDefinition
class  SessionReader
 Reads and parses information from a Nektar++ XML session file. More...
class  Comm
 Base communications class. More...
class  CommMpi
 A global linear system. More...
class  CommSerial
 A global linear system. More...
class  Transposition
class  NekFFTW
class  NektarFFT
class  BasisKey
 Describes the specification for a Basis. More...
class  Basis
 Represents a basis of a given type. More...
class  BLPoints
class  FourierPoints
class  FourierSingleModePoints
class  GaussPoints
class  GraphVertexObject
class  GraphEdgeObject
class  Graph
class  NodalPrismEvenlySpaced
class  NodalTetElec
class  NodalTetEvenlySpaced
class  NodalTriElec
class  NodalTriEvenlySpaced
class  NodalTriFekete
class  PointsKey
 Defines a specification for a set of points. More...
class  Points
 Stores a set of points of datatype DataT, defined by a PointKey. More...
class  PolyEPoints
struct  func
struct  functions
class  AnalyticExpressionEvaluator
 This class defines evaluator of analytic (symbolic) mathematical expressions. Expressions are allowed to depend on a number of spatial-time variables and parameters. Pre-processing and evaluation stages are split. At evaluation stage one specifies values for each variable, resulting expression value is returned. Vectorized evaluator (evaluate expression at a set of points) is available. More...
class  Kernel
class  TimeIntegrationSchemeOperators
class  TimeIntegrationSchemeKey
class  TimeIntegrationScheme
class  TimeIntegrationSolution
class  TimeIntegrationWrapper
class  TimeIntegrationIMEXOrder1
class  TimeIntegrationIMEXOrder2
class  TimeIntegrationIMEXOrder3
class  TimeIntegrationIMEXdirk_1_1_1
class  TimeIntegrationIMEXdirk_1_2_1
class  TimeIntegrationIMEXdirk_1_2_2
class  TimeIntegrationIMEXdirk_4_4_3
class  TimeIntegrationIMEXdirk_2_2_2
class  TimeIntegrationIMEXdirk_2_3_3
class  TimeIntegrationIMEXdirk_2_3_2
class  TimeIntegrationIMEXdirk_3_4_3
class  TimeIntegrationForwardEuler
class  TimeIntegrationBackwardEuler
class  TimeIntegrationBDFImplicitOrder1
class  TimeIntegrationBDFImplicitOrder2
class  TimeIntegrationRungeKutta2_ImprovedEuler
class  TimeIntegrationRungeKutta2_ModifiedEuler
class  TimeIntegrationClassicalRungeKutta4
class  TimeIntegrationDIRKOrder2
class  TimeIntegrationDIRKOrder3
class  TimeIntegrationMidpoint
class  TimeIntegrationAdamsBashforthOrder2
class  TimeIntegrationAdamsBashforthOrder3
class  TimeIntegrationAdamsMoultonOrder2
class  TimeIntegrationIMEXGear
class  TimeIntegrationCNAB
class  TimeIntegrationMCNAB

Typedefs

typedef std::map< std::string,
std::string > 
FieldMetaDataMap
typedef boost::shared_ptr
< FieldDefinitions
FieldDefinitionsSharedPtr
typedef boost::shared_ptr
< FieldIO
FieldIOSharedPtr
typedef boost::shared_ptr
< SessionReader
SessionReaderSharedPtr
typedef std::map< int,
std::vector< unsigned int > > 
CompositeOrdering
typedef std::map< int,
std::vector< unsigned int > > 
BndRegionOrdering
typedef
LibUtilities::NekFactory
< std::string, MeshPartition,
const SessionReaderSharedPtr & > 
MeshPartitionFactory
 Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.
typedef boost::shared_ptr
< MeshPartition
MeshPartitionSharedPtr
typedef std::map< std::string,
std::string > 
SolverInfoMap
typedef std::map< std::string,
NekDouble
ParameterMap
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,
CmdLineArg
CmdLineArgMap
typedef std::map< std::string,
int > 
EnumMap
typedef std::map< std::string,
EnumMap
EnumMapList
typedef std::map< std::string,
std::string > 
GloSysInfoMap
typedef std::map< std::string,
GloSysInfoMap
GloSysSolnInfoList
typedef boost::shared_ptr
< Equation
EquationSharedPtr
typedef std::map< std::pair
< std::string, int >
, FunctionVariableDefinition
FunctionVariableMap
typedef std::map< std::string,
FunctionVariableMap
FunctionMap
typedef boost::shared_ptr< CommCommSharedPtr
 Pointer to a Communicator object.
typedef
LibUtilities::NekFactory
< std::string, Comm, int, char ** > 
CommFactory
 Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.
typedef boost::shared_ptr
< CommMpi
CommMpiSharedPtr
 Pointer to a Communicator object.
typedef boost::shared_ptr
< CommSerial
CommSerialSharedPtr
 Pointer to a Communicator object.
typedef boost::shared_ptr
< Transposition
TranspositionSharedPtr
typedef boost::shared_ptr
< NekFFTW
NekFFTWSharedPtr
typedef boost::shared_ptr
< NektarFFT
NektarFFTSharedPtr
typedef
LibUtilities::NekFactory
< std::string, NektarFFT, int > 
NektarFFTFactory
 Datatype of the NekFactory used to instantiate classes derived from the NektarFFT class.
typedef std::vector< BasisKeyBasisKeyVector
 Name for a vector of BasisKeys.
typedef std::vector< BasisKey >
::iterator 
BasisKeyVectorIter
 Name for an iterator over a BasisKeyVector.
typedef boost::shared_ptr< BasisBasisSharedPtr
typedef std::vector
< BasisSharedPtr
BasisVector
typedef std::vector
< BasisSharedPtr >::iterator 
BasisVectorIter
typedef Points< NekDoublePointsBaseType
typedef boost::shared_ptr
< Points< NekDouble > > 
PointsSharedPtr
typedef int GraphVertexID
typedef NekManager< PointsKey,
Points< NekDouble >
, PointsKey::opLess
PointsManagerT
typedef NekManager< BasisKey,
Basis, BasisKey::opLess
BasisManagerT
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 boost::shared_ptr< KernelKernelSharedPtr
typedef boost::shared_ptr
< TimeIntegrationScheme
TimeIntegrationSchemeSharedPtr
typedef std::vector
< TimeIntegrationSchemeSharedPtr
TimeIntegrationSchemeVector
typedef std::vector
< TimeIntegrationSchemeSharedPtr >
::iterator 
TimeIntegrationSchemeVectorIter
typedef boost::shared_ptr
< TimeIntegrationSolution
TimeIntegrationSolutionSharedPtr
typedef std::vector
< TimeIntegrationSolutionSharedPtr
TimeIntegrationSolutionVector
typedef std::vector
< TimeIntegrationSolutionSharedPtr >
::iterator 
TimeIntegrationSolutionVectorIter
typedef NekManager
< TimeIntegrationSchemeKey,
TimeIntegrationScheme,
TimeIntegrationSchemeKey::opLess
TimeIntegrationSchemeManagerT
typedef NekFactory
< std::string,
TimeIntegrationWrapper
TimeIntegrationWrapperFactory
 Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.
typedef boost::shared_ptr
< TimeIntegrationWrapper
TimeIntegrationWrapperSharedPtr
typedef boost::shared_ptr
< TimeIntegrationIMEXOrder1
TimeIntegrationIMEXOrder1SharedPtr

Enumerations

enum  FunctionType { eFunctionTypeExpression, eFunctionTypeFile, eSIZE_FunctionType }
enum  ShapeType {
  eNoShapeType, ePoint, eSegment, eTriangle,
  eQuadrilateral, eTetrahedron, ePyramid, ePrism,
  eHexahedron, SIZE_ShapeType
}
enum  ReduceOperator { ReduceSum, ReduceMax, ReduceMin }
 Type of operation to perform in AllReduce. More...
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, 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,
  SIZE_PointsType
}
enum  TimeIntegrationMethod {
  eNoTimeIntegrationMethod, eAdamsBashforthOrder1, eAdamsBashforthOrder2, eAdamsBashforthOrder3,
  eAdamsMoultonOrder1, eAdamsMoultonOrder2, eBDFImplicitOrder1, eBDFImplicitOrder2,
  eClassicalRungeKutta4, eRungeKutta2_ModifiedEuler, eRungeKutta2_ImprovedEuler, eForwardEuler,
  eBackwardEuler, eIMEXOrder1, eIMEXOrder2, eIMEXOrder3,
  eMidpoint, 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

void Write (const std::string &outFile, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, const FieldMetaDataMap &fieldinfomap=NullFieldMetaDataMap)
 Write a field file in serial only.
void Import (const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata=NullVectorNekDoubleVector, FieldMetaDataMap &fieldinfomap=NullFieldMetaDataMap, const Array< OneD, int > ElementiDs=NullInt1DArray)
 Imports an FLD file.
std::string PortablePath (const boost::filesystem::path &path)
 create portable path on different platforms for boost::filesystem path
MeshPartitionFactoryGetMeshPartitionFactory ()
int GetNumberOfCoefficients (ShapeType shape, std::vector< unsigned int > &modes, int offset)
CommFactoryGetCommFactory ()
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.
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
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
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.
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)
template<typename T >
NekVector< T > GetColumn (const NekMatrix< T > &matA, int n)
NekMatrix< NekDouble > & SetColumn (NekMatrix< NekDouble > &matA, int n, const NekVector< NekDouble > &x)
NekVector< NekDoubleGetE (int rows, int n)
NekMatrix< NekDoubleInvert (const NekMatrix< NekDouble > &matA)
NekMatrix< NekDoubleGetTranspose (const NekMatrix< NekDouble > &matA)
int GetSize (const Array< OneD, const NekDouble > &x)
int GetSize (const NekVector< NekDouble > &x)
NekVector< NekDoubleToVector (const Array< OneD, const NekDouble > &x)
Array< OneD, NekDoubleToArray (const NekVector< NekDouble > &x)
NekVector< NekDoubleHadamard (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekVector< NekDoubleVectorPower (const NekVector< NekDouble > &x, NekDouble p)
std::string MatrixToString (const NekMatrix< NekDouble > &A, int precision, NekDouble expSigFigs)
std::string VectorToString (const NekVector< NekDouble > &v, int precision, NekDouble expSigFigs)
int GetTriNumPoints (int degree)
int GetDegree (int nBasisFunctions)
int GetTetNumPoints (int degree)
int GetTetDegree (int nBasisFunc)
NekDouble MakeRound (NekDouble x)
NekVector< NekDoubleMakeDubinerQuadratureSystem (int nBasisFunctions)
NekVector< NekDoubleMakeTetQuadratureSystem (int nBasisFunctions)
NekVector< NekDoubleJacobiPoly (int degree, const NekVector< NekDouble > &x, NekDouble alpha, NekDouble beta)
NekDouble JacobiPoly (int degree, NekDouble x, NekDouble alpha, NekDouble beta)
NekVector< NekDoubleLegendrePoly (int degree, const NekVector< NekDouble > &x)
NekVector< NekDoubleDubinerPoly (int p, int q, const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekVector< NekDoubleTetrahedralBasis (int p, int q, int r, const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekMatrix< NekDoubleGetTetVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, int degree)
NekMatrix< NekDoubleGetTetVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekMatrix< NekDoubleGetVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, int degree)
NekMatrix< NekDoubleGetVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
SharedNekMatrixPtr MakeVmatrixOfTet (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
SharedNekMatrixPtr MakeVmatrixOfDubinerPolynomial (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekVector< NekDoubleMakeTetWeights (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekVector< NekDoubleMakeQuadratureWeights (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekMatrix< NekDoubleGetTetInterpolationMatrix (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi, const NekVector< NekDouble > &zi)
NekMatrix< NekDoubleGetInterpolationMatrix (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi)
NekVector< NekDoubleLegendrePolyDerivative (int degree, const NekVector< NekDouble > &x)
NekVector< NekDoubleDubinerPolyXDerivative (int p, int q, const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekVector< NekDoubleTetXDerivative (int p, int q, int r, const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekMatrix< NekDoubleGetVandermondeForTetXDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, int degree)
NekMatrix< NekDoubleGetVandermondeForTetXDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
Points< NekDouble >
::MatrixSharedPtrType 
GetTetXDerivativeMatrix (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi, const NekVector< NekDouble > &zi)
NekMatrix< NekDoubleGetVandermondeForXDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, int degree)
NekMatrix< NekDoubleGetVandermondeForXDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
Points< NekDouble >
::MatrixSharedPtrType 
GetXDerivativeMatrix (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi)
NekVector< NekDoubleJacobiPolyDerivative (int degree, const NekVector< NekDouble > &x, int alpha, int beta)
NekVector< NekDoubleTetYDerivative (int p, int q, int r, const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekMatrix< NekDoubleGetVandermondeForTetYDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, int degree)
NekMatrix< NekDoubleGetVandermondeForTetYDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
Points< NekDouble >
::MatrixSharedPtrType 
GetTetYDerivativeMatrix (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi, const NekVector< NekDouble > &zi)
NekVector< NekDoubleTetZDerivative (int p, int q, int r, const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekMatrix< NekDoubleGetVandermondeForTetZDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, int degree)
NekMatrix< NekDoubleGetVandermondeForTetZDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
Points< NekDouble >
::MatrixSharedPtrType 
GetTetZDerivativeMatrix (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi, const NekVector< NekDouble > &zi)
NekVector< NekDoubleDubinerPolyYDerivative (int p, int q, const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekMatrix< NekDoubleGetVandermondeForYDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, int degree)
Points< NekDouble >
::MatrixSharedPtrType 
GetYDerivativeMatrix (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &xi, const NekVector< NekDouble > &yi)
NekMatrix< NekDoubleGetVandermondeForYDerivative (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekMatrix< NekDoubleGetMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, int degree)
NekMatrix< NekDoubleGetMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, int degree)
NekMatrix< NekDoubleGetMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekMatrix< NekDoubleGetMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekMatrix< NekDoubleGetXDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, int degree)
NekMatrix< NekDoubleGetXDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekMatrix< NekDoubleGetTetXDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, int degree)
NekMatrix< NekDoubleGetTetXDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekMatrix< NekDoubleGetTetYDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, int degree)
NekMatrix< NekDoubleGetTetYDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekMatrix< NekDoubleGetTetZDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z, int degree)
NekMatrix< NekDoubleGetTetZDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, const NekVector< NekDouble > &z)
NekMatrix< NekDoubleGetYDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y, int degree)
NekMatrix< NekDoubleGetYDerivativeOfMonomialVandermonde (const NekVector< NekDouble > &x, const NekVector< NekDouble > &y)
NekVector< NekDoubleGetIntegralOfMonomialVandermonde (int degree)
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)
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

static std::vector< NekDoubleNullNekDoubleVector
static std::vector
< LibUtilities::PointsType
NullPointsTypeVector
static std::vector< unsigned int > NullUnsignedIntVector
static FieldMetaDataMap NullFieldMetaDataMap
static std::vector
< std::vector< NekDouble > > 
NullVectorNekDoubleVector = boost::assign::list_of(NullNekDoubleVector)
const char *const FunctionTypeMap []
const char *const ShapeTypeMap []
const unsigned int ShapeTypeDimMap [SIZE_ShapeType]
static BasisSharedPtr NullBasisSharedPtr
static Array< OneD,
BasisSharedPtr
NullBasisSharedPtr1DArray
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]
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]
Nektar::LibUtilities::functions functions_p
const char *const TimeIntegrationMethodMap []
const char *const TimeIntegrationSchemeTypeMap []

Typedef Documentation

Name for a vector of BasisKeys.

Definition at line 69 of file FoundationsFwd.hpp.

Name for an iterator over a BasisKeyVector.

Definition at line 76 of file FoundationsFwd.hpp.

Definition at line 51 of file ManagerAccess.h.

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

Definition at line 79 of file FoundationsFwd.hpp.

Definition at line 80 of file FoundationsFwd.hpp.

Definition at line 81 of file FoundationsFwd.hpp.

typedef std::map< int, std::vector< unsigned int > > Nektar::LibUtilities::BndRegionOrdering

Definition at line 53 of file MeshPartition.h.

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

Definition at line 75 of file SessionReader.h.

typedef LibUtilities::NekFactory< std::string, Comm, int, char** > Nektar::LibUtilities::CommFactory

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

Definition at line 60 of file Comm.h.

typedef boost::shared_ptr<CommMpi> Nektar::LibUtilities::CommMpiSharedPtr

Pointer to a Communicator object.

Definition at line 55 of file CommMpi.h.

Pointer to a Communicator object.

Definition at line 49 of file CommSerial.h.

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

Pointer to a Communicator object.

Definition at line 53 of file Comm.h.

typedef std::map< int, std::vector< unsigned int > > Nektar::LibUtilities::CompositeOrdering

Definition at line 52 of file MeshPartition.h.

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

Definition at line 77 of file SessionReader.h.

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

Definition at line 78 of file SessionReader.h.

Definition at line 99 of file SessionReader.h.

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

Definition at line 61 of file SessionReader.h.

Definition at line 131 of file FieldIO.h.

typedef boost::shared_ptr<FieldIO> Nektar::LibUtilities::FieldIOSharedPtr

Definition at line 236 of file FieldIO.h.

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

Definition at line 65 of file FieldIO.h.

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

Definition at line 66 of file SessionReader.h.

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

Definition at line 64 of file SessionReader.h.

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

Definition at line 115 of file SessionReader.h.

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

Definition at line 113 of file SessionReader.h.

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

Definition at line 60 of file SessionReader.h.

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

Definition at line 80 of file SessionReader.h.

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

Definition at line 81 of file SessionReader.h.

Definition at line 85 of file FoundationsFwd.hpp.

typedef boost::shared_ptr<Kernel> Nektar::LibUtilities::KernelSharedPtr

Definition at line 215 of file kernel.h.

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

Definition at line 57 of file MeshPartition.h.

Definition at line 243 of file MeshPartition.h.

typedef boost::shared_ptr<NekFFTW> Nektar::LibUtilities::NekFFTWSharedPtr

Definition at line 56 of file NekFFTW.h.

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

Definition at line 63 of file NektarFFT.h.

Definition at line 56 of file NektarFFT.h.

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

Definition at line 59 of file SessionReader.h.

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

Definition at line 74 of file AnalyticExpressionEvaluator.cpp.

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

Definition at line 75 of file AnalyticExpressionEvaluator.cpp.

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

Definition at line 76 of file AnalyticExpressionEvaluator.cpp.

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

Definition at line 77 of file AnalyticExpressionEvaluator.cpp.

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

Definition at line 78 of file AnalyticExpressionEvaluator.cpp.

Definition at line 83 of file FoundationsFwd.hpp.

Definition at line 220 of file Points.h.

Definition at line 50 of file ManagerAccess.h.

Definition at line 84 of file FoundationsFwd.hpp.

Definition at line 50 of file MeshPartition.h.

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

Definition at line 58 of file SessionReader.h.

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

Definition at line 63 of file SessionReader.h.

Definition at line 115 of file TimeIntegrationWrapper.h.

Definition at line 348 of file TimeIntegrationScheme.h.

Definition at line 51 of file TimeIntegrationScheme.h.

Definition at line 55 of file TimeIntegrationScheme.h.

Definition at line 56 of file TimeIntegrationScheme.h.

Definition at line 57 of file TimeIntegrationScheme.h.

Definition at line 58 of file TimeIntegrationScheme.h.

Definition at line 59 of file TimeIntegrationScheme.h.

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

Definition at line 46 of file TimeIntegrationWrapper.h.

Definition at line 57 of file TimeIntegrationWrapper.h.

Definition at line 165 of file Transposition.h.

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

Definition at line 62 of file SessionReader.h.

Enumeration Type Documentation

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) $.

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 43 of file BasisType.h.

{
eOrtho_A, //!< Principle Orthogonal Functions \f$\widetilde{\psi}^a_p(z_i)\f$
eOrtho_B, //!< Principle Orthogonal Functions \f$\widetilde{\psi}^b_{pq}(z_i)\f$
eOrtho_C, //!< Principle Orthogonal Functions \f$\widetilde{\psi}^c_{pqr}(z_i)\f$
eModified_A, //!< Principle Modified Functions \f$ \phi^a_p(z_i) \f$
eModified_B, //!< Principle Modified Functions \f$ \phi^b_{pq}(z_i) \f$
eModified_C, //!< Principle Modified Functions \f$ \phi^c_{pqr}(z_i) \f$
eFourier, //!< Fourier Expansion \f$ \exp(i p\pi z_i)\f$
eGLL_Lagrange, //!< Lagrange for SEM basis \f$ h_p(z_i) \f$
eGauss_Lagrange, //!< Lagrange Polynomials using the Gauss points \f$ h_p(z_i) \f$
eLegendre, //!< Legendre Polynomials \f$ L_p(z_i) = P^{0,0}_p(z_i)\f$. Same as Ortho_A
eChebyshev, //!< Chebyshev Polynomials \f$ T_p(z_i) = P^{-1/2,-1/2}_p(z_i)\f$
eMonomial, //!< Monomial polynomials \f$ L_p(z_i) = z_i^{p}\f$
eFourierSingleMode, //!< Fourier ModifiedExpansion with just the first mode \f$ \exp(i \pi z_i)\f$
eFourierHalfModeRe, //!< Fourier Modified expansions with just the real part of the first mode \f$ Re[\exp(i \pi z_i)]\f$
eFourierHalfModeIm, //!< Fourier Modified expansions with just the imaginary part of the first mode \f$ Im[\exp(i \pi z_i)]\f$
SIZE_BasisType //!< Length of enum list
};
Enumerator:
eFunctionTypeExpression 
eFunctionTypeFile 
eSIZE_FunctionType 

Definition at line 86 of file SessionReader.h.

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

SIZE_PointsType 

Length of enum list.

Definition at line 44 of file PointsType.h.

{
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, \f$ \alpha = 0, \beta = 1 \f$
eGaussRadauMAlpha0Beta2, //!< Gauss Radau pinned at x=-1, \f$ \alpha = 0, \beta = 2 \f$
eGaussRadauMAlpha1Beta0, //!< Gauss Radau pinned at x=-1, \f$ \alpha = 1, \beta = 0 \f$
eGaussRadauMAlpha2Beta0, //!< Gauss Radau pinned at x=-1, \f$ \alpha = 2, \beta = 0 \f$
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, \f$ \alpha = 1, \beta = 0 \f$
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
SIZE_PointsType //!< Length of enum list
};

Type of operation to perform in AllReduce.

Enumerator:
ReduceSum 
ReduceMax 
ReduceMin 

Definition at line 65 of file Comm.h.

Enumerator:
eNoShapeType 
ePoint 
eSegment 
eTriangle 
eQuadrilateral 
eTetrahedron 
ePyramid 
ePrism 
eHexahedron 
SIZE_ShapeType 

Definition at line 52 of file ShapeType.hpp.

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.

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.

eRungeKutta2_ModifiedEuler 

Runge-Kutta multi-stage scheme 2nd order explicit.

eRungeKutta2_ImprovedEuler 

Runge-Kutta multi-stage scheme 2nd order explicit.

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.

eMidpoint 

midpoint method

eDIRKOrder2 

Diagonally Implicit Runge Kutta scheme of order 3.

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 64 of file TimeIntegrationScheme.h.

{
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
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
eRungeKutta2_ModifiedEuler, //!< Runge-Kutta multi-stage scheme 2nd order explicit
eRungeKutta2_ImprovedEuler, //!< Runge-Kutta multi-stage scheme 2nd order explicit
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
eMidpoint, //!< midpoint method
eDIRKOrder2, //!< Diagonally Implicit Runge Kutta scheme of order 3
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
};
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 133 of file TimeIntegrationScheme.h.

{
eExplicit, //!< Formally explicit scheme
eDiagonallyImplicit, //!< Diagonally implicit scheme (e.g. the DIRK schemes)
eIMEX, //!< Implicit Explicit General Linear Method
eImplicit, //!< Fully implicit scheme
};
Enumerator:
eXYtoZ 
eZtoXY 
eXtoYZ 
eYZtoX 
eYZtoZY 
eZYtoYZ 
eXtoY 
eYtoZ 
eZtoX 
eNoTrans 

Definition at line 49 of file Transposition.h.

Function Documentation

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

Definition at line 106 of file AnalyticExpressionEvaluator.cpp.

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

{
AnalyticExpressionEvaluator::RandomGeneratorType rng;
boost::variate_generator<
AnalyticExpressionEvaluator::RandomGeneratorType&,
boost::normal_distribution<>
> _normal(rng, boost::normal_distribution<>(0, sigma) );
return _normal();
}
BasisManagerT & Nektar::LibUtilities::BasisManager ( void  )
NekVector< NekDouble > Nektar::LibUtilities::DubinerPoly ( int  p,
int  q,
const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 375 of file NodalUtil.cpp.

References GetSize(), JacobiPoly(), and LegendrePoly().

Referenced by GetVandermonde().

{
// Get the coordinate transform
int size = GetSize(x);
NekVector<NekDouble> eta_1(size);
// Initialize the horizontal coordinate of the triangle (beta in Barycentric coordinates)
for(int el=0; el<size; ++el)
{
if( y[el] < 1.0 - 1e-16 )
{
eta_1[el] = 2.0*(1.0 + x[el]) / (1.0 - y[el]) - 1.0;
}
else
{
eta_1[el] = -1.0; // When y is close to 1, then we have a removeable singularity
}
}
// Initialize the vertical coordinate of the triangle (gamma in Barycentric coordinates)
NekVector<NekDouble> eta_2 = y;
// Orthogonal Dubiner polynomial
int alpha = 2*p + 1; int beta = 0;
NekVector<NekDouble> phi(size);
NekVector<NekDouble> psi_a = LegendrePoly(p, eta_1);
NekVector<NekDouble> upsilon = JacobiPoly(q, eta_2, alpha, beta);
NekDouble w = sqrt((2.0 * p + 1.0) * (p + q + 1.0) / 2.0); // Normalizing Orthonormal weight
for(int el=0; el<size; ++el)
{
NekDouble zeta = pow((1.0 - eta_2[el])/2.0, p);
NekDouble psi_b = zeta * upsilon[el];
phi[el] = w * psi_a[el] * psi_b;
}
return phi;
}
NekVector< NekDouble > Nektar::LibUtilities::DubinerPolyXDerivative ( int  p,
int  q,
const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 664 of file NodalUtil.cpp.

References Nektar::NekVector< DataType >::GetRows(), GetSize(), JacobiPoly(), and LegendrePolyDerivative().

Referenced by GetVandermondeForXDerivative().

{
// Get the coordinate transform
int size = GetSize(y);
NekVector<NekDouble> eta_1(size);
NekVector<NekDouble> psi_x(x.GetRows());
if(p>0)
{
// Initialize the horizontal coordinate of the triangle (beta in Barycentric coordinates)
for(int el=0; el<size; ++el)
{
if(y[el] < 1.0 - 1e-16)
{
eta_1[el] = 2.0*(1.0 + x[el]) / (1.0 - y[el]) - 1.0;
}
else
{
eta_1[el] = -1.0; // When y is close to 1, then we have a removeable singularity
}
}
// Initialize the vertical coordinate of the triangle (gamma in Barycentric coordinates)
NekVector<NekDouble> eta_2 = y;
// Orthogonal Dubiner polynomial x-derivative
int alpha = 2*p + 1; int beta = 0;
NekVector<NekDouble> psi_a_x = LegendrePolyDerivative(p, eta_1);
NekVector<NekDouble> upsilon = JacobiPoly(q, eta_2, alpha, beta);
NekDouble w = sqrt((2.0*p + 1.0) * (p + q + 1.0) / 2.0); // Normalizing Orthonormal weight
for(int i=0; i<size; ++i)
{
NekDouble zeta = pow((1.0 - eta_2[i])/2.0, (p-1.0));
NekDouble psi_b = zeta*upsilon[i];
psi_x[i] = w * psi_a_x[i] * psi_b;
}
}
else
{
for(int i=0; i<int(x.GetRows()); ++i)
{
psi_x[i] = 0.0;
}
}
return psi_x;
}
NekVector< NekDouble > Nektar::LibUtilities::DubinerPolyYDerivative ( int  p,
int  q,
const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 1217 of file NodalUtil.cpp.

References GetSize(), JacobiPoly(), JacobiPolyDerivative(), LegendrePoly(), and LegendrePolyDerivative().

Referenced by GetVandermondeForYDerivative().

{
// Get the coordinate transform
int size = GetSize(y);
NekVector<NekDouble> eta_1(size);
// Initialize the horizontal coordinate of the triangle (beta in Barycentric coordinates)
for(int el=0; el<size; ++el)
{
if(y[el] < 1.0 - 1e-16)
{
eta_1[el] = 2.0*(1.0 + x[el]) / (1.0 - y[el]) - 1.0;
}
else
{
eta_1[el] = -1.0; // When y is close to 1, then we have a removeable singularity
}
}
// Initialize the vertical coordinate of the triangle (gamma in Barycentric coordinates)
NekVector<NekDouble> eta_2 = y;
// Orthogonal Dubiner y-polynomial
int alpha = 2*p + 1; int beta = 0;
NekVector<NekDouble> psi_a = LegendrePoly(p, eta_1);
NekVector<NekDouble> psi_a_y = LegendrePolyDerivative(p, eta_1);
NekVector<NekDouble> psi_b = JacobiPoly(q, eta_2, alpha, beta);
NekVector<NekDouble> psi_b_y = JacobiPolyDerivative(q, eta_2, alpha, beta);
NekVector<NekDouble> secondComponentOf_psi_b(size);
NekVector<NekDouble> psi_y(size);
NekVector<NekDouble> first_part_derivative(size);
if(p > 0)
{
for(int i=0; i<size; ++i)
{
first_part_derivative[i] = (1.0 + eta_1[i])/2.0 * psi_a_y[i] * pow((1.0 - eta_2[i])/2.0, p-1.0) * psi_b[i];
secondComponentOf_psi_b[i] = -p/2.0 * pow(((1.0 - eta_2[i]) / 2.0), p - 1.0) * psi_b[i];
}
}
else
{
for(int i=0; i<size; ++i)
{
secondComponentOf_psi_b[i] = 0.0;
first_part_derivative[i] = 0.0;
}
}
for(int k=0; k<size; ++k)
{
psi_y[k] = first_part_derivative[k] + psi_a[k] * ( pow((1.0 - eta_2[k])/2.0, p) * psi_b_y[k] + secondComponentOf_psi_b[k] );
}
NekDouble w = sqrt((2.0*p + 1.0)*(p + q + 1.0)/2.0); // Normalizing Orthonormal weight
return w * psi_y;
}
template<typename T >
NekVector< T > Nektar::LibUtilities::GetColumn ( const NekMatrix< T > &  matA,
int  n 
)

Definition at line 52 of file NodalUtil.cpp.

{
NekVector<T> v(matA.GetRows());
for( int i=0; i<matA.GetRows(); ++i )
{
v[i] = matA(i,n);
}
return v;
}
CommFactory & Nektar::LibUtilities::GetCommFactory ( )

Definition at line 64 of file Comm.cpp.

Referenced by Nektar::LibUtilities::SessionReader::CreateComm(), Import(), main(), Nektar::Utilities::InputFld::Process(), and Write().

{
typedef Loki::SingletonHolder<CommFactory,
Loki::CreateUsingNew,
Loki::NoDestroy > Type;
return Type::Instance();
}
int Nektar::LibUtilities::GetDegree ( int  nBasisFunctions)

Definition at line 207 of file NodalUtil.cpp.

References ASSERTL1, GetTriNumPoints(), and MakeRound().

Referenced by GetInterpolationMatrix(), GetMonomialVandermonde(), GetVandermonde(), GetVandermondeForXDerivative(), GetVandermondeForYDerivative(), GetXDerivativeMatrix(), GetXDerivativeOfMonomialVandermonde(), GetYDerivativeMatrix(), and GetYDerivativeOfMonomialVandermonde().

{
int degree = int(MakeRound((-3.0 + sqrt(1.0 + 8.0*nBasisFunctions))/2.0));
// TODO: Find out why ASSERTL0 and ASSERTL1 don't work
ASSERTL1( GetTriNumPoints(degree) == nBasisFunctions, "The number of points defines an expansion of fractional degree, which is not supported." );
return degree;
}
NekVector< NekDouble > Nektar::LibUtilities::GetE ( int  rows,
int  n 
)

Definition at line 72 of file NodalUtil.cpp.

Referenced by Invert().

{
NekVector<NekDouble> e(rows, 0.0);
e(n) = 1;
return e;
}
NekVector< NekDouble > Nektar::LibUtilities::GetIntegralOfMonomialVandermonde ( int  degree)

Definition at line 1588 of file NodalUtil.cpp.

{
int cols = (degree + 1) * (degree + 2) / 2;
NekVector<NekDouble>integralMVandermonde(cols, 0.0);
for(int d=0, n=0; d <= degree; ++d)
{
for(int p=0; p <= d; ++p, ++n)
{
int q = d - p;
int sp = 1 - 2 * (p % 2);
int sq = 1 - 2 * (q % 2);
integralMVandermonde(n) = NekDouble(sp * (p+1) + sq * (q+1) + sp * sq * (p+q+2)) / ((p+1) * (q+1) * (p+q+2));
}
}
return integralMVandermonde;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetInterpolationMatrix ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  xi,
const NekVector< NekDouble > &  yi 
)

Definition at line 609 of file NodalUtil.cpp.

References GetDegree(), GetSize(), GetVandermonde(), and Invert().

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

{
int nNodes = GetSize(x);
int degree = GetDegree(nNodes);
NekMatrix<NekDouble> matS = GetVandermonde(x, y); // Square 'short' matrix
NekMatrix<NekDouble> matT = GetVandermonde(xi, yi, degree); // Coefficient interpolation matrix (tall)
NekMatrix<NekDouble> invertMatrix = Invert(matS);
// Get the interpolation matrix
return matT*invertMatrix;
}
MeshPartitionFactory & Nektar::LibUtilities::GetMeshPartitionFactory ( )

Definition at line 65 of file MeshPartition.cpp.

Referenced by Nektar::LibUtilities::SessionReader::PartitionMesh(), and Nektar::Utilities::OutputInfo::Process().

{
typedef Loki::SingletonHolder<MeshPartitionFactory,
Loki::CreateUsingNew,
Loki::NoDestroy > Type;
return Type::Instance();
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
int  degree 
)

Definition at line 1327 of file NodalUtil.cpp.

References GetSize().

Referenced by GetMonomialVandermonde().

{
int rows = GetSize(x);
int cols = (degree + 1)*(degree + 2)/2;
NekMatrix<NekDouble>matV(rows,cols, 0.0);
for(int d=0, n=0; d <= degree; ++d)
{
for(int p=0; p <= d; ++p, ++n)
{
int q = d - p;
for(int i=0; i<rows; ++i)
{
matV(i, n) = pow(x[i], p) * pow(y[i], q);
}
}
}
return matV;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
int  degree 
)

Definition at line 1348 of file NodalUtil.cpp.

References GetSize().

{
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2) * (degree + 3)/6;
NekMatrix<NekDouble> matV(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p <= d; ++p)
{
for(int q=0; q <= d - p; ++q, ++n)
{
int r = d - p - q;
// Set n-th column of V to the monomial vector
for(int i=0; i<rows; ++i)
{
matV(i,n) = pow(x[i],p) * pow(y[i],q) * pow(z[i],r);
}
}
}
}
return matV;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 1375 of file NodalUtil.cpp.

References GetMonomialVandermonde(), GetSize(), and GetTetDegree().

{
int rows = GetSize(x);
int degree = GetTetDegree(rows);
return GetMonomialVandermonde(x, y, z, degree);
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 1382 of file NodalUtil.cpp.

References GetDegree(), GetMonomialVandermonde(), and GetSize().

{
int rows = GetSize(x);
int degree = GetDegree(rows);
return GetMonomialVandermonde(x, y, degree);
}
NektarFFTFactory & Nektar::LibUtilities::GetNektarFFTFactory ( )

Definition at line 69 of file NektarFFT.cpp.

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

{
typedef Loki::SingletonHolder<NektarFFTFactory,
Loki::CreateUsingNew,
Loki::NoDestroy > Type;
return Type::Instance();
}
int Nektar::LibUtilities::GetNumberOfCoefficients ( ShapeType  shape,
std::vector< unsigned int > &  modes,
int  offset 
)
inline

Definition at line 312 of file ShapeType.hpp.

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

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

{
int returnval = 0;
switch(shape)
{
case eSegment:
returnval = modes[offset];
break;
case eTriangle:
returnval = StdTriData::getNumberOfCoefficients(modes[offset],modes[offset+1]);
break;
returnval = modes[offset]*modes[offset+1];
break;
returnval = StdTetData::getNumberOfCoefficients(modes[offset],modes[offset+1],modes[offset+2]);
break;
case ePyramid:
returnval = StdPyrData::getNumberOfCoefficients(modes[offset],modes[offset+1],modes[offset+2]);
break;
case ePrism:
returnval = StdPrismData::getNumberOfCoefficients(modes[offset],modes[offset+1],modes[offset+2]);
break;
returnval = modes[offset]*modes[offset+1]*modes[offset+2];
break;
default:
ASSERTL0(false,"Unknown Shape Type");
break;
}
return returnval;
}
int Nektar::LibUtilities::GetSize ( const Array< OneD, const NekDouble > &  x)
int Nektar::LibUtilities::GetSize ( const NekVector< NekDouble > &  x)

Definition at line 116 of file NodalUtil.cpp.

References Nektar::NekVector< DataType >::GetRows().

{
return x.GetRows();
}
int Nektar::LibUtilities::GetTetDegree ( int  nBasisFunc)

Definition at line 222 of file NodalUtil.cpp.

References ASSERTL1, GetTetNumPoints(), and MakeRound().

Referenced by GetMonomialVandermonde(), GetTetInterpolationMatrix(), GetTetVandermonde(), GetTetXDerivativeMatrix(), GetTetXDerivativeOfMonomialVandermonde(), GetTetYDerivativeOfMonomialVandermonde(), GetTetZDerivativeMatrix(), GetTetZDerivativeOfMonomialVandermonde(), GetVandermondeForTetXDerivative(), GetVandermondeForTetYDerivative(), and GetVandermondeForTetZDerivative().

{
NekDouble eq = pow( 81.0 * nBasisFunc + 3.0 * sqrt(-3.0 + 729.0 * nBasisFunc * nBasisFunc), 1.0/3.0);
int degree = int(MakeRound(eq/3.0 + 1.0/eq - 1.0)) - 1;
ASSERTL1( GetTetNumPoints(degree) == nBasisFunc, "The number of points defines an expansion of fractional degree, which is not supported." );
return degree;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTetInterpolationMatrix ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
const NekVector< NekDouble > &  xi,
const NekVector< NekDouble > &  yi,
const NekVector< NekDouble > &  zi 
)

Definition at line 594 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), GetTetVandermonde(), and Invert().

Referenced by Nektar::LibUtilities::NodalTetElec::CalculateInterpMatrix(), and Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateInterpMatrix().

{
int nNodes = GetSize(x);
int degree = GetTetDegree(nNodes);
NekMatrix<NekDouble> matS = GetTetVandermonde(x, y, z); // Square 'short' matrix
NekMatrix<NekDouble> matT = GetTetVandermonde(xi, yi, zi, degree); // Coefficient interpolation matrix (tall)
NekMatrix<NekDouble> invertMatrix = Invert(matS);
// Get the interpolation matrix
return matT*invertMatrix;
}
int Nektar::LibUtilities::GetTetNumPoints ( int  degree)

Definition at line 216 of file NodalUtil.cpp.

Referenced by GetTetDegree().

{
return (degree+1) * (degree+2) * (degree+3) / 6;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTetVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
int  degree 
)

Definition at line 477 of file NodalUtil.cpp.

References GetSize(), and TetrahedralBasis().

Referenced by GetTetInterpolationMatrix(), GetTetVandermonde(), GetTetXDerivativeMatrix(), GetTetYDerivativeMatrix(), GetTetZDerivativeMatrix(), and MakeVmatrixOfTet().

{
//cout << "Begin GetTetVandermonde" << endl;
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2) * (degree + 3)/6;
NekMatrix<NekDouble> matV(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p <= d; ++p)
{
for(int q=0; q <= d - p; ++q, ++n)
{
int r = d - p - q;
NekVector<NekDouble> columnVector = TetrahedralBasis(p, q, r, x, y, z);
// cout << "degree = " << degree << ", (d,p,q,r) = (" << d << ", " << p << ", " << q << ", " << r << ")" << endl;
// Set n-th column of V to the TetrahedralBasis vector
for(int i=0; i<rows; ++i)
{
matV(i,n) = columnVector[i];
}
}
}
}
return matV;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTetVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 507 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), and GetTetVandermonde().

{
int rows = GetSize(x);
int degree = GetTetDegree(rows);
return GetTetVandermonde(x, y, z, degree);
}
Points< NekDouble >::MatrixSharedPtrType Nektar::LibUtilities::GetTetXDerivativeMatrix ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
const NekVector< NekDouble > &  xi,
const NekVector< NekDouble > &  yi,
const NekVector< NekDouble > &  zi 
)

Definition at line 806 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), GetTetVandermonde(), GetVandermondeForTetXDerivative(), and Invert().

Referenced by Nektar::LibUtilities::NodalTetElec::CalculateDerivMatrix(), and Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateDerivMatrix().

{
int nNodes = GetSize(x);
int degree = GetTetDegree(nNodes);
NekMatrix<NekDouble> matS = GetTetVandermonde(x, y, z); // Square 'short' matrix
NekMatrix<NekDouble> matTx = GetVandermondeForTetXDerivative(xi, yi, zi, degree); // Tall matrix
NekMatrix<NekDouble> invertMatrix = Invert(matS);
// Get the Derivation matrix
return Points<NekDouble>::MatrixSharedPtrType( new NekMatrix<NekDouble>(matTx*invertMatrix) );
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTetXDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
int  degree 
)

Definition at line 1427 of file NodalUtil.cpp.

References GetSize().

Referenced by GetTetXDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2) * (degree + 3) / 6;
NekMatrix<NekDouble> matVx(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p <= d; ++p)
{
for(int q=0; q <= d - p; ++q, ++n)
{
int r = d - p - q;
if(p > 0)
{
// Set n-th column of V to the monomial vector
for(int i=0; i<rows; ++i)
{
matVx(i,n) = p * pow(x[i],p-1.0) * pow(y[i],q) * pow(z[i],r);
}
}
else{
for(int j=0; j<rows; ++j)
{
matVx(j, n) = 0.0;
}
}
}
}
}
return matVx;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTetXDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 1460 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), and GetTetXDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int degree = GetTetDegree(rows);
return GetTetXDerivativeOfMonomialVandermonde(x, y, z, degree);
}
Points< NekDouble >::MatrixSharedPtrType Nektar::LibUtilities::GetTetYDerivativeMatrix ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
const NekVector< NekDouble > &  xi,
const NekVector< NekDouble > &  yi,
const NekVector< NekDouble > &  zi 
)

Definition at line 1047 of file NodalUtil.cpp.

References GetTetVandermonde(), GetVandermondeForTetYDerivative(), and Invert().

Referenced by Nektar::LibUtilities::NodalTetElec::CalculateDerivMatrix(), and Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateDerivMatrix().

{
// int nNodes = GetSize(y);
NekMatrix<NekDouble> matS = GetTetVandermonde(x, y, z); // Square 'short' matrix
NekMatrix<NekDouble> matTy = GetVandermondeForTetYDerivative(xi, yi, zi); // Tall matrix
NekMatrix<NekDouble> invertMatrix = Invert(matS);
NekMatrix<NekDouble> makeDerivativeMatrix = matTy*invertMatrix;
return Points<NekDouble>::MatrixSharedPtrType(new NekMatrix<NekDouble>(makeDerivativeMatrix));
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTetYDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
int  degree 
)

Definition at line 1468 of file NodalUtil.cpp.

References GetSize().

Referenced by GetTetYDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2) * (degree + 3) / 6;
NekMatrix<NekDouble> matVy(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p <= d; ++p)
{
for(int q=0; q <= d - p; ++q, ++n)
{
int r = d - p - q;
if(q > 0)
{
// Set n-th column of V to the monomial vector
for(int i=0; i<rows; ++i)
{
matVy(i,n) = q * pow(x[i],p) * pow(y[i],q-1.0) * pow(z[i],r);
}
}
else
{
for(int j=0; j<rows; ++j)
{
matVy(j, n) = 0.0;
}
}
}
}
}
return matVy;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTetYDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 1502 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), and GetTetYDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int degree = GetTetDegree(rows);
return GetTetYDerivativeOfMonomialVandermonde(x, y, z, degree);
}
Points< NekDouble >::MatrixSharedPtrType Nektar::LibUtilities::GetTetZDerivativeMatrix ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
const NekVector< NekDouble > &  xi,
const NekVector< NekDouble > &  yi,
const NekVector< NekDouble > &  zi 
)

Definition at line 1195 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), GetTetVandermonde(), GetVandermondeForTetZDerivative(), Invert(), and TetZDerivative().

Referenced by Nektar::LibUtilities::NodalTetElec::CalculateDerivMatrix(), and Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateDerivMatrix().

{
int nNodes = GetSize(z);
int degree = GetTetDegree(nNodes);
NekMatrix<NekDouble> matS = GetTetVandermonde(x, y, z); // Square 'short' matrix
NekMatrix<NekDouble> matTz = GetVandermondeForTetZDerivative(xi, yi, zi, degree); // Tall matrix
NekMatrix<NekDouble> invertMatrix = Invert(matS);
NekMatrix<NekDouble> makeDerivativeMatrix = matTz*invertMatrix;
Points<NekDouble>::MatrixSharedPtrType TetZDerivative;
TetZDerivative = Points<NekDouble>::MatrixSharedPtrType(new NekMatrix<NekDouble>(makeDerivativeMatrix));
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTetZDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
int  degree 
)

Definition at line 1510 of file NodalUtil.cpp.

References GetSize().

Referenced by GetTetZDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2) * (degree + 3) / 6;
NekMatrix<NekDouble> matVz(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p <= d; ++p)
{
for(int q=0; q <= d - p; ++q, ++n)
{
int r = d - p - q;
if(r > 0)
{
// Set n-th column of V to the monomial vector
for(int i=0; i<rows; ++i)
{
matVz(i,n) = r * pow(x[i],p) * pow(y[i],q) * pow(z[i],r-1.0);
}
}
else{
for(int j=0; j<rows; ++j)
{
matVz(j, n) = 0.0;
}
}
}
}
}
return matVz;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTetZDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 1543 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), and GetTetZDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int degree = GetTetDegree(rows);
return GetTetZDerivativeOfMonomialVandermonde(x, y, z, degree);
}
TimeIntegrationWrapperFactory & Nektar::LibUtilities::GetTimeIntegrationWrapperFactory ( )

Definition at line 42 of file TimeIntegrationWrapper.cpp.

Referenced by Diffusion::TimeIntegrate(), Nektar::SolverUtils::UnsteadySystem::v_InitObject(), and Nektar::SubSteppingExtrapolate::v_SubSteppingTimeIntegration().

{
typedef Loki::SingletonHolder<TimeIntegrationWrapperFactory,
Loki::CreateUsingNew,
Loki::NoDestroy > Type;
return Type::Instance();
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetTranspose ( const NekMatrix< NekDouble > &  matA)

Definition at line 96 of file NodalUtil.cpp.

{
int rows = matA.GetRows(), columns = matA.GetColumns();
NekMatrix<NekDouble> matX(rows,columns);
for( int i=0; i<rows; ++i )
{
for( int j=0; j<columns; ++j )
{
matX(j,i) = matA(i,j);
}
}
return matX;
}
int Nektar::LibUtilities::GetTriNumPoints ( int  degree)

Definition at line 202 of file NodalUtil.cpp.

Referenced by GetDegree().

{
return (degree+1) * (degree+2) / 2;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
int  degree 
)

Definition at line 515 of file NodalUtil.cpp.

References DubinerPoly(), and GetSize().

Referenced by GetInterpolationMatrix(), GetVandermonde(), GetXDerivativeMatrix(), GetYDerivativeMatrix(), and MakeVmatrixOfDubinerPolynomial().

{
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2) / 2;
NekMatrix<NekDouble> matV(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p<=d; ++p, ++n)
{
int q = d - p;
NekVector<NekDouble> columnVector = DubinerPoly(p, q, x, y);
// Set n-th column of V to the DubinerPoly vector
for(int i=0; i<rows; ++i)
{
matV(i,n) = columnVector[i];
}
}
}
return matV;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 540 of file NodalUtil.cpp.

References GetDegree(), GetSize(), and GetVandermonde().

{
int rows = GetSize(x);
int degree = GetDegree(rows);
return GetVandermonde( x, y, degree );
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForTetXDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
int  degree 
)

Definition at line 772 of file NodalUtil.cpp.

References GetSize(), and TetXDerivative().

Referenced by GetTetXDerivativeMatrix(), and GetVandermondeForTetXDerivative().

{
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2) * (degree + 3)/6;
NekMatrix<NekDouble> matVx(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p <= d; ++p)
{
for(int q=0; q <= d - p; ++q, ++n)
{
int r = d - p - q;
NekVector<NekDouble> columnVector = TetXDerivative(p, q, r, x, y, z);
// Set n-th column of V to the TetrahedralBasis vector
for(int i=0; i<rows; ++i)
{
matVx(i,n) = columnVector[i];
}
}
}
}
return matVx;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForTetXDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 799 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), and GetVandermondeForTetXDerivative().

{
int rows = GetSize(x);
int degree = GetTetDegree(rows);
return GetVandermondeForTetXDerivative(x, y, z, degree);
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForTetYDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
int  degree 
)

Definition at line 1013 of file NodalUtil.cpp.

References GetSize(), and TetYDerivative().

Referenced by GetTetYDerivativeMatrix(), and GetVandermondeForTetYDerivative().

{
int rows = GetSize(y);
int cols = (degree + 1) * (degree + 2) * (degree + 3)/6;
NekMatrix<NekDouble> matVy(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p <= d; ++p)
{
for(int q=0; q <= d - p; ++q, ++n)
{
int r = d - p - q;
NekVector<NekDouble> columnVector = TetYDerivative(p, q, r, x, y, z);
// Set n-th column of V to the TetrahedralBasis vector
for(int i=0; i<rows; ++i)
{
matVy(i,n) = columnVector[i];
}
}
}
}
return matVy;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForTetYDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 1039 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), and GetVandermondeForTetYDerivative().

{
int rows = GetSize(y);
int degree = GetTetDegree(rows);
return GetVandermondeForTetYDerivative(x, y, z, degree);
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForTetZDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z,
int  degree 
)

Definition at line 1161 of file NodalUtil.cpp.

References GetSize(), and TetZDerivative().

Referenced by GetTetZDerivativeMatrix(), and GetVandermondeForTetZDerivative().

{
int rows = GetSize(z);
int cols = (degree + 1) * (degree + 2) * (degree + 3)/6;
NekMatrix<NekDouble> matVz(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p <= d; ++p)
{
for(int q=0; q <= d - p; ++q, ++n)
{
int r = d - p - q;
NekVector<NekDouble> columnVector = TetZDerivative(p, q, r, x, y, z);
// Set n-th column of V to the TetrahedralBasis vector
for(int i=0; i<rows; ++i)
{
matVz(i,n) = columnVector[i];
}
}
}
}
return matVz;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForTetZDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 1187 of file NodalUtil.cpp.

References GetSize(), GetTetDegree(), and GetVandermondeForTetZDerivative().

{
int rows = GetSize(z);
int degree = GetTetDegree(rows);
return GetVandermondeForTetZDerivative(x, y, z, degree);
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForXDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
int  degree 
)

Definition at line 821 of file NodalUtil.cpp.

References DubinerPolyXDerivative(), and GetSize().

Referenced by GetVandermondeForXDerivative(), and GetXDerivativeMatrix().

{
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2)/2;
NekMatrix<NekDouble> matVx(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p<=d; ++p, ++n)
{
int q = d - p;
NekVector<NekDouble> columnVector = DubinerPolyXDerivative(p, q, x, y);
// Set n-th column of Vx to the DubinerPolyXDerivative vector
for(int i=0; i<rows; ++i)
{
matVx(i, n) = columnVector[i];
}
}
}
return matVx;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForXDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 845 of file NodalUtil.cpp.

References GetDegree(), GetSize(), and GetVandermondeForXDerivative().

{
int rows = GetSize(x);
int degree = GetDegree(rows);
return GetVandermondeForXDerivative(x, y, degree);
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForYDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
int  degree 
)

Definition at line 1280 of file NodalUtil.cpp.

References DubinerPolyYDerivative(), and GetSize().

Referenced by GetVandermondeForYDerivative(), and GetYDerivativeMatrix().

{
int rows = GetSize(y);
int cols = (degree + 1) * (degree + 2)/2;
NekMatrix<NekDouble> matVy(rows, cols, 0.0);
for(int d=0, n=0; d<=degree; ++d)
{
for(int p=0; p<=d; ++p, ++n)
{
int q = d - p;
NekVector<NekDouble> columnVector = DubinerPolyYDerivative(p, q, x, y);
for(int i=0; i<rows; ++i)
{
matVy(i, n) = columnVector[i];
}
}
}
return matVy;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetVandermondeForYDerivative ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 1320 of file NodalUtil.cpp.

References GetDegree(), GetSize(), and GetVandermondeForYDerivative().

{
int rows = GetSize(y);
int degree = GetDegree(rows);
return GetVandermondeForYDerivative(x, y, degree);
}
Points< NekDouble >::MatrixSharedPtrType Nektar::LibUtilities::GetXDerivativeMatrix ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  xi,
const NekVector< NekDouble > &  yi 
)

Definition at line 852 of file NodalUtil.cpp.

References GetDegree(), GetSize(), GetVandermonde(), GetVandermondeForXDerivative(), and Invert().

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

{
int nNodes = GetSize(x);
int degree = GetDegree(nNodes);
NekMatrix<NekDouble> matS = GetVandermonde(x, y); // Square 'short' matrix
NekMatrix<NekDouble> matTx = GetVandermondeForXDerivative(xi, yi, degree); // Tall matrix
NekMatrix<NekDouble> invertMatrix = Invert(matS);
// Get the Derivation matrix
return Points<NekDouble>::MatrixSharedPtrType( new NekMatrix<NekDouble>(matTx*invertMatrix) );
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetXDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
int  degree 
)

Definition at line 1389 of file NodalUtil.cpp.

References GetSize().

Referenced by GetXDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2) / 2;
NekMatrix<NekDouble> matVx(rows, cols, 0.0);
for(int d=0, n=0; d <= degree; ++d)
{
for(int p=0; p <= d; ++p, ++n)
{
int q = d - p;
if(p > 0)
{
for(int i=0; i<rows; ++i)
{
matVx(i, n) = p * pow(x[i], p-1.0) * pow(y[i],q);
}
}
else
{
for(int j=0; j<rows; ++j)
{
matVx(j, n) = 0.0;
}
}
}
}
return matVx;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetXDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 1420 of file NodalUtil.cpp.

References GetDegree(), GetSize(), and GetXDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int degree = GetDegree(rows);
}
Points< NekDouble >::MatrixSharedPtrType Nektar::LibUtilities::GetYDerivativeMatrix ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  xi,
const NekVector< NekDouble > &  yi 
)

Definition at line 1303 of file NodalUtil.cpp.

References GetDegree(), GetSize(), GetVandermonde(), GetVandermondeForYDerivative(), and Invert().

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

{
int nNodes = GetSize(y);
int degree = GetDegree(nNodes);
NekMatrix<NekDouble> matS = GetVandermonde(x, y); // Square 'short' matrix
NekMatrix<NekDouble> matTy = GetVandermondeForYDerivative(xi, yi, degree); // Tall matrix
NekMatrix<NekDouble> invertMatrix = Invert(matS);
// Get the Derivation matrix
return Points<NekDouble>::MatrixSharedPtrType( new NekMatrix<NekDouble>(matTy*invertMatrix) );
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetYDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
int  degree 
)

Definition at line 1551 of file NodalUtil.cpp.

References GetSize().

Referenced by GetYDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int cols = (degree + 1) * (degree + 2) / 2;
NekMatrix<NekDouble> matVy(rows, cols, 0.0);
for(int d=0, n=0; d <= degree; ++d)
{
for(int p=0; p <= d; ++p, ++n)
{
int q = d - p;
if(q > 0)
{
for(int i=0; i<rows; ++i)
{
matVy(i, n) = q * pow(x[i], p) * pow(y[i], q-1.0);
}
}
else
{
for(int j=0; j<rows; ++j)
{
matVy(j, n) = 0.0;
}
}
}
}
return matVy;
}
NekMatrix< NekDouble > Nektar::LibUtilities::GetYDerivativeOfMonomialVandermonde ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 1581 of file NodalUtil.cpp.

References GetDegree(), GetSize(), and GetYDerivativeOfMonomialVandermonde().

{
int rows = GetSize(x);
int degree = GetDegree(rows);
}
NekVector< NekDouble > Nektar::LibUtilities::Hadamard ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 131 of file NodalUtil.cpp.

References GetSize().

Referenced by LegendrePoly(), LegendrePolyDerivative(), TetYDerivative(), and TetZDerivative().

{
int size = GetSize(x);
NekVector<NekDouble> z(size);
for( int i=0; i<size; ++i )
{
z[i] = x[i] * y[i];
}
return z;
}
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 
)

Imports an FLD file.

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.

Definition at line 106 of file FieldIO.cpp.

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

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

{
#ifdef NEKTAR_USE_MPI
int size;
int init;
MPI_Initialized(&init);
// If MPI has been initialised we can check the number of processes
// and, if > 1, tell the user he should not be running this
// function in parallel. If it is not initialised, we do not
// initialise it here, and assume the user knows what they are
// doing.
if (init)
{
MPI_Comm_size( MPI_COMM_WORLD, &size );
ASSERTL0(size == 1,
"This static function is not available in parallel. Please"
"instantiate a FieldIO object for parallel use.");
}
#endif
FieldIO f(c);
f.Import(infilename, fielddefs, fielddata, fieldinfomap, ElementiDs);
}
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 54 of file Interp.cpp.

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

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

{
Interp1D(fbasis0.GetPointsKey(),from,tbasis0.GetPointsKey(),to);
}
void Nektar::LibUtilities::Interp1D ( const PointsKey &  fpoints0,
const Array< OneD, const NekDouble > &  from,
const PointsKey &  tpoints0,
Array< OneD, NekDouble > &  to 
)

Definition at line 62 of file Interp.cpp.

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

{
if(fpoints0 == tpoints0) //check to see if the same
{
Vmath::Vcopy(fpoints0.GetNumPoints(),from,1,to,1);
}
else // interpolate
{
I0 = PointsManager()[fpoints0]->GetI(tpoints0);
NekVector<NekDouble> in(fpoints0.GetNumPoints(),from,eWrapper);
NekVector<NekDouble> out(tpoints0.GetNumPoints(),to,eWrapper);
out = (*I0)*in;
}
}
void Nektar::LibUtilities::Interp1D ( const BasisKey &  fbasis0,
const NekDouble *  from,
const BasisKey &  tbasis0,
NekDouble *  to 
)

Definition at line 84 of file Interp.cpp.

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

{
Interp1D(fbasis0.GetPointsKey(),from,tbasis0.GetPointsKey(),to);
}
void Nektar::LibUtilities::Interp1D ( const PointsKey &  fpoints0,
const NekDouble *  from,
const PointsKey &  tpoints0,
NekDouble *  to 
)

Definition at line 92 of file Interp.cpp.

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

{
if(fpoints0 == tpoints0) //check to see if the same
{
Vmath::Vcopy(fpoints0.GetNumPoints(),from,1,to,1);
}
else // interpolate
{
I0 = PointsManager()[fpoints0]
->GetI(tpoints0);
Blas::Dgemv('N', tpoints0.GetNumPoints(), fpoints0.GetNumPoints(),
1.0, I0->GetPtr().get(), tpoints0.GetNumPoints(),
from, 1, 0.0, to, 1);
}
}
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 116 of file Interp.cpp.

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

Referenced by Nektar::SpatialDomains::GeomFactors::Interp(), Interp2D(), Nektar::SpatialDomains::QuadGeom::QuadGeom(), Nektar::SpatialDomains::TriGeom::TriGeom(), Nektar::LocalRegions::PyrExp::v_ComputeFaceNormal(), Nektar::LocalRegions::TetExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeFaceNormal(), Nektar::LocalRegions::QuadExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::Expansion::v_GetCoords(), Nektar::LocalRegions::PyrExp::v_GetFacePhysVals(), Nektar::LocalRegions::TetExp::v_GetFacePhysVals(), Nektar::LocalRegions::PrismExp::v_GetFacePhysVals(), Nektar::LocalRegions::HexExp::v_GetFacePhysVals(), Nektar::MultiRegions::ExpList2D::v_GetNormals(), and Nektar::MultiRegions::ExpList2D::v_PhysInterp1DScaled().

{
Interp2D(fbasis0.GetPointsKey(),fbasis1.GetPointsKey(),from.data(),
tbasis0.GetPointsKey(),tbasis1.GetPointsKey(),to.data());
}
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 127 of file Interp.cpp.

References Interp2D().

{
Interp2D(fpoints0,fpoints1,from.data(),tpoints0,tpoints1,to.data());
}
void Nektar::LibUtilities::Interp2D ( const PointsKey &  fpoints0,
const PointsKey &  fpoints1,
const NekDouble *  from,
const PointsKey &  tpoints0,
const PointsKey &  tpoints1,
NekDouble *  to 
)

Definition at line 137 of file Interp.cpp.

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

{
Array<OneD, NekDouble> wsp(tpoints1.GetNumPoints()*fpoints0.GetNumPoints()); // fnp0*tnp1
int fnp0 = fpoints0.GetNumPoints();
int fnp1 = fpoints1.GetNumPoints();
int tnp0 = tpoints0.GetNumPoints();
int tnp1 = tpoints1.GetNumPoints();
if(fpoints1 == tpoints1)
{
Vmath::Vcopy(fnp0*tnp1,from,1,wsp.get(),1);
}
else
{
I1 = PointsManager()[fpoints1]->GetI(tpoints1);
Blas::Dgemm('N', 'T', fnp0, tnp1, fnp1, 1.0, from, fnp0,
I1->GetPtr().get(), tnp1, 0.0, wsp.get(), fnp0);
}
if(fpoints0 == tpoints0)
{
Vmath::Vcopy(tnp0*tnp1,wsp.get(),1,to,1);
}
else
{
I0 = PointsManager()[fpoints0]->GetI(tpoints0);
Blas::Dgemm('N', 'N', tnp0, tnp1, fnp0, 1.0, I0->GetPtr().get(),
tnp0, wsp.get(), fnp0, 0.0, to, tnp0);
}
}
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 178 of file Interp.cpp.

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

Referenced by Nektar::SpatialDomains::GeomFactors::Interp(), Interp3D(), Nektar::LocalRegions::Expansion::v_GetCoords(), and Nektar::MultiRegions::ExpList3D::v_PhysInterp1DScaled().

{
Interp3D(fbasis0.GetPointsKey(),fbasis1.GetPointsKey(),
fbasis2.GetPointsKey(),from.data(),
tbasis0.GetPointsKey(),tbasis1.GetPointsKey(),
tbasis2.GetPointsKey(),to.data());
}
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 194 of file Interp.cpp.

References Interp3D().

{
Interp3D(fpoints0,fpoints1,fpoints2,from.data(),
tpoints0,tpoints1,tpoints2,to.data());
}
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 207 of file Interp.cpp.

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

{
int i;
DNekMatSharedPtr I0, I1, I2;
int fnp0 = fpoints0.GetNumPoints();
int fnp1 = fpoints1.GetNumPoints();
int fnp2 = fpoints2.GetNumPoints();
int tnp0 = tpoints0.GetNumPoints();
int tnp1 = tpoints1.GetNumPoints();
int tnp2 = tpoints2.GetNumPoints();
Array<OneD, NekDouble> wsp1(tnp0*tnp1*fnp2);
Array<OneD, NekDouble> wsp2(tnp0*fnp1*fnp2);
I0 = PointsManager()[fpoints0]->GetI(tpoints0);
I1 = PointsManager()[fpoints1]->GetI(tpoints1);
I2 = PointsManager()[fpoints2]->GetI(tpoints2);
Blas::Dgemm('N', 'N', tnp0, fnp1*fnp2, fnp0, 1.0, I0->GetPtr().get(),
tnp0, from, fnp0, 0.0, wsp2.get(), tnp0);
for(i = 0; i < fnp2; i++)
{
Blas::Dgemm('N', 'T', tnp0, tnp1, fnp1, 1.0, wsp2.get()+i*tnp0*fnp1,
tnp0, I1->GetPtr().get(), tnp1, 0.0, wsp1.get()+i*tnp0*tnp1, tnp0);
}
Blas::Dgemm('N', 'T', tnp0*tnp1, tnp2, fnp2, 1.0, wsp1.get(),
tnp0*tnp1, I2->GetPtr().get(), tnp2, 0.0, to, tnp0*tnp1);
}
void Nektar::LibUtilities::InterpCoeff1D ( const BasisKey &  fbasis0,
const Array< OneD, const NekDouble > &  from,
const BasisKey &  tbasis0,
Array< OneD, NekDouble > &  to 
)

Definition at line 47 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().

{
ASSERTL0(fbasis0.GetNumModes() == tbasis0.GetNumModes(),
"Number of modes must be the same for "
"interpolating coefficients");
// Check to see if the same basis
if (fbasis0.GetBasisType() == tbasis0.GetBasisType())
{
Vmath::Vcopy(fbasis0.GetNumModes(), from, 1, to, 1);
}
else
{
// interpolate
DNekMatSharedPtr ftB = BasisManager()[fbasis0]->GetI(tbasis0);
NekVector<NekDouble> in (fbasis0.GetNumModes(), from, eWrapper);
NekVector<NekDouble> out(tbasis0.GetNumModes(), to, eWrapper);
out = (*ftB)*in;
}
}
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 73 of file InterpCoeff.cpp.

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

{
InterpCoeff2D(fbasis0, fbasis1, from.data(),
tbasis0, tbasis1, to. data());
}
void Nektar::LibUtilities::InterpCoeff2D ( const BasisKey &  fbasis0,
const BasisKey &  fbasis1,
const NekDouble *  from,
const BasisKey &  tbasis0,
const BasisKey &  tbasis1,
NekDouble *  to 
)

Definition at line 84 of file InterpCoeff.cpp.

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

{
const int fnm0 = fbasis0.GetNumModes();
const int fnm1 = fbasis1.GetNumModes();
const int tnm0 = tbasis0.GetNumModes();
const int tnm1 = tbasis1.GetNumModes();
Array<OneD, NekDouble> wsp(tnm1 * fnm0);
if (fbasis1.GetBasisType() == tbasis1.GetBasisType())
{
Vmath::Vcopy(fnm0*tnm1, from, 1, wsp.get(), 1);
}
else
{
// interpolate
DNekMatSharedPtr ft1 = BasisManager()[fbasis1]->GetI(tbasis1);
Blas::Dgemm('N', 'T', fnm0, tnm1, fnm1, 1.0, from, fnm0,
ft1->GetPtr().get(), tnm1, 0.0, wsp.get(), fnm0);
}
if (fbasis0.GetBasisType() == tbasis0.GetBasisType())
{
Vmath::Vcopy(tnm0*tnm1, wsp.get(), 1, to, 1);
}
else
{
// interpolate
DNekMatSharedPtr ft0 = BasisManager()[fbasis0]->GetI(tbasis0);
Blas::Dgemm('N', 'N', tnm0, tnm1, fnm0, 1.0, ft0->GetPtr().get(),
tnm0, wsp.get(), fnm0, 0.0, to, tnm0);
}
}
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 125 of file InterpCoeff.cpp.

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

{
InterpCoeff3D(fbasis0, fbasis1, fbasis2, from.data(),
tbasis0, tbasis1, tbasis2, to. data());
}
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 138 of file InterpCoeff.cpp.

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

{
const int fnm0 = fbasis0.GetNumModes();
const int fnm1 = fbasis1.GetNumModes();
const int fnm2 = fbasis2.GetNumModes();
const int tnm0 = tbasis0.GetNumModes();
const int tnm1 = tbasis1.GetNumModes();
const int tnm2 = tbasis2.GetNumModes();
Array<OneD, NekDouble> wsp1(tnm0 * tnm1 * fnm2);
Array<OneD, NekDouble> wsp2(tnm0 * fnm1 * fnm2);
DNekMatSharedPtr ft0 = BasisManager()[fbasis0]->GetI(tbasis0);
DNekMatSharedPtr ft1 = BasisManager()[fbasis1]->GetI(tbasis1);
DNekMatSharedPtr ft2 = BasisManager()[fbasis2]->GetI(tbasis2);
Blas::Dgemm('N', 'N', tnm0, fnm1*fnm2, fnm0, 1.0,
ft0->GetPtr().get(), tnm0, from, fnm0, 0.0,
wsp2.get(), tnm0);
for (int i = 0; i < fnm2; i++)
{
Blas::Dgemm('N', 'T', tnm0, tnm1, fnm1, 1.0,
wsp2.get()+i*tnm0*fnm1, tnm0, ft1->GetPtr().get(),
tnm1, 0.0, wsp1.get()+i*tnm0*tnm1, tnm0);
}
Blas::Dgemm('N', 'T', tnm0*tnm1, tnm2, fnm2, 1.0, wsp1.get(),
tnm0*tnm1, ft2->GetPtr().get(), tnm2,
0.0, to, tnm0*tnm1);
}
NekMatrix< NekDouble > Nektar::LibUtilities::Invert ( const NekMatrix< NekDouble > &  matA)

Definition at line 79 of file NodalUtil.cpp.

References GetE(), SetColumn(), and Nektar::LinearSystem::Solve().

Referenced by GetInterpolationMatrix(), GetTetInterpolationMatrix(), GetTetXDerivativeMatrix(), GetTetYDerivativeMatrix(), GetTetZDerivativeMatrix(), GetXDerivativeMatrix(), GetYDerivativeMatrix(), and Nektar::NekMatrix< DataType, StandardMatrixTag >::Invert().

{
int rows = matA.GetRows(), columns = matA.GetColumns();
NekMatrix<NekDouble> matX(rows,columns);
// The linear system solver
LinearSystem matL( SharedNekMatrixPtr(new NekMatrix<NekDouble>(matA)) );
// Solve each column for the identity matrix
for( int j=0; j<columns; ++j )
{
SetColumn( matX, j, matL.Solve( GetE(rows,j) ) );
}
return matX;
}
NekVector< NekDouble > Nektar::LibUtilities::JacobiPoly ( int  degree,
const NekVector< NekDouble > &  x,
NekDouble  alpha,
NekDouble  beta 
)

Definition at line 253 of file NodalUtil.cpp.

References GetSize().

Referenced by DubinerPoly(), DubinerPolyXDerivative(), DubinerPolyYDerivative(), JacobiPoly(), JacobiPolyDerivative(), TetrahedralBasis(), TetXDerivative(), TetYDerivative(), and TetZDerivative().

{
int size = GetSize(x);
NekVector<NekDouble> y(size);
if(degree == 0)
{
// Set y to ones
y = NekVector<NekDouble>(size, 1.0);
}
else if (degree == 1)
{
for(int el=0; el<size; ++el)
{
y[el] = 0.5*(alpha - beta + (alpha + beta + 2.0) * x[el]);
}
}
else if (degree > 1)
{
NekDouble degm1 = degree - 1.0;
NekDouble tmp = 2.0 * degm1 + alpha + beta;
NekDouble a1 = 2.0 * (degm1 + 1.0) * (degm1 + alpha + beta + 1.0) * tmp;
NekDouble a2 = (tmp + 1.0) * (alpha * alpha - beta * beta);
NekDouble a3 = tmp * (tmp + 1.0) * (tmp + 2.0);
NekDouble a4 = 2.0 * (degm1 + alpha) * (degm1 + beta) * (tmp + 2.0);
// TODO: Make this efficient: Reuse the degree-2 for the degree-1 call.
// This can be done in linear time, but it is currently implemented to run in exponential time.
NekVector<NekDouble> z2 = JacobiPoly(degree-2, x, alpha, beta);
NekVector<NekDouble> z1 = JacobiPoly(degree-1, x, alpha, beta);
for (int el=0; el<size; ++el)
{
y[el] = ((a2 + a3 * x[el]) * z1[el] - a4 * z2[el])/a1;
}
}
else
{
cerr << "Bad degree" << endl;
}
return y;
}
NekDouble Nektar::LibUtilities::JacobiPoly ( int  degree,
NekDouble  x,
NekDouble  alpha,
NekDouble  beta 
)

Definition at line 300 of file NodalUtil.cpp.

References JacobiPoly().

{
NekDouble y = 0.0;
if(degree == 0)
{
y = 1.0;
}
else if (degree == 1)
{
y = 0.5*(alpha - beta + (alpha + beta + 2.0) * x);
}
else if (degree > 1)
{
NekDouble degm1 = degree - 1.0;
NekDouble tmp = 2.0 * degm1 + alpha + beta;
NekDouble a1 = 2.0 * (degm1 + 1.0) * (degm1 + alpha + beta + 1.0) * tmp;
NekDouble a2 = (tmp + 1.0) * (alpha * alpha - beta * beta);
NekDouble a3 = tmp * (tmp + 1.0) * (tmp + 2.0);
NekDouble a4 = 2.0 * (degm1 + alpha) * (degm1 + beta) * (tmp + 2.0);
// TODO: Make this efficient: Reuse the degree-2 for the degree-1 call.
// This can be done in linear time, but it is currently implemented to run in exponential time.
NekDouble z2 = JacobiPoly(degree-2, x, alpha, beta);
NekDouble z1 = JacobiPoly(degree-1, x, alpha, beta);
y = ((a2 + a3 * x) * z1 - a4 * z2)/a1;
}
else
{
cerr << "Bad degree" << endl;
}
return y;
}
NekVector< NekDouble > Nektar::LibUtilities::JacobiPolyDerivative ( int  degree,
const NekVector< NekDouble > &  x,
int  alpha,
int  beta 
)

Definition at line 867 of file NodalUtil.cpp.

References GetSize(), and JacobiPoly().

Referenced by DubinerPolyYDerivative(), TetYDerivative(), and TetZDerivative().

{
int size = GetSize(x);
NekVector<NekDouble> y(size);
if(degree == 0)
{
y = NekVector<NekDouble>(size, 0.0);
}
else
{
y = 0.5 * (alpha + beta + degree + 1) * JacobiPoly(degree - 1, x, alpha + 1, beta + 1);
}
return y;
}
NekVector< NekDouble > Nektar::LibUtilities::LegendrePoly ( int  degree,
const NekVector< NekDouble > &  x 
)

Definition at line 340 of file NodalUtil.cpp.

References GetSize(), and Hadamard().

Referenced by DubinerPoly(), DubinerPolyYDerivative(), TetrahedralBasis(), TetYDerivative(), and TetZDerivative().

{
int size = GetSize(x);
NekVector<NekDouble> y(size);
if(degree > 1)
{
NekVector<NekDouble> a0(size, 1.0);
NekVector<NekDouble> a1 = x;
NekVector<NekDouble> a2(size);
for(int i=2; i<=degree; ++i)
{
NekDouble b = NekDouble(2.0*i-1.0)/i;
NekDouble c = NekDouble(i-1.0)/i;
// multiply each elements in matrix
a2 = b * Hadamard(a1, x) - c * a0;
a0 = a1;
a1 = a2;
}
y = a2;
}
else if( degree == 1 )
{
y = x;
}
else
{
y = NekVector<NekDouble>(size, 1.0);
}
return y;
}
NekVector< NekDouble > Nektar::LibUtilities::LegendrePolyDerivative ( int  degree,
const NekVector< NekDouble > &  x 
)

Definition at line 624 of file NodalUtil.cpp.

References GetSize(), and Hadamard().

Referenced by DubinerPolyXDerivative(), DubinerPolyYDerivative(), TetXDerivative(), TetYDerivative(), and TetZDerivative().

{
int size = GetSize(x);
NekVector<NekDouble> y(size), b3(size), a2(size);
if(degree >= 3)
{
NekVector<NekDouble> b0(size, 0.0), b1(size, 1.0), b2 = 3.0 * x;
NekVector<NekDouble> a0(size, 1.0), a1 = x;
for(int n=3; n<=degree; ++n)
{
a2 = ((2.0*n - 3.0)/(n - 1.0)) * Hadamard(x, a1) - (n - 2.0)/(n - 1.0) * a0;
a0 = a1;
a1 = a2;
b3 = (2.0*n - 1.0)/n * (Hadamard(b2, x) + a2) - (n - 1.0)/n * b1;
b1 = b2;
b2 = b3;
}
y = b3;
}
else if(degree == 2)
{
y = 3.0 * x;
}
else if(degree == 1)
{
y = NekVector<NekDouble>(size, 1.0);
}
else
{
y = NekVector<NekDouble>(size, 0.0);
}
return y;
}
NekVector< NekDouble > Nektar::LibUtilities::MakeDubinerQuadratureSystem ( int  nBasisFunctions)

Definition at line 236 of file NodalUtil.cpp.

Referenced by MakeQuadratureWeights().

{
// Make the vector of integrals: note that each modal basis function integrates to zero except for the 0th degree
NekVector<NekDouble> g(nBasisFunctions, 0.0);
g(0) = sqrt(2.0);
return g;
}
NekVector< NekDouble > Nektar::LibUtilities::MakeQuadratureWeights ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)
NekDouble Nektar::LibUtilities::MakeRound ( NekDouble  x)

Definition at line 231 of file NodalUtil.cpp.

Referenced by GetDegree(), GetTetDegree(), MatrixToString(), and VectorToString().

{
return floor(x + 0.5);
}
NekVector< NekDouble > Nektar::LibUtilities::MakeTetQuadratureSystem ( int  nBasisFunctions)

Definition at line 245 of file NodalUtil.cpp.

Referenced by MakeTetWeights().

{
NekVector<NekDouble> g(nBasisFunctions, 0.0);
g(0) = 1.0;
return g;
}
NekVector< NekDouble > Nektar::LibUtilities::MakeTetWeights ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 562 of file NodalUtil.cpp.

References Nektar::NekVector< DataType >::GetRows(), MakeTetQuadratureSystem(), MakeVmatrixOfTet(), and Nektar::LinearSystem::SolveTranspose().

Referenced by Nektar::LibUtilities::NodalTetElec::CalculateWeights(), and Nektar::LibUtilities::NodalTetEvenlySpaced::CalculateWeights().

{
NekVector<NekDouble> g = MakeTetQuadratureSystem(x.GetRows());
// Initialize the linear system solver
LinearSystem matL(matV);
// Deduce the quadrature weights
NekVector<NekDouble> w = matL.SolveTranspose(g);
return w;
}
SharedNekMatrixPtr Nektar::LibUtilities::MakeVmatrixOfDubinerPolynomial ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y 
)

Definition at line 554 of file NodalUtil.cpp.

References GetVandermonde().

Referenced by MakeQuadratureWeights().

{
// Construct the Vandermonde matrix of DubinerPolynomials
SharedNekMatrixPtr vandermonde(new NekMatrix<NekDouble>( GetVandermonde(x, y) ));
return vandermonde;
}
SharedNekMatrixPtr Nektar::LibUtilities::MakeVmatrixOfTet ( const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 547 of file NodalUtil.cpp.

References GetTetVandermonde().

Referenced by MakeTetWeights().

{
// Construct the Vandermonde matrix of Tetrahedron
SharedNekMatrixPtr vMat(new NekMatrix<NekDouble>( GetTetVandermonde(x, y, z)));
return vMat;
}
std::string Nektar::LibUtilities::MatrixToString ( const NekMatrix< NekDouble > &  A,
int  precision,
NekDouble  expSigFigs 
)

Definition at line 157 of file NodalUtil.cpp.

References MakeRound().

{
stringstream s;
s << setprecision(precision);
int M = int(A.GetRows()), N = int(A.GetColumns());
for(int i=0; i<M; ++i )
{
for(int j=0; j<N; ++j)
{
NekDouble a = MakeRound(expSigFigs * A(i, j)) / expSigFigs;
s << setw(7) << right << a;
if( j < N-1 )
{
s << ", ";
}
}
if( i < M-1 )
{
s << "\n";
}
}
return s.str();
}
static const BasisKey Nektar::LibUtilities::NullBasisKey ( eNoBasisType  ,
,
NullPointsKey   
)
static
static const PointsKey Nektar::LibUtilities::NullPointsKey ( ,
eNoPointsType   
)
static
static const TimeIntegrationSchemeKey Nektar::LibUtilities::NullTimeIntegrationSchemeKey ( eNoTimeIntegrationMethod  )
static
bool Nektar::LibUtilities::operator!= ( const GraphVertexObject &  x,
const GraphVertexObject &  y 
)

Definition at line 76 of file Graph.cpp.

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

{
return (x.m_id != y.m_id);
}
bool Nektar::LibUtilities::operator!= ( const BasisKey &  x,
const BasisKey &  y 
)

Definition at line 723 of file Basis.cpp.

{
return (!(x == y));
}
bool Nektar::LibUtilities::operator!= ( const BasisKey *  x,
const BasisKey &  y 
)

Definition at line 729 of file Basis.cpp.

{
return (!(*x == y));
}
bool Nektar::LibUtilities::operator!= ( const BasisKey &  x,
const BasisKey *  y 
)

Definition at line 735 of file Basis.cpp.

{
return (!(x == *y));
}
bool Nektar::LibUtilities::operator< ( const BasisKey &  lhs,
const BasisKey &  rhs 
)

Definition at line 49 of file Basis.cpp.

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

{
PointsKey lhsPointsKey = lhs.GetPointsKey();
PointsKey rhsPointsKey = rhs.GetPointsKey();
if (lhsPointsKey < rhsPointsKey)
{
return true;
}
if (lhsPointsKey != rhsPointsKey)
{
return false;
}
if (lhs.m_nummodes < rhs.m_nummodes)
{
return true;
}
if (lhs.m_nummodes > rhs.m_nummodes)
{
return false;
}
return (lhs.m_basistype < rhs.m_basistype);
}
bool Nektar::LibUtilities::operator< ( const PointsKey &  lhs,
const PointsKey &  rhs 
)

Definition at line 55 of file Points.cpp.

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

{
if (lhs.m_numpoints < rhs.m_numpoints)
{
return true;
}
if (lhs.m_numpoints > rhs.m_numpoints)
{
return false;
}
if (lhs.m_pointstype < rhs.m_pointstype)
{
return true;
}
if (lhs.m_pointstype > rhs.m_pointstype)
{
return false;
}
if(lhs.m_factor < rhs.m_factor)
{
return true;
}
if(lhs.m_factor > rhs.m_factor)
{
return true;
}
return false;
}
bool Nektar::LibUtilities::operator< ( const TimeIntegrationSchemeKey &  lhs,
const TimeIntegrationSchemeKey &  rhs 
)

Definition at line 58 of file TimeIntegrationScheme.cpp.

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

{
return (lhs.m_method < rhs.m_method);
}
std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const TimeIntegrationSchemeKey &  rhs 
)

Definition at line 68 of file TimeIntegrationScheme.cpp.

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

{
os << "Time Integration Scheme: " << TimeIntegrationMethodMap[rhs.GetIntegrationMethod()] << endl;
return os;
}
std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const BasisKey &  rhs 
)

Definition at line 85 of file Basis.cpp.

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

Referenced by operator<<().

{
os << "NumModes: " << rhs.GetNumModes() << " BasisType: " << BasisTypeMap[rhs.GetBasisType()];
os << " " << rhs.GetPointsKey() << std::endl;
return os;
}
std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const PointsKey &  rhs 
)

Definition at line 95 of file Points.cpp.

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

{
os << "NumPoints: " << rhs.GetNumPoints() << " PointsType: " << kPointsTypeStr[rhs.GetPointsType()] << std::endl;
return os;
}
std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const TimeIntegrationSchemeSharedPtr &  rhs 
)

Definition at line 1771 of file TimeIntegrationScheme.cpp.

References operator<<().

{
return operator<<(os,*rhs);
}
std::ostream & Nektar::LibUtilities::operator<< ( std::ostream &  os,
const TimeIntegrationScheme &  rhs 
)

Definition at line 1776 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().

{
int i,j;
int r = rhs.GetNsteps();
int s = rhs.GetNstages();
TimeIntegrationSchemeType type = rhs.GetIntegrationSchemeType();
int oswidth = 9;
int osprecision = 6;
os << "Time Integration Scheme: " << TimeIntegrationMethodMap[rhs.GetIntegrationMethod()] << endl;
os << "- number of steps: " << r << endl;
os << "- number of stages: " << s << endl;
os << "- type of scheme: " << TimeIntegrationSchemeTypeMap[rhs.GetIntegrationSchemeType()] << endl;
os << "General linear method tableau: " << endl;
for(i = 0; i < s; i++)
{
for(j = 0; j < s; j++)
{
os.width(oswidth);
os.precision(osprecision);
os << right << rhs.A(i,j) << " ";
}
if(type == eIMEX)
{
os << " '";
for(j = 0; j < s; j++)
{
os.width(oswidth);
os.precision(osprecision);
os << right << rhs.A_IMEX(i,j) << " ";
}
}
os << " |";
for(j = 0; j < r; j++)
{
os.width(oswidth);
os.precision(osprecision);
os << right << rhs.U(i,j);
}
os << endl;
}
int imexflag = (type == eIMEX)?2:1;
for(int i = 0; i < (r+imexflag*s)*(oswidth+1)+imexflag*2-1; i++)
{
os << "-";
}
os << endl;
for(i = 0; i < r; i++)
{
for(j = 0; j < s; j++)
{
os.width(oswidth);
os.precision(osprecision);
os << right << rhs.B(i,j) << " ";
}
if(type == eIMEX)
{
os << " '";
for(j = 0; j < s; j++)
{
os.width(oswidth);
os.precision(osprecision);
os << right << rhs.B_IMEX(i,j) << " ";
}
}
os << " |";
for(j = 0; j < r; j++)
{
os.width(oswidth);
os.precision(osprecision);
os << right << rhs.V(i,j);
}
os << endl;
}
return os;
}
bool Nektar::LibUtilities::operator== ( const PointsKey &  lhs,
const PointsKey &  rhs 
)

Definition at line 49 of file Points.cpp.

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

{
return (lhs.m_numpoints == rhs.m_numpoints &&
lhs.m_pointstype == rhs.m_pointstype);
}
bool Nektar::LibUtilities::operator== ( const TimeIntegrationSchemeKey &  lhs,
const TimeIntegrationSchemeKey &  rhs 
)

Definition at line 53 of file TimeIntegrationScheme.cpp.

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

{
return (lhs.m_method == rhs.m_method);
}
bool Nektar::LibUtilities::operator== ( const GraphVertexObject &  x,
const GraphVertexObject &  y 
)

Definition at line 71 of file Graph.cpp.

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

{
return (x.m_id == y.m_id);
}
bool Nektar::LibUtilities::operator== ( const BasisKey &  x,
const BasisKey &  y 
)

Definition at line 703 of file Basis.cpp.

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

{
return (x.GetPointsKey() == y.GetPointsKey() &&
x.m_basistype == y.m_basistype &&
x.GetNumModes() == y.GetNumModes());
}
bool Nektar::LibUtilities::operator== ( const BasisKey *  x,
const BasisKey &  y 
)

Definition at line 711 of file Basis.cpp.

{
return (*x == y);
}
bool Nektar::LibUtilities::operator== ( const BasisKey &  x,
const BasisKey *  y 
)

Definition at line 717 of file Basis.cpp.

{
return (x == *y);
}
bool Nektar::LibUtilities::operator> ( const BasisKey &  lhs,
const BasisKey &  rhs 
)

Definition at line 75 of file Basis.cpp.

{
return (rhs < lhs);
}
void Nektar::LibUtilities::PhysGalerkinProject1D ( const BasisKey &  fbasis0,
const Array< OneD, const NekDouble > &  from,
const BasisKey &  tbasis0,
Array< OneD, NekDouble > &  to 
)

Definition at line 53 of file PhysGalerkinProject.cpp.

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

Referenced by PhysGalerkinProject1D().

{
PhysGalerkinProject1D(fbasis0.GetPointsKey(),from,tbasis0.GetPointsKey(),to);
}
void Nektar::LibUtilities::PhysGalerkinProject1D ( const PointsKey &  fpoints0,
const Array< OneD, const NekDouble > &  from,
const PointsKey &  tpoints0,
Array< OneD, NekDouble > &  to 
)

Definition at line 61 of file PhysGalerkinProject.cpp.

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

{
if(fpoints0 == tpoints0) //check to see if the same
{
Vmath::Vcopy(fpoints0.GetNumPoints(),from,1,to,1);
}
else // interpolate
{
GP0 = PointsManager()[tpoints0]->GetGalerkinProjection(fpoints0);
NekVector<NekDouble> in(fpoints0.GetNumPoints(),from,eWrapper);
NekVector<NekDouble> out(tpoints0.GetNumPoints(),to,eWrapper);
GP0->Transpose();
out = (*GP0)*in;
}
}
void Nektar::LibUtilities::PhysGalerkinProject1D ( const BasisKey &  fbasis0,
const NekDouble *  from,
const BasisKey &  tbasis0,
NekDouble *  to 
)

Definition at line 84 of file PhysGalerkinProject.cpp.

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

{
PhysGalerkinProject1D(fbasis0.GetPointsKey(),from,tbasis0.GetPointsKey(),to);
}
void Nektar::LibUtilities::PhysGalerkinProject1D ( const PointsKey &  fpoints0,
const NekDouble *  from,
const PointsKey &  tpoints0,
NekDouble *  to 
)

Definition at line 92 of file PhysGalerkinProject.cpp.

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

{
if(fpoints0 == tpoints0) //check to see if the same
{
Vmath::Vcopy(fpoints0.GetNumPoints(),from,1,to,1);
}
else // interpolate
{
GP0 = PointsManager()[tpoints0]
->GetGalerkinProjection(fpoints0);
Blas::Dgemv('T', tpoints0.GetNumPoints(), fpoints0.GetNumPoints(),
1.0, GP0->GetPtr().get(), tpoints0.GetNumPoints(),
from, 1, 0.0, to, 1);
}
}
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 116 of file PhysGalerkinProject.cpp.

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

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

{
PhysGalerkinProject2D(fbasis0.GetPointsKey(),fbasis1.GetPointsKey(),from.data(),
tbasis0.GetPointsKey(),tbasis1.GetPointsKey(),to.data());
}
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 127 of file PhysGalerkinProject.cpp.

References PhysGalerkinProject2D().

{
PhysGalerkinProject2D(fpoints0,fpoints1,from.data(),tpoints0,tpoints1,to.data());
}
void Nektar::LibUtilities::PhysGalerkinProject2D ( const PointsKey &  fpoints0,
const PointsKey &  fpoints1,
const NekDouble *  from,
const PointsKey &  tpoints0,
const PointsKey &  tpoints1,
NekDouble *  to 
)

Definition at line 137 of file PhysGalerkinProject.cpp.

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

{
Array<OneD, NekDouble> wsp(tpoints1.GetNumPoints()*fpoints0.GetNumPoints()); // fnp0*tnp1
int fnp0 = fpoints0.GetNumPoints();
int fnp1 = fpoints1.GetNumPoints();
int tnp0 = tpoints0.GetNumPoints();
int tnp1 = tpoints1.GetNumPoints();
if(fpoints1 == tpoints1)
{
Vmath::Vcopy(fnp0*tnp1,from,1,wsp.get(),1);
}
else
{
GP1 = PointsManager()[tpoints1]->GetGalerkinProjection(fpoints1);
Blas::Dgemm('N', 'T', fnp0, tnp1, fnp1, 1.0, from, fnp0,
GP1->GetPtr().get(), tnp1, 0.0, wsp.get(), fnp0);
}
if(fpoints0 == tpoints0)
{
Vmath::Vcopy(tnp0*tnp1,wsp.get(),1,to,1);
}
else
{
GP0 = PointsManager()[tpoints0]->GetGalerkinProjection(fpoints0);
Blas::Dgemm('N', 'N', tnp0, tnp1, fnp0, 1.0,
GP0->GetPtr().get(),
tnp0, wsp.get(), fnp0, 0.0, to, tnp0);
}
}
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 178 of file PhysGalerkinProject.cpp.

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

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

{
PhysGalerkinProject3D(fbasis0.GetPointsKey(),
fbasis1.GetPointsKey(),
fbasis2.GetPointsKey(),
from.data(),
tbasis0.GetPointsKey(),
tbasis1.GetPointsKey(),
tbasis2.GetPointsKey(),
to.data());
}
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 197 of file PhysGalerkinProject.cpp.

References PhysGalerkinProject3D().

{
PhysGalerkinProject3D(fpoints0,fpoints1,fpoints2,from.data(),
tpoints0,tpoints1,tpoints2,to.data());
}
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 210 of file PhysGalerkinProject.cpp.

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

{
DNekMatSharedPtr GP0,GP1,GP2;
int fnp0 = fpoints0.GetNumPoints();
int fnp1 = fpoints1.GetNumPoints();
int fnp2 = fpoints2.GetNumPoints();
int tnp0 = tpoints0.GetNumPoints();
int tnp1 = tpoints1.GetNumPoints();
int tnp2 = tpoints2.GetNumPoints();
Array<OneD, NekDouble> wsp1(fnp0*tnp1*tnp2);
Array<OneD, NekDouble> wsp2(fnp0*fnp1*tnp2);
GP2 = PointsManager()[tpoints2]->GetGalerkinProjection(fpoints2);
Blas::Dgemm('N', 'T', fnp0*fnp1, tnp2, fnp2, 1.0, from, fnp0*fnp1,
GP2->GetPtr().get(), tnp2, 0.0, wsp2.get(), fnp0*fnp1);
GP1 = PointsManager()[tpoints1]->GetGalerkinProjection(fpoints1);
for(int i = 0; i < tnp2; i++)
{
Blas::Dgemm('N', 'T', fnp0, tnp1, fnp1, 1.0,
wsp2.get()+i*fnp0*fnp1,
fnp0, GP1->GetPtr().get(),tnp1, 0.0,
wsp1.get()+i*fnp0*tnp1,
fnp0);
}
GP0 = PointsManager()[tpoints0]->GetGalerkinProjection(fpoints0);
Blas::Dgemm('N', 'N', tnp0, tnp1*tnp2, fnp0, 1.0,
GP0->GetPtr().get(), tnp0, wsp1.get(), fnp0, 0.0,
to, tnp0);
}
PointsManagerT & Nektar::LibUtilities::PointsManager ( void  )
std::string Nektar::LibUtilities::PortablePath ( const boost::filesystem::path &  path)

create portable path on different platforms for boost::filesystem path

Definition at line 41 of file FileSystem.cpp.

Referenced by Nektar::SolverUtils::UnsteadySystem::CheckForRestartTime(), Nektar::LibUtilities::SessionReader::GetSessionNameRank(), Nektar::LibUtilities::FieldIO::Import(), Nektar::LibUtilities::SessionReader::PartitionMesh(), Nektar::LibUtilities::FieldIO::SetUpOutput(), Nektar::LibUtilities::MeshPartition::WriteAllPartitions(), and Nektar::LibUtilities::MeshPartition::WriteLocalPartition().

{
fs::path temp = path;
#if BOOST_VERSION > 104200
temp.make_preferred();
return temp.string();
#else
return temp.file_string();
#endif
}
NekMatrix< NekDouble > & Nektar::LibUtilities::SetColumn ( NekMatrix< NekDouble > &  matA,
int  n,
const NekVector< NekDouble > &  x 
)

Definition at line 62 of file NodalUtil.cpp.

Referenced by Invert().

{
for( int i=0; i<int(matA.GetRows()); ++i )
{
matA(i,n) = x[i];
}
return matA;
}
NekDouble Nektar::LibUtilities::sign ( NekDouble  arg)

Definition at line 97 of file AnalyticExpressionEvaluator.cpp.

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

{
return (arg > 0.0) - (arg < 0.0);
}
NekVector< NekDouble > Nektar::LibUtilities::TetrahedralBasis ( int  p,
int  q,
int  r,
const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 415 of file NodalUtil.cpp.

References GetSize(), JacobiPoly(), and LegendrePoly().

Referenced by GetTetVandermonde().

{
// Get the coordinate transform
int size = GetSize(x);
NekVector<NekDouble> eta_1(size), eta_2(size);
// Initialize the horizontal coordinate of the Tetrahedral
for(int el=0; el<size; ++el)
{
if( z[el] < -y[el] - numeric_limits<NekDouble>::epsilon() )
{
eta_1[el] = 2.0*(1.0 + x[el])/(-y[el]-z[el]) - 1.0;
}
else
{
eta_1[el] = -1.0;
}
}
// Initialize the coordinate of the Tetrahedral
for(int el=0; el<size; ++el)
{
if( z[el] < 1.0 - numeric_limits<NekDouble>::epsilon())
{
eta_2[el] = 2.0*(1.0 + y[el]) / (1.0 - z[el]) - 1.0;
}
else
{
eta_2[el] = -1.0; // When z is close to 1, then we have a removeable singularity
eta_1[el] = -1.0; // When z is close to 1, then we have a removeable singularity
}
}
// Initialize the vertical coordinate of the Tetrahedral
NekVector<NekDouble> eta_3 = z;
// Orthogonal basis polynomial
int alpha = 2*p + 1; int beta = 0;
int alpha_r = 2*p + 2*q + 2; int beta_r = 0;
NekVector<NekDouble> phi(size);
NekVector<NekDouble> psi_a = LegendrePoly(p,eta_1);
NekVector<NekDouble> psi_bpq = JacobiPoly(q, eta_2, alpha, beta);
NekVector<NekDouble> psi_cpqr = JacobiPoly(r, eta_3, alpha_r, beta_r);
NekDouble w = 1.0;
for(int el=0; el<size; ++el)
{
NekDouble zeta_1 = pow((1.0 - eta_2[el])/2.0, p);
NekDouble zeta_2 = pow((1.0 - eta_3[el])/2.0, p+q);
NekDouble psi_b = zeta_1 * psi_bpq[el];
NekDouble psi_c = zeta_2 * psi_cpqr[el];
phi[el] = w * psi_a[el] * psi_b * psi_c;
}
return phi;
}
NekVector< NekDouble > Nektar::LibUtilities::TetXDerivative ( int  p,
int  q,
int  r,
const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 711 of file NodalUtil.cpp.

References Nektar::NekVector< DataType >::GetRows(), GetSize(), JacobiPoly(), and LegendrePolyDerivative().

Referenced by GetVandermondeForTetXDerivative().

{
// Get the coordinate transform
int size = GetSize(y);
NekVector<NekDouble> eta_1(size), eta_2(size);
NekVector<NekDouble> psi_x(x.GetRows());
if(p > 0){
// Initialize the horizontal coordinate of the Tetrahedral (beta in Barycentric coordinate)
for(int el=0; el<size; ++el)
{
if( y[el] < -z[el] - numeric_limits<NekDouble>::epsilon())
{
eta_1[el] = 2.0*(1.0 + x[el])/(-y[el]-z[el]) - 1.0;
} else
{
eta_1[el] = -1.0;
}
}
// Initialize the coordinate of the Tetrahedral (gamma in Barycentric coordinate)
for(int el=0; el<size; ++el)
{
if( z[el] < 1.0 - numeric_limits<NekDouble>::epsilon())
{
eta_2[el] = 2.0*(1.0 + y[el]) / (1.0 - z[el]) - 1.0;
}
else
{
eta_2[el] = -1.0; // When z is close to 1, then we have a removeable singularity
}
}
// Initialize the vertical coordinate of the Tetrahedral (delta in Barycentric coordinate)
NekVector<NekDouble> eta_3 = z;
// Orthogonal basis polynomial x-derivative
int alpha = 2*p + 1; int beta = 0;
int alpha_r = 2*p + 2*q + 2; int beta_r = 0;
NekVector<NekDouble> psi_a_x = LegendrePolyDerivative(p,eta_1);
NekVector<NekDouble> psi_bpq = JacobiPoly(q, eta_2, alpha, beta);
NekVector<NekDouble> psi_cpqr = JacobiPoly(r, eta_3, alpha_r, beta_r);
for(int el=0; el<size; ++el)
{
NekDouble jacobi_b = pow((1.0-eta_2[el])/2.0, p-1.0);
NekDouble jacobi_c = pow((1.0-eta_3[el])/2.0,p+q-1.0);
NekDouble psi_b = jacobi_b * psi_bpq[el];
NekDouble psi_c = jacobi_c * psi_cpqr[el];
psi_x[el] = psi_a_x[el] * psi_b * psi_c;
}
}
else
{
for(int el=0; el<int(x.GetRows()); ++el)
{
psi_x[el] = 0.0;
}
}
return psi_x;
}
NekVector< NekDouble > Nektar::LibUtilities::TetYDerivative ( int  p,
int  q,
int  r,
const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 886 of file NodalUtil.cpp.

References GetSize(), Hadamard(), JacobiPoly(), JacobiPolyDerivative(), LegendrePoly(), LegendrePolyDerivative(), and VectorPower().

Referenced by GetVandermondeForTetYDerivative().

{
// Get the coordinate transform
int size = GetSize(y);
NekVector<NekDouble> eta_1(size), eta_2(size);
NekVector<NekDouble> eta_1_dy(size), eta_2_dy(size);
// Initialize the collapsed horizontal coordinate of the Tetrahedral
for(int el=0; el<size; ++el)
{
if( y[el] < -z[el] - numeric_limits<NekDouble>::epsilon())
{
eta_1[el] = 2.0*(1.0 + x[el])/(-y[el]-z[el]) - 1.0;
eta_1_dy[el] = 2.0*(1.0 + x[el])/((y[el]+z[el])*(y[el]+z[el]));
}
else
{
eta_1[el] = -1.0;
eta_1_dy[el] = 0.0; // No change in the squeeze direction
}
}
// Initialize the collapsed depth coordinate of the Tetrahedral
for(int el=0; el<size; ++el)
{
if( z[el] < 1.0 - numeric_limits<NekDouble>::epsilon())
{
eta_2[el] = 2.0*(1.0 + y[el]) / (1.0 - z[el]) - 1.0;
eta_2_dy[el] = 2.0/(1.0 - z[el]);
}
else
{
// When z is close to 1, then we have a removeable singularity
eta_2[el] = -1.0;
eta_2_dy[el] = 0.0; // No change in the squeeze direction
}
}
// Initialize the collapsed vertical coordinate of the Tetrahedral
NekVector<NekDouble> eta_3 = z;
// Orthogonal basis expansion polynomials and their y-derivatives for the tetrahedron
// phi(vec xi) = psi_a(eta_1(xi)) * psi_b(eta_2(xi)) * psi_c(eta_3(xi))
int alpha_b = 2*p + 1; int beta_b = 0;
int alpha_c = 2*p + 2*q + 2; int beta_c = 0;
NekVector<NekDouble> ones( size, 1.0 );
NekVector<NekDouble> jacobi_b = VectorPower( (ones - eta_2)/2.0, p );
NekVector<NekDouble> jacobi_c = VectorPower( (ones - eta_3)/2.0, p+q );
NekVector<NekDouble> J_q = JacobiPoly(q, eta_2, alpha_b, beta_b);
NekVector<NekDouble> J_r = JacobiPoly(r, eta_3, alpha_c, beta_c);
NekVector<NekDouble> psi_a = LegendrePoly(p, eta_1);
NekVector<NekDouble> LD = LegendrePolyDerivative(p, eta_1);
NekVector<NekDouble> JD = JacobiPolyDerivative(q, eta_2, alpha_b, beta_b);
NekVector<NekDouble> psi_b = Hadamard( J_q, jacobi_b );
NekVector<NekDouble> psi_c = Hadamard( J_r, jacobi_c );
// Compute the partials wrt y (psi_c_dy = 0)
NekVector<NekDouble> secondComponentOfPsi_b_dy( size, 0.0 );
if(p > 0)
{
for(int i=0; i<size; ++i)
{
NekDouble jacobi_b_dy = -p / 2.0 * pow( (1.0 - eta_2[i])/2.0, p-1.0 );
secondComponentOfPsi_b_dy[i] = J_q[i] * jacobi_b_dy;
}
}
else
{
for(int i=0; i<size; ++i)
{
secondComponentOfPsi_b_dy[i] = 0.0;
}
}
NekVector<NekDouble> psi_a_dy = Hadamard( LegendrePolyDerivative(p, eta_1), eta_1_dy );
NekVector<NekDouble> psi_b_dy = Hadamard( Hadamard( JacobiPolyDerivative(q, eta_2, alpha_b, beta_b), jacobi_b)
+ secondComponentOfPsi_b_dy, eta_2_dy );
NekVector<NekDouble> psi_dy(size);
for(int k=0; k<size; ++k)
{
psi_dy[k] = (psi_a_dy[k]*psi_b[k]*psi_c[k]) + (psi_a[k]*psi_b_dy[k]*psi_c[k]);
}
// Fix singularity at z=1
for(int k=0; k<size; ++k)
{
if( z[k] >= 1.0 - numeric_limits<NekDouble>::epsilon() )
{
if( p + q > 0 )
{
psi_dy[k] = ((2.0*p+q+2.0)*JacobiPoly(q, eta_2[k], alpha_b, 1) - (p+q+2.0)*J_q[k]) *
psi_a[k] * pow( (1.0-eta_3[k])/2.0, p+q-1 ) / 2.0 * ((p+q+r+3.0)*J_r[k] - (2.0*p+2.0*q+r+3.0)*JacobiPoly(r, eta_3[k], alpha_c, 1));
}
else
{
psi_dy[k] = 0.0;
}
}
}
// cout << "(p,q,r) = (" << p << ", " << q << ", " << r << ")" << endl;
//
// cout << "psi_a = " << VectorToString(psi_a) << endl;
// cout << "psi_b = " << VectorToString(psi_b) << endl;
// cout << "psi_c = " << VectorToString(psi_c) << endl;
// cout << "psi_a_dy = " << VectorToString(psi_a_dy) << endl;
// cout << "psi_b_dy = " << VectorToString(psi_b_dy) << endl;
// cout << "(psi_a_dy*psi_b*psi_c) = " << VectorToString(Hadamard(Hadamard(psi_a_dy,psi_b), psi_c)) << endl;
// cout << "(psi_a*jacobi_b*psi_b_dy*psi_c) = " << VectorToString(Hadamard(Hadamard(psi_a,jacobi_b),Hadamard(psi_b_dy,psi_c))) << endl;
// cout << "secondComponentOfPsi_b_dy = " << VectorToString(secondComponentOfPsi_b_dy) << endl;
//
// cout << "psi_dy = " << VectorToString(psi_dy) << endl;
// // // cout << "jacobi_c = " << VectorToString(jacobi_c) << endl;
// // // cout << "eta_3 = " << VectorToString(eta_3) << endl;
// // // cout << "ones - eta_3 = " << VectorToString(ones - eta_3) << endl;
// // // cout << "(ones - eta_3)/2.0 = " << VectorToString((ones - eta_3)/2.0) << endl;
return psi_dy;
}
NekVector< NekDouble > Nektar::LibUtilities::TetZDerivative ( int  p,
int  q,
int  r,
const NekVector< NekDouble > &  x,
const NekVector< NekDouble > &  y,
const NekVector< NekDouble > &  z 
)

Definition at line 1064 of file NodalUtil.cpp.

References GetSize(), Hadamard(), JacobiPoly(), JacobiPolyDerivative(), LegendrePoly(), LegendrePolyDerivative(), and VectorPower().

Referenced by GetTetZDerivativeMatrix(), and GetVandermondeForTetZDerivative().

{
int size = GetSize(z);
NekVector<NekDouble> eta_1(size), eta_2(size);
NekVector<NekDouble> eta_1_dz(size), eta_2_dz(size);
// Initialize the collapsed horizontal coordinate of the Tetrahedral
for(int el=0; el<size; ++el)
{
if( y[el] < -z[el] - numeric_limits<NekDouble>::epsilon())
{
eta_1[el] = 2.0*(1.0 + x[el]) / (-y[el]-z[el]) - 1.0;
eta_1_dz[el] = 2.0*(1.0 + x[el]) / ((y[el]+z[el])*(y[el]+z[el]));
}
else
{
eta_1[el] = -1.0;
eta_1_dz[el] = 0.0; // No change in the squeeze direction
}
}
// Initialize the collapsed depth coordinate of the Tetrahedral
for(int el=0; el<size; ++el)
{
if( z[el] < 1.0 - numeric_limits<NekDouble>::epsilon())
{
eta_2[el] = 2.0*(1.0 + y[el]) / (1.0 - z[el]) - 1.0;
eta_2_dz[el] = 2.0*(1.0 + y[el]) / ((1.0 - z[el])*(1.0 - z[el]));
}
else
{ // When z is close to 1, then we have a removeable singularity
eta_2[el] = -1.0;
eta_2_dz[el] = 0.0; // No change in the squeeze direction
}
}
// Initialize the collapsed vertical coordinate of the Tetrahedral
NekVector<NekDouble> eta_3 = z;
NekVector<NekDouble> eta_3_dz(size, 1.0);
// Orthogonal basis expansion polynomials and their z-derivatives for the tetrahedron
// phi(vec xi) = psi_a(eta_1(xi)) * psi_b(eta_2(xi)) * psi_c(eta_3(xi))
int alpha_b = 2*p + 1; int beta_b = 0;
int alpha_c = 2*p + 2*q + 2; int beta_c = 0;
NekVector<NekDouble> ones( size, 1.0 );
NekVector<NekDouble> jacobi_b = VectorPower( (ones - eta_2)/2.0, p );
NekVector<NekDouble> jacobi_c = VectorPower( (ones - eta_3)/2.0, p+q );
NekVector<NekDouble> J_q = JacobiPoly(q, eta_2, alpha_b, beta_b);
NekVector<NekDouble> J_r = JacobiPoly(r, eta_3, alpha_c, beta_c);
NekVector<NekDouble> psi_a = LegendrePoly(p, eta_1);
NekVector<NekDouble> psi_b = Hadamard( J_q, jacobi_b );
NekVector<NekDouble> psi_c = Hadamard( J_r, jacobi_c );
// Compute the partials wrt y and z (psi_c_dy = 0)
NekVector<NekDouble> secondComponentOfPsi_b_dz( size, 0.0 );
NekVector<NekDouble> secondComponentOfPsi_c_dz( size, 0.0 );
if(p > 0)
{
for(int i=0; i<size; ++i)
{
NekDouble jacobi_b_dz = -p / 2.0 * pow( (1.0 - eta_2[i])/2.0, p-1.0 );
secondComponentOfPsi_b_dz[i] = J_q[i] * jacobi_b_dz;
}
}
if(p + q > 0)
{
for(int i=0; i<size; ++i)
{
NekDouble jacobi_c_dz = -(p+q)/2.0*pow( (1.0 - eta_3[i])/2.0, p+q-1.0);
secondComponentOfPsi_c_dz[i] = J_r[i] * jacobi_c_dz;
}
}
NekVector<NekDouble> psi_a_dz = Hadamard( LegendrePolyDerivative(p, eta_1), eta_1_dz );
NekVector<NekDouble> psi_b_dz = Hadamard( Hadamard(JacobiPolyDerivative(q, eta_2, alpha_b, beta_b), jacobi_b)
+ secondComponentOfPsi_b_dz, eta_2_dz );
NekVector<NekDouble> psi_c_dz = Hadamard( Hadamard(JacobiPolyDerivative(r, eta_3, alpha_c, beta_c), jacobi_c)
+ secondComponentOfPsi_c_dz, eta_3_dz );
NekVector<NekDouble> psi_dz(size);
for(int k=0; k<size; ++k)
{
psi_dz[k] = psi_a_dz[k] * psi_b[k] * psi_c[k] + psi_a[k] * psi_b_dz[k] * psi_c[k] + psi_a[k] * psi_b[k] * psi_c_dz[k];
}
return psi_dz;
}
TimeIntegrationSchemeManagerT & Nektar::LibUtilities::TimeIntegrationSchemeManager ( void  )

Definition at line 45 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::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::TimeIntegrationRungeKutta2_ImprovedEuler::v_InitObject(), Nektar::LibUtilities::TimeIntegrationRungeKutta2_ModifiedEuler::v_InitObject(), Nektar::LibUtilities::TimeIntegrationClassicalRungeKutta4::v_InitObject(), Nektar::LibUtilities::TimeIntegrationDIRKOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationDIRKOrder3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationMidpoint::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsBashforthOrder3::v_InitObject(), Nektar::LibUtilities::TimeIntegrationAdamsMoultonOrder2::v_InitObject(), Nektar::LibUtilities::TimeIntegrationIMEXGear::v_InitObject(), Nektar::LibUtilities::TimeIntegrationCNAB::v_InitObject(), and Nektar::LibUtilities::TimeIntegrationMCNAB::v_InitObject().

{
TimeIntegrationSchemeManagerT& m = Loki::SingletonHolder<TimeIntegrationSchemeManagerT>::Instance();
m.RegisterGlobalCreator(TimeIntegrationScheme::Create);
return m;
}
Array< OneD, NekDouble > Nektar::LibUtilities::ToArray ( const NekVector< NekDouble > &  x)

Definition at line 126 of file NodalUtil.cpp.

References Nektar::NekVector< DataType >::GetPtr(), and GetSize().

{
return Array<OneD, NekDouble>( GetSize(x), x.GetPtr() );
}
NekVector< NekDouble > Nektar::LibUtilities::ToVector ( const Array< OneD, const NekDouble > &  x)

Definition at line 121 of file NodalUtil.cpp.

References GetSize().

{
return NekVector<NekDouble>( GetSize(x), x.data() );
}
NekVector< NekDouble > Nektar::LibUtilities::VectorPower ( const NekVector< NekDouble > &  x,
NekDouble  p 
)

Definition at line 143 of file NodalUtil.cpp.

References GetSize().

Referenced by TetYDerivative(), and TetZDerivative().

{
int size = GetSize(x);
NekVector<NekDouble> z(size);
for( int i=0; i<size; ++i )
{
z[i] = pow( x[i], p );
}
return z;
}
std::string Nektar::LibUtilities::VectorToString ( const NekVector< NekDouble > &  v,
int  precision,
NekDouble  expSigFigs 
)

Definition at line 183 of file NodalUtil.cpp.

References Nektar::NekVector< DataType >::GetRows(), and MakeRound().

{
stringstream s;
s << setprecision(precision) << "[ ";
int N = int(v.GetRows());
for(int j=0; j<N; ++j )
{
NekDouble x = MakeRound(expSigFigs * v(j)) / expSigFigs;
s << setw(7) << right << x;
if( j < N-1 )
{
s << ", ";
}
}
s << " ]";
return s.str();
}
void Nektar::LibUtilities::Write ( const std::string &  outFile,
std::vector< FieldDefinitionsSharedPtr > &  fielddefs,
std::vector< std::vector< NekDouble > > &  fielddata,
const FieldMetaDataMap &  fieldinfomap 
)

Write a field file in serial only.

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.

Definition at line 72 of file FieldIO.cpp.

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

Referenced by CalcNonLinearForcing(), main(), WriteBcs(), Writefield(), WriteFld(), Nektar::LinearisedAdvection::WriteFldBase(), and Nektar::PulseWaveSystem::WriteVessels().

{
#ifdef NEKTAR_USE_MPI
int size;
int init;
MPI_Initialized(&init);
// If MPI has been initialised we can check the number of processes
// and, if > 1, tell the user he should not be running this
// function in parallel. If it is not initialised, we do not
// initialise it here, and assume the user knows what they are
// doing.
if (init)
{
MPI_Comm_size( MPI_COMM_WORLD, &size );
ASSERTL0(size == 1,
"This static function is not available in parallel. Please"
"instantiate a FieldIO object for parallel use.");
}
#endif
FieldIO f(c);
f.Write(outFile, fielddefs, fielddata, fieldinfomap);
}

Variable Documentation

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

Definition at line 47 of file Foundations.hpp.

Referenced by Nektar::LibUtilities::FieldIO::ImportFieldDefs(), operator<<(), Nektar::SpatialDomains::MeshGraph::ReadExpansions(), Nektar::SpatialDomains::MeshGraph::SetExpansions(), and Nektar::LibUtilities::FieldIO::Write().

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

Definition at line 92 of file SessionReader.h.

const std::string Nektar::LibUtilities::kPointsTypeStr[]
const unsigned int Nektar::LibUtilities::NodalTetElecAvailable = 10

Definition at line 23 of file NodalTetElecData.h.

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

Definition at line 10 of file NodalTriElecData.h.

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

Definition at line 10 of file NodalTriFeketeData.h.

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

Definition at line 358 of file Basis.h.

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

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

Definition at line 359 of file Basis.h.

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

Definition at line 61 of file FieldIO.h.

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

Definition at line 62 of file FieldIO.h.

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

Definition at line 63 of file FieldIO.h.

std::vector<std::vector< NekDouble> > Nektar::LibUtilities::NullVectorNekDoubleVector = boost::assign::list_of(NullNekDoubleVector)
static

Definition at line 67 of file FieldIO.h.

Referenced by Nektar::LibUtilities::FieldIO::Import().

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().

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().

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().

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().

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.

const unsigned int Nektar::LibUtilities::perm3A_2d[3][3] = {{0,1,2},{2,0,1},{0,2,1}}
static
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.

const unsigned int Nektar::LibUtilities::perm3B_2d[3][3] = {{0,1,2},{1,0,2},{1,2,0}}
static
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.

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
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.

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().

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
const unsigned int Nektar::LibUtilities::ShapeTypeDimMap[SIZE_ShapeType]
Initial value:
{
0,
0,
1,
2,
2,
3,
3,
3,
3,
}

Definition at line 81 of file ShapeType.hpp.

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

const char* const Nektar::LibUtilities::ShapeTypeMap[]
Initial value:
{
"NoGeomShapeType",
"Point",
"Segment",
"Triangle",
"Quadrilateral",
"Tetrahedron",
"Pyramid",
"Prism",
"Hexahedron"
}

Definition at line 66 of file ShapeType.hpp.

Referenced by Nektar::LibUtilities::FieldIO::ImportFieldDefs(), Nektar::MultiRegions::operator<<(), Nektar::StdRegions::operator<<(), and Nektar::LibUtilities::FieldIO::Write().

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

Definition at line 142 of file TimeIntegrationScheme.h.

Referenced by operator<<().