Nektar++
Classes | Typedefs | Enumerations | Functions | Variables
Nektar::MultiRegions Namespace Reference

Classes

class  AllToAll
 
class  AllToAllV
 
class  AssemblyCommDG
 Implements communication for populating forward and backwards spaces across processors in the discontinuous Galerkin routines. More...
 
class  AssemblyMap
 Base class for constructing local to global mapping of degrees of freedom. More...
 
class  AssemblyMapCG
 Constructs mappings for the C0 scalar continuous Galerkin formulation. More...
 
class  AssemblyMapDG
 
class  BottomUpSubStructuredGraph
 
struct  cmpop
 
class  ContField
 This class is the abstraction of a global continuous two- dimensional spectral/hp element expansion which approximates the solution of a set of partial differential equations. More...
 
class  ContField3DHomogeneous1D
 
class  ContField3DHomogeneous2D
 
class  DisContField
 This class is the abstractio n of a global discontinuous two- dimensional spectral/hp element expansion which approximates the solution of a set of partial differential equations. More...
 
class  DisContField3DHomogeneous1D
 
class  DisContField3DHomogeneous2D
 
class  ExchangeMethod
 
class  ExpList
 Base class for all multi-elemental spectral/hp expansions. More...
 
class  ExpList2DHomogeneous1D
 Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expansions. More...
 
class  ExpList2DHomogeneous2D
 Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expansions. More...
 
class  ExpList3DHomogeneous1D
 Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expansions. More...
 
class  ExpList3DHomogeneous2D
 Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expansions. More...
 
class  ExpListHomogeneous1D
 Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expansions. More...
 
class  ExpListHomogeneous2D
 Abstraction of a two-dimensional multi-elemental expansion which is merely a collection of local expansions. More...
 
class  GJPStabilisation
 
class  GlobalLinSys
 A global linear system. More...
 
class  GlobalLinSysDirect
 A global linear system. More...
 
class  GlobalLinSysDirectFull
 A global linear system. More...
 
class  GlobalLinSysDirectStaticCond
 A global linear system. More...
 
class  GlobalLinSysIterative
 A global linear system. More...
 
class  GlobalLinSysIterativeFull
 A global linear system. More...
 
class  GlobalLinSysIterativeStaticCond
 A global linear system. More...
 
class  GlobalLinSysKey
 Describe a linear system. More...
 
class  GlobalLinSysPETSc
 A PETSc global linear system. More...
 
class  GlobalLinSysPETScFull
 A global linear system. More...
 
class  GlobalLinSysPETScStaticCond
 A global linear system. More...
 
class  GlobalLinSysStaticCond
 A global linear system. More...
 
class  GlobalLinSysXxt
 
class  GlobalLinSysXxtFull
 A global linear system. More...
 
class  GlobalLinSysXxtStaticCond
 A global linear system. More...
 
class  GlobalMatrix
 Represents a matrix of all degrees of freedom. More...
 
class  GlobalMatrixKey
 Describes a matrix with ordering defined by a local to global map. More...
 
class  InterfaceExchange
 
class  InterfaceMapDG
 
class  InterfaceTrace
 
class  LocTraceToTraceMap
 A helper class to deal with trace operations in the discontinuous Galerkin code. More...
 
class  MultiLevelBisectedGraph
 
class  NeighborAllToAllV
 
class  Pairwise
 
class  PatchMap
 
struct  PeriodicEntity
 
class  Preconditioner
 
class  PreconditionerBlock
 
class  PreconditionerDiagonal
 
class  PreconditionerJacobi
 
class  PreconditionerLinear
 
class  PreconditionerLinearWithBlock
 
class  PreconditionerLinearWithDiag
 
class  PreconditionerLinearWithLowEnergy
 
class  PreconditionerLowEnergy
 
class  PreconditionerNull
 
struct  RobinBCInfo
 
struct  RotPeriodicInfo
 
class  Serial
 
class  SubGraph
 

Typedefs

typedef std::shared_ptr< ExchangeMethodExchangeMethodSharedPtr
 
typedef std::shared_ptr< AssemblyCommDGAssemblyCommDGSharedPtr
 
typedef std::shared_ptr< AssemblyMapAssemblyMapSharedPtr
 
typedef std::shared_ptr< AssemblyMapCGAssemblyMapCGSharedPtr
 
typedef std::tuple< int, int, NekDoubleExtraDirDof
 
typedef std::vector< std::map< int, int > > DofGraph
 
typedef std::shared_ptr< AssemblyMapDGAssemblyMapDGSharedPtr
 
typedef std::shared_ptr< InterfaceTraceInterfaceTraceSharedPtr
 
typedef std::shared_ptr< InterfaceExchangeInterfaceExchangeSharedPtr
 
typedef std::shared_ptr< InterfaceMapDGInterfaceMapDGSharedPtr
 
typedef std::shared_ptr< ExpListExpListSharedPtr
 Shared pointer to an ExpList object. More...
 
typedef std::tuple< LibUtilities::PointsKey, LibUtilities::PointsKey, LibUtilities::PointsKey, LibUtilities::PointsKeyTraceInterpPoints
 Map holding points distributions required for interpolation of local traces onto global trace in two and three dimensions. More...
 
typedef std::shared_ptr< LocTraceToTraceMapLocTraceToTraceMapSharedPtr
 
typedef std::shared_ptr< ContFieldContFieldSharedPtr
 
typedef std::shared_ptr< ContField3DHomogeneous1DContField3DHomogeneous1DSharedPtr
 
typedef std::shared_ptr< ContField3DHomogeneous2DContField3DHomogeneous2DSharedPtr
 
typedef std::shared_ptr< DisContFieldDisContFieldSharedPtr
 
typedef std::shared_ptr< DisContField3DHomogeneous1DDisContField3DHomogeneous1DSharedPtr
 
typedef std::shared_ptr< DisContField3DHomogeneous2DDisContField3DHomogeneous2DSharedPtr
 
typedef std::map< GlobalMatrixKey, DNekScalBlkMatSharedPtrBlockMatrixMap
 A map between global matrix keys and their associated block matrices. More...
 
typedef std::shared_ptr< BlockMatrixMapBlockMatrixMapShPtr
 A shared pointer to a BlockMatrixMap. More...
 
typedef std::shared_ptr< ExpList2DHomogeneous1DExpList2DHomogeneous1DSharedPtr
 Shared pointer to an ExpList2DHomogeneous1D object. More...
 
typedef std::vector< ExpList2DHomogeneous1DSharedPtrExpList2DHomogeneous1DVector
 Vector of pointers to ExpList2DHomogeneous1D objects. More...
 
typedef std::shared_ptr< ExpList2DHomogeneous2DExpList2DHomogeneous2DSharedPtr
 Shared pointer to an ExpList2DHomogeneous2D object. More...
 
typedef std::vector< ExpList2DHomogeneous2DSharedPtrExpList2DHomogeneous2DVector
 Vector of pointers to ExpList2DHomogeneous2D objects. More...
 
typedef std::shared_ptr< ExpList3DHomogeneous1DExpList3DHomogeneous1DSharedPtr
 Shared pointer to an ExpList3DHomogeneous1D object. More...
 
typedef std::vector< ExpList3DHomogeneous1DSharedPtrExpList3DHomogeneous1DVector
 Vector of pointers to ExpList3DHomogeneous1D objects. More...
 
typedef std::shared_ptr< ExpList3DHomogeneous2DExpList3DHomogeneous2DSharedPtr
 Shared pointer to an ExpList3DHomogeneous2D object. More...
 
typedef std::vector< ExpList3DHomogeneous2DSharedPtrExpList3DHomogeneous2DVector
 Vector of pointers to ExpList3DHomogeneous2D objects. More...
 
typedef std::map< Homogeneous1DMatType, DNekBlkMatSharedPtrHomo1DBlockMatrixMap
 A map between homo matrix keys and their associated block matrices. More...
 
typedef std::shared_ptr< Homo1DBlockMatrixMapHomo1DBlockMatrixMapShPtr
 A shared pointer to a BlockMatrixMap. More...
 
typedef std::shared_ptr< ExpListHomogeneous1DExpListHomogeneous1DSharedPtr
 Shared pointer to an ExpList3DHomogeneous1D object. More...
 
typedef std::vector< ExpListHomogeneous1DSharedPtrExpListHomogeneous1DVector
 Vector of pointers to ExpList3DHomogeneous1D objects. More...
 
typedef std::map< Homogeneous2DMatType, DNekBlkMatSharedPtrHomo2DBlockMatrixMap
 A map between homo matrix keys and their associated block matrices. More...
 
typedef std::shared_ptr< Homo2DBlockMatrixMapHomo2DBlockMatrixMapShPtr
 A shared pointer to a BlockMatrixMap. More...
 
typedef std::shared_ptr< ExpListHomogeneous2DExpListHomogeneous2DSharedPtr
 Shared pointer to an ExpList3DHomogeneous2D object. More...
 
typedef std::vector< ExpListHomogeneous2DSharedPtrExpListHomogeneous2DVector
 Vector of pointers to ExpList3DHomogeneous2D objects. More...
 
typedef std::shared_ptr< GJPStabilisationGJPStabilisationSharedPtr
 
typedef std::shared_ptr< GlobalLinSysGlobalLinSysSharedPtr
 Pointer to a GlobalLinSys object. More...
 
typedef std::map< GlobalLinSysKey, GlobalLinSysSharedPtrGlobalLinSysMap
 Mapping between GlobalLinSys objects and their associated keys. More...
 
typedef std::shared_ptr< GlobalLinSysMapGlobalLinSysMapShPtr
 Pointer to a GlobalLinSys/key map. More...
 
typedef std::shared_ptr< PreconditionerPreconditionerSharedPtr
 
typedef LibUtilities::NekFactory< std::string, GlobalLinSys, const GlobalLinSysKey &, const std::weak_ptr< ExpList > &, const std::shared_ptr< AssemblyMap > & > GlobalLinSysFactory
 Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class. More...
 
typedef std::shared_ptr< GlobalLinSysDirectStaticCondGlobalLinSysDirectStaticCondSharedPtr
 
typedef std::shared_ptr< GlobalLinSysIterativeStaticCondGlobalLinSysIterativeStaticCondSharedPtr
 
typedef std::map< StdRegions::ConstFactorType, Array< OneD, NekDouble > > VarFactorsMap
 
typedef std::shared_ptr< GlobalLinSysPETScStaticCondGlobalLinSysPETScStaticCondSharedPtr
 
typedef std::shared_ptr< GlobalLinSysStaticCondGlobalLinSysStaticCondSharedPtr
 
typedef std::shared_ptr< GlobalLinSysXxtStaticCondGlobalLinSysXxtStaticCondSharedPtr
 
typedef std::shared_ptr< GlobalMatrixGlobalMatrixSharedPtr
 Shared pointer to a GlobalMatrix object. More...
 
typedef std::map< GlobalMatrixKey, GlobalMatrixSharedPtrGlobalMatrixMap
 Mapping from global matrix keys to global matrices. More...
 
typedef std::shared_ptr< GlobalMatrixMapGlobalMatrixMapShPtr
 Shared pointer to a global matrix map. More...
 
typedef std::shared_ptr< GlobalMatrixKeyGlobalMatrixKeySharedPtr
 A pointer to a GlobalMatrixKey. More...
 
typedef std::vector< SpatialDomains::BoundaryConditionTypeBndTypesVector
 
typedef std::vector< SpatialDomains::BoundaryConditionType >::iterator BndTypesVectorIter
 
typedef std::shared_ptr< RobinBCInfoRobinBCInfoSharedPtr
 
typedef std::map< int, std::vector< PeriodicEntity > > PeriodicMap
 
typedef LibUtilities::NekFactory< std::string, Preconditioner, const std::shared_ptr< GlobalLinSys > &, const std::shared_ptr< AssemblyMap > & > PreconFactory
 
typedef std::shared_ptr< PreconditionerBlockPreconditionerBlockSharedPtr
 
typedef std::shared_ptr< PreconditionerDiagonalPreconditionerDiagonalSharedPtr
 
typedef std::shared_ptr< PreconditionerNullPreconditionerNullSharedPtr
 
typedef std::shared_ptr< PreconditionerJacobiPreconditionerJacobiSharedPtr
 
typedef std::shared_ptr< PreconditionerLinearPreconditionerLinearSharedPtr
 
typedef std::shared_ptr< PreconditionerLinearWithBlockPreconditionerLinearWithBlockSharedPtr
 
typedef std::shared_ptr< PreconditionerLinearWithDiagPreconditionerLinearWithDiagSharedPtr
 
typedef std::shared_ptr< PreconditionerLinearWithLowEnergyPreconditionerLinearWithLowEnergySharedPtr
 
typedef std::shared_ptr< PreconditionerLowEnergyPreconditionerLowEnergySharedPtr
 
typedef std::shared_ptr< BottomUpSubStructuredGraphBottomUpSubStructuredGraphSharedPtr
 
typedef std::shared_ptr< SubGraphSubGraphSharedPtr
 
typedef std::shared_ptr< MultiLevelBisectedGraphMultiLevelBisectedGraphSharedPtr
 
typedef std::shared_ptr< PatchMapPatchMapSharedPtr
 

Enumerations

enum  InterpLocTraceToTrace {
  eNoInterp , eInterpDir0 , eInterpEndPtDir0 , eInterpDir1 ,
  eInterpEndPtDir1 , eInterpBothDirs , eInterpEndPtDir0InterpDir1
}
 
enum  Direction {
  eX , eY , eZ , eS ,
  eN
}
 
enum  ExpansionType {
  e0D , e1D , e2D , e2DH1D ,
  e3DH1D , e3DH2D , e3D , eNoType
}
 
enum  Homogeneous1DMatType { eForwardsCoeffSpace1D , eBackwardsCoeffSpace1D , eForwardsPhysSpace1D , eBackwardsPhysSpace1D }
 
enum  Homogeneous2DMatType {
  eForwardsCoeffSpaceY1D , eForwardsCoeffSpaceZ1D , eBackwardsCoeffSpaceY1D , eBackwardsCoeffSpaceZ1D ,
  eForwardsPhysSpaceY1D , eForwardsPhysSpaceZ1D , eBackwardsPhysSpaceY1D , eBackwardsPhysSpaceZ1D
}
 
enum  LocalMatrixStorageStrategy { eNoStrategy , eContiguous , eNonContiguous , eSparse }
 
enum  PETScMatMult { ePETScMatMultSparse , ePETScMatMultShell }
 Enumerator. More...
 
enum  AdjacentTraceOrientation { eAdjacentEdgeIsForwards , eAdjacentEdgeIsBackwards }
 
enum  AdjacentFaceOrientation {
  eAdjacentFaceDir1FwdDir1_Dir2FwdDir2 , eAdjacentFaceDir1FwdDir1_Dir2BwdDir2 , eAdjacentFaceDir1BwdDir1_Dir2FwdDir2 , eAdjacentFaceDir1BwdDir1_Dir2BwdDir2 ,
  eAdjacentFaceDir1FwdDir2_Dir2FwdDir1 , eAdjacentFaceDir1FwdDir2_Dir2BwdDir1 , eAdjacentFaceDir1BwdDir2_Dir2FwdDir1 , eAdjacentFaceDir1BwdDir2_Dir2BwdDir1
}
 
enum  GlobalSysSolnType {
  eNoSolnType , eDirectFullMatrix , eDirectStaticCond , eDirectMultiLevelStaticCond ,
  eIterativeFull , eIterativeStaticCond , eIterativeMultiLevelStaticCond , eXxtFullMatrix ,
  eXxtStaticCond , eXxtMultiLevelStaticCond , ePETScFullMatrix , ePETScStaticCond ,
  ePETScMultiLevelStaticCond , eSIZE_GlobalSysSolnType
}
 
enum  ProjectionType { eGalerkin , eDiscontinuous , eMixed_CG_Discontinuous }
 Type of Galerkin projection. More...
 
enum  GJPStabilisationType { eNoGJPStabilisation , eExplicitGJPStabilisation , eSemiImplicitGJPStabilisation }
 
enum  LinSysIterSolver { eNoLinSysIterSolver , eConjugateGradient , eGMRES , eGMRESLoc }
 
enum  MatrixStorageType { eSmvBSR }
 
enum  LinearPreconSolver { eLinearPreconXxt , eLinearPreconPETSc }
 

Functions

int RoundNekDoubleToInt (NekDouble x)
 Rounds a double precision number to an integer. More...
 
void RoundNekDoubleToInt (const Array< OneD, const NekDouble > inarray, Array< OneD, int > outarray)
 Rounds an array of double precision numbers to integers. More...
 
pair< int, StdRegions::OrientationDeterminePeriodicEdgeOrientId (int meshEdgeId, StdRegions::Orientation edgeOrient, const vector< PeriodicEntity > &periodicEdges)
 Determine orientation of an edge to its periodic equivalents, as well as the ID of the representative edge. More...
 
StdRegions::Orientation DeterminePeriodicFaceOrient (StdRegions::Orientation faceOrient, StdRegions::Orientation perFaceOrient)
 Determine relative orientation between two faces. More...
 
void AlignFace (const StdRegions::Orientation orient, const int nquad1, const int nquad2, const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out)
 Helper function to re-align face to a given orientation. More...
 
static GlobalLinSysKey NullGlobalLinSysKey (StdRegions::eNoMatrixType)
 
GlobalLinSysFactoryGetGlobalLinSysFactory ()
 
bool operator< (const GlobalLinSysKey &lhs, const GlobalLinSysKey &rhs)
 
std::ostream & operator<< (std::ostream &os, const GlobalLinSysKey &rhs)
 Writes information about the object to a given stream. More...
 
bool operator< (const GlobalMatrixKey &lhs, const GlobalMatrixKey &rhs)
 
std::ostream & operator<< (std::ostream &os, const GlobalMatrixKey &rhs)
 Writes statistics about the matrix key to an output stream. More...
 
PreconFactoryGetPreconFactory ()
 
bool SubGraphWithoutVerts (const SubGraphSharedPtr g)
 
void CuthillMckeeReordering (const BoostGraph &graph, Array< OneD, int > &perm, Array< OneD, int > &iperm)
 
void MultiLevelBisectionReordering (const BoostGraph &graph, Array< OneD, int > &perm, Array< OneD, int > &iperm, BottomUpSubStructuredGraphSharedPtr &substructgraph, std::set< int > partVerts, int mdswitch)
 
void NoReordering (const BoostGraph &graph, Array< OneD, int > &perm, Array< OneD, int > &iperm)
 

Variables

static AssemblyMapSharedPtr NullAssemblyMapSharedPtr
 
static std::map< int, int > NullIntIntMap
 
static const std::vector< std::map< int, int > > NullVecIntIntMap
 
static LocTraceToTraceMapSharedPtr NullLocTraceToTraceMapSharedPtr
 
MultiRegions::Direction const DirCartesianMap [] = {eX, eY, eZ}
 
static ExpList NullExpList
 An empty ExpList object. More...
 
static ExpListSharedPtr NullExpListSharedPtr
 
static LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSysNullGlobalLinSysManager
 
static const Array< OneD, ExpListSharedPtrNullExpListSharedPtrArray
 
const char *const LocalMatrixStorageStrategyMap []
 
static VarFactorsMap NullVarFactorsMap
 
const char *const GlobalSysSolnTypeMap []
 
const char *const LinSysIterSolverMap []
 
const char *const MatrixStorageTypeMap [] = {"SmvBSR"}
 
static PeriodicMap NullPeriodicMap
 
static PreconditionerSharedPtr NullPreconditionerSharedPtr
 

Typedef Documentation

◆ AssemblyCommDGSharedPtr

Definition at line 299 of file AssemblyCommDG.h.

◆ AssemblyMapCGSharedPtr

Definition at line 50 of file AssemblyMapCG.h.

◆ AssemblyMapDGSharedPtr

Definition at line 46 of file AssemblyMapDG.h.

◆ AssemblyMapSharedPtr

Definition at line 50 of file AssemblyMap.h.

◆ BlockMatrixMap

A map between global matrix keys and their associated block matrices.

Definition at line 91 of file ExpList.h.

◆ BlockMatrixMapShPtr

A shared pointer to a BlockMatrixMap.

Definition at line 93 of file ExpList.h.

◆ BndTypesVector

Definition at line 133 of file MultiRegions.hpp.

◆ BndTypesVectorIter

Definition at line 135 of file MultiRegions.hpp.

◆ BottomUpSubStructuredGraphSharedPtr

Definition at line 60 of file SubStructuredGraph.h.

◆ ContField3DHomogeneous1DSharedPtr

Definition at line 100 of file ContField3DHomogeneous1D.h.

◆ ContField3DHomogeneous2DSharedPtr

Definition at line 94 of file ContField3DHomogeneous2D.h.

◆ ContFieldSharedPtr

Definition at line 268 of file ContField.h.

◆ DisContField3DHomogeneous1DSharedPtr

Definition at line 214 of file DisContField3DHomogeneous1D.h.

◆ DisContField3DHomogeneous2DSharedPtr

Definition at line 133 of file DisContField3DHomogeneous2D.h.

◆ DisContFieldSharedPtr

Definition at line 346 of file DisContField.h.

◆ DofGraph

typedef std::vector<std::map<int, int> > Nektar::MultiRegions::DofGraph

Definition at line 53 of file AssemblyMapCG.h.

◆ ExchangeMethodSharedPtr

Definition at line 73 of file AssemblyCommDG.h.

◆ ExpList2DHomogeneous1DSharedPtr

Shared pointer to an ExpList2DHomogeneous1D object.

Definition at line 50 of file ExpList2DHomogeneous1D.h.

◆ ExpList2DHomogeneous1DVector

Vector of pointers to ExpList2DHomogeneous1D objects.

Definition at line 53 of file ExpList2DHomogeneous1D.h.

◆ ExpList2DHomogeneous2DSharedPtr

Shared pointer to an ExpList2DHomogeneous2D object.

Definition at line 50 of file ExpList2DHomogeneous2D.h.

◆ ExpList2DHomogeneous2DVector

Vector of pointers to ExpList2DHomogeneous2D objects.

Definition at line 53 of file ExpList2DHomogeneous2D.h.

◆ ExpList3DHomogeneous1DSharedPtr

Shared pointer to an ExpList3DHomogeneous1D object.

Definition at line 50 of file ExpList3DHomogeneous1D.h.

◆ ExpList3DHomogeneous1DVector

Vector of pointers to ExpList3DHomogeneous1D objects.

Definition at line 53 of file ExpList3DHomogeneous1D.h.

◆ ExpList3DHomogeneous2DSharedPtr

Shared pointer to an ExpList3DHomogeneous2D object.

Definition at line 50 of file ExpList3DHomogeneous2D.h.

◆ ExpList3DHomogeneous2DVector

Vector of pointers to ExpList3DHomogeneous2D objects.

Definition at line 53 of file ExpList3DHomogeneous2D.h.

◆ ExpListHomogeneous1DSharedPtr

Shared pointer to an ExpList3DHomogeneous1D object.

Definition at line 67 of file ExpListHomogeneous1D.h.

◆ ExpListHomogeneous1DVector

Vector of pointers to ExpList3DHomogeneous1D objects.

Definition at line 69 of file ExpListHomogeneous1D.h.

◆ ExpListHomogeneous2DSharedPtr

Shared pointer to an ExpList3DHomogeneous2D object.

Definition at line 71 of file ExpListHomogeneous2D.h.

◆ ExpListHomogeneous2DVector

Vector of pointers to ExpList3DHomogeneous2D objects.

Definition at line 73 of file ExpListHomogeneous2D.h.

◆ ExpListSharedPtr

typedef std::shared_ptr< ExpList > Nektar::MultiRegions::ExpListSharedPtr

Shared pointer to an ExpList object.

Definition at line 56 of file LocTraceToTraceMap.h.

◆ ExtraDirDof

typedef std::tuple<int, int, NekDouble> Nektar::MultiRegions::ExtraDirDof

Definition at line 51 of file AssemblyMapCG.h.

◆ GJPStabilisationSharedPtr

Definition at line 103 of file GJPStabilisation.h.

◆ GlobalLinSysDirectStaticCondSharedPtr

Definition at line 48 of file GlobalLinSysDirectStaticCond.h.

◆ GlobalLinSysFactory

typedef LibUtilities::NekFactory< std::string, GlobalLinSys, const GlobalLinSysKey &, const std::weak_ptr<ExpList> &, const std::shared_ptr<AssemblyMap> &> Nektar::MultiRegions::GlobalLinSysFactory

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

Definition at line 65 of file GlobalLinSys.h.

◆ GlobalLinSysIterativeStaticCondSharedPtr

Definition at line 49 of file GlobalLinSysIterativeStaticCond.h.

◆ GlobalLinSysMap

Mapping between GlobalLinSys objects and their associated keys.

Definition at line 53 of file GlobalLinSys.h.

◆ GlobalLinSysMapShPtr

Pointer to a GlobalLinSys/key map.

Definition at line 55 of file GlobalLinSys.h.

◆ GlobalLinSysPETScStaticCondSharedPtr

Definition at line 49 of file GlobalLinSysPETScStaticCond.h.

◆ GlobalLinSysSharedPtr

Pointer to a GlobalLinSys object.

Definition at line 51 of file GlobalLinSys.h.

◆ GlobalLinSysStaticCondSharedPtr

Definition at line 48 of file GlobalLinSysStaticCond.h.

◆ GlobalLinSysXxtStaticCondSharedPtr

Definition at line 52 of file GlobalLinSysXxtStaticCond.h.

◆ GlobalMatrixKeySharedPtr

A pointer to a GlobalMatrixKey.

Definition at line 114 of file GlobalMatrixKey.h.

◆ GlobalMatrixMap

Mapping from global matrix keys to global matrices.

Definition at line 86 of file GlobalMatrix.h.

◆ GlobalMatrixMapShPtr

Shared pointer to a global matrix map.

Definition at line 88 of file GlobalMatrix.h.

◆ GlobalMatrixSharedPtr

Shared pointer to a GlobalMatrix object.

Definition at line 84 of file GlobalMatrix.h.

◆ Homo1DBlockMatrixMap

A map between homo matrix keys and their associated block matrices.

Definition at line 59 of file ExpListHomogeneous1D.h.

◆ Homo1DBlockMatrixMapShPtr

A shared pointer to a BlockMatrixMap.

Definition at line 61 of file ExpListHomogeneous1D.h.

◆ Homo2DBlockMatrixMap

A map between homo matrix keys and their associated block matrices.

Definition at line 63 of file ExpListHomogeneous2D.h.

◆ Homo2DBlockMatrixMapShPtr

A shared pointer to a BlockMatrixMap.

Definition at line 65 of file ExpListHomogeneous2D.h.

◆ InterfaceExchangeSharedPtr

Definition at line 219 of file InterfaceMapDG.h.

◆ InterfaceMapDGSharedPtr

Definition at line 273 of file InterfaceMapDG.h.

◆ InterfaceTraceSharedPtr

Definition at line 104 of file InterfaceMapDG.h.

◆ LocTraceToTraceMapSharedPtr

Definition at line 412 of file LocTraceToTraceMap.h.

◆ MultiLevelBisectedGraphSharedPtr

Definition at line 63 of file SubStructuredGraph.h.

◆ PatchMapSharedPtr

Definition at line 64 of file SubStructuredGraph.h.

◆ PeriodicMap

typedef std::map<int, std::vector<PeriodicEntity> > Nektar::MultiRegions::PeriodicMap

Definition at line 175 of file MultiRegions.hpp.

◆ PreconditionerBlockSharedPtr

Definition at line 46 of file PreconditionerBlock.h.

◆ PreconditionerDiagonalSharedPtr

Definition at line 44 of file PreconditionerDiagonal.h.

◆ PreconditionerJacobiSharedPtr

Definition at line 138 of file PreconditionerDiagonal.h.

◆ PreconditionerLinearSharedPtr

Definition at line 52 of file PreconditionerLinear.h.

◆ PreconditionerLinearWithBlockSharedPtr

Definition at line 45 of file PreconditionerLinearWithBlock.h.

◆ PreconditionerLinearWithDiagSharedPtr

Definition at line 47 of file PreconditionerLinearWithDiag.h.

◆ PreconditionerLinearWithLowEnergySharedPtr

Definition at line 45 of file PreconditionerLinearWithLowEnergy.h.

◆ PreconditionerLowEnergySharedPtr

Definition at line 49 of file PreconditionerLowEnergy.h.

◆ PreconditionerNullSharedPtr

Definition at line 95 of file PreconditionerDiagonal.h.

◆ PreconditionerSharedPtr

Definition at line 58 of file GlobalLinSys.h.

◆ PreconFactory

typedef LibUtilities::NekFactory<std::string, Preconditioner, const std::shared_ptr<GlobalLinSys> &, const std::shared_ptr<AssemblyMap> &> Nektar::MultiRegions::PreconFactory

Definition at line 60 of file Preconditioner.h.

◆ RobinBCInfoSharedPtr

Definition at line 153 of file MultiRegions.hpp.

◆ SubGraphSharedPtr

Definition at line 61 of file SubStructuredGraph.h.

◆ TraceInterpPoints

Map holding points distributions required for interpolation of local traces onto global trace in two and three dimensions.

The tuple contains four PointsKey entries. All four are used in 3D, but for 2D only two are used. The first two denote the local elemental points distributions, the latter the target trace distributions. In the 2D case, unused trace directions are set to LibUtilities::eNoPointsType.

Definition at line 80 of file LocTraceToTraceMap.h.

◆ VarFactorsMap

Definition at line 45 of file GlobalLinSysKey.h.

Enumeration Type Documentation

◆ AdjacentFaceOrientation

Enumerator
eAdjacentFaceDir1FwdDir1_Dir2FwdDir2 
eAdjacentFaceDir1FwdDir1_Dir2BwdDir2 
eAdjacentFaceDir1BwdDir1_Dir2FwdDir2 
eAdjacentFaceDir1BwdDir1_Dir2BwdDir2 
eAdjacentFaceDir1FwdDir2_Dir2FwdDir1 
eAdjacentFaceDir1FwdDir2_Dir2BwdDir1 
eAdjacentFaceDir1BwdDir2_Dir2FwdDir1 
eAdjacentFaceDir1BwdDir2_Dir2BwdDir1 

Definition at line 54 of file MultiRegions.hpp.

◆ AdjacentTraceOrientation

Enumerator
eAdjacentEdgeIsForwards 
eAdjacentEdgeIsBackwards 

Definition at line 46 of file MultiRegions.hpp.

◆ Direction

Enumerator
eX 
eY 
eZ 
eS 
eN 

Definition at line 66 of file ExpList.h.

◆ ExpansionType

Enumerator
e0D 
e1D 
e2D 
e2DH1D 
e3DH1D 
e3DH2D 
e3D 
eNoType 

Definition at line 75 of file ExpList.h.

◆ GJPStabilisationType

Enumerator
eNoGJPStabilisation 
eExplicitGJPStabilisation 
eSemiImplicitGJPStabilisation 

Definition at line 106 of file MultiRegions.hpp.

◆ GlobalSysSolnType

Enumerator
eNoSolnType 

No Solution type specified.

eDirectFullMatrix 
eDirectStaticCond 
eDirectMultiLevelStaticCond 
eIterativeFull 
eIterativeStaticCond 
eIterativeMultiLevelStaticCond 
eXxtFullMatrix 
eXxtStaticCond 
eXxtMultiLevelStaticCond 
ePETScFullMatrix 
ePETScStaticCond 
ePETScMultiLevelStaticCond 
eSIZE_GlobalSysSolnType 

Definition at line 66 of file MultiRegions.hpp.

67{
68 eNoSolnType, ///< No Solution type specified
82};
@ eNoSolnType
No Solution type specified.

◆ Homogeneous1DMatType

Enumerator
eForwardsCoeffSpace1D 
eBackwardsCoeffSpace1D 
eForwardsPhysSpace1D 
eBackwardsPhysSpace1D 

Definition at line 48 of file ExpListHomogeneous1D.h.

◆ Homogeneous2DMatType

Enumerator
eForwardsCoeffSpaceY1D 
eForwardsCoeffSpaceZ1D 
eBackwardsCoeffSpaceY1D 
eBackwardsCoeffSpaceZ1D 
eForwardsPhysSpaceY1D 
eForwardsPhysSpaceZ1D 
eBackwardsPhysSpaceY1D 
eBackwardsPhysSpaceZ1D 

Definition at line 48 of file ExpListHomogeneous2D.h.

◆ InterpLocTraceToTrace

Enumerator
eNoInterp 
eInterpDir0 
eInterpEndPtDir0 
eInterpDir1 
eInterpEndPtDir1 
eInterpBothDirs 
eInterpEndPtDir0InterpDir1 

Definition at line 58 of file LocTraceToTraceMap.h.

◆ LinearPreconSolver

Enumerator
eLinearPreconXxt 
eLinearPreconPETSc 

Definition at line 45 of file PreconditionerLinear.h.

◆ LinSysIterSolver

Enumerator
eNoLinSysIterSolver 

No Solution type specified.

eConjugateGradient 

Conjugate Gradient.

eGMRES 

GMRES.

eGMRESLoc 

GMRES in Local storage.

Definition at line 113 of file MultiRegions.hpp.

114{
115 eNoLinSysIterSolver, ///< No Solution type specified
116 eConjugateGradient, ///< Conjugate Gradient
117 eGMRES, ///< GMRES
118 eGMRESLoc ///< GMRES in Local storage
119};
@ eGMRESLoc
GMRES in Local storage.
@ eNoLinSysIterSolver
No Solution type specified.
@ eConjugateGradient
Conjugate Gradient.

◆ LocalMatrixStorageStrategy

◆ MatrixStorageType

Enumerator
eSmvBSR 

Definition at line 126 of file MultiRegions.hpp.

127{
128 eSmvBSR
129};

◆ PETScMatMult

Enumerator.

Enumerator
ePETScMatMultSparse 
ePETScMatMultShell 

Definition at line 49 of file GlobalLinSysPETSc.h.

◆ ProjectionType

Type of Galerkin projection.

Enumerator
eGalerkin 
eDiscontinuous 
eMixed_CG_Discontinuous 

Definition at line 99 of file MultiRegions.hpp.

Function Documentation

◆ AlignFace()

void Nektar::MultiRegions::AlignFace ( const StdRegions::Orientation  orient,
const int  nquad1,
const int  nquad2,
const Array< OneD, const NekDouble > &  in,
Array< OneD, NekDouble > &  out 
)

Helper function to re-align face to a given orientation.

Definition at line 4641 of file ExpList.cpp.

4644{
4645 // Copy transpose.
4650 {
4651 for (int i = 0; i < nquad2; ++i)
4652 {
4653 for (int j = 0; j < nquad1; ++j)
4654 {
4655 out[i * nquad1 + j] = in[j * nquad2 + i];
4656 }
4657 }
4658 }
4659 else
4660 {
4661 for (int i = 0; i < nquad2; ++i)
4662 {
4663 for (int j = 0; j < nquad1; ++j)
4664 {
4665 out[i * nquad1 + j] = in[i * nquad1 + j];
4666 }
4667 }
4668 }
4669
4674 {
4675 // Reverse x direction
4676 for (int i = 0; i < nquad2; ++i)
4677 {
4678 for (int j = 0; j < nquad1 / 2; ++j)
4679 {
4680 swap(out[i * nquad1 + j], out[i * nquad1 + nquad1 - j - 1]);
4681 }
4682 }
4683 }
4684
4689 {
4690 // Reverse y direction
4691 for (int j = 0; j < nquad1; ++j)
4692 {
4693 for (int i = 0; i < nquad2 / 2; ++i)
4694 {
4695 swap(out[i * nquad1 + j], out[(nquad2 - i - 1) * nquad1 + j]);
4696 }
4697 }
4698 }
4699}

References Nektar::StdRegions::eDir1BwdDir1_Dir2BwdDir2, Nektar::StdRegions::eDir1BwdDir1_Dir2FwdDir2, Nektar::StdRegions::eDir1BwdDir2_Dir2BwdDir1, Nektar::StdRegions::eDir1BwdDir2_Dir2FwdDir1, Nektar::StdRegions::eDir1FwdDir1_Dir2BwdDir2, Nektar::StdRegions::eDir1FwdDir2_Dir2BwdDir1, and Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1.

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

◆ CuthillMckeeReordering()

void Nektar::MultiRegions::CuthillMckeeReordering ( const BoostGraph &  graph,
Array< OneD, int > &  perm,
Array< OneD, int > &  iperm 
)

Definition at line 682 of file SubStructuredGraph.cpp.

684{
685 int nGraphVerts = boost::num_vertices(graph);
686
687 ASSERTL1(perm.size() >= nGraphVerts && iperm.size() >= nGraphVerts,
688 "Non-matching dimensions");
689
690 // Call boost::cuthill_mckee_ordering to reorder the graph-vertices
691 // using the reverse Cuthill-Mckee algorithm
692 std::vector<BoostVertex> reorderedVerts(nGraphVerts);
693 boost::cuthill_mckee_ordering(graph, reorderedVerts.rbegin());
694
695 // copy the reordering to the Arrays perm and iperm
696 for (int i = 0; i < nGraphVerts; i++)
697 {
698 perm[i] = reorderedVerts[i];
699 iperm[reorderedVerts[i]] = i;
700 }
701}
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:242

References ASSERTL1.

Referenced by Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), and Nektar::MultiRegions::AssemblyMapCG::CreateGraph().

◆ DeterminePeriodicEdgeOrientId()

std::pair< int, StdRegions::Orientation > Nektar::MultiRegions::DeterminePeriodicEdgeOrientId ( int  meshEdgeId,
StdRegions::Orientation  edgeOrient,
const vector< PeriodicEntity > &  periodicEdges 
)

Determine orientation of an edge to its periodic equivalents, as well as the ID of the representative edge.

Since an edge may be periodic with more than one other edge (e.g. a periodic cube has sets of four periodic edges in each coordinate direction), we have to define a 'representative' edge. In this assembly map we define it to be the one with the minimum ID. This routine is set up to calculate the orientation of a given edge with ID meshEdgeId with respect to the edge ID.

Parameters
meshEdgeIdID of a periodic edge.
edgeOrientEdge orientation of meshEdgeId with respect to its parent element.
periodicEdgesThe map of all periodic edges.
Returns
Pair containing the ID of the periodic edge and the orientation of meshEdgeID with respect to this edge.

Definition at line 2221 of file AssemblyMapCG.cpp.

2224{
2225 int minId = periodicEdges[0].id;
2226 int minIdK = 0;
2227 int k;
2228
2229 for (k = 1; k < periodicEdges.size(); ++k)
2230 {
2231 if (periodicEdges[k].id < minId)
2232 {
2233 minId = min(minId, periodicEdges[k].id);
2234 minIdK = k;
2235 }
2236 }
2237
2238 minId = min(minId, meshEdgeId);
2239
2240 if (meshEdgeId != minId)
2241 {
2242 if (periodicEdges[minIdK].orient == StdRegions::eBackwards)
2243 {
2244 // Swap edge orientation
2245 edgeOrient = (edgeOrient == StdRegions::eForwards)
2248 }
2249 }
2250
2251 return make_pair(minId, edgeOrient);
2252}

References Nektar::StdRegions::eBackwards, and Nektar::StdRegions::eForwards.

Referenced by Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerCG(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), and Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap().

◆ DeterminePeriodicFaceOrient()

StdRegions::Orientation Nektar::MultiRegions::DeterminePeriodicFaceOrient ( StdRegions::Orientation  faceOrient,
StdRegions::Orientation  perFaceOrient 
)

Determine relative orientation between two faces.

Given the orientation of a local element to its local face, defined as faceOrient, and perFaceOrient which states the alignment of one periodic face to the other global face, this routine determines the orientation that takes this local element face to the global/unique face.

Parameters
faceOrientOrientation of the face with respect to its parent element.
perFaceOrientOrientation of the representative/global face.
Returns
Orientation between the two faces.

Definition at line 2269 of file AssemblyMapCG.cpp.

2271{
2272 StdRegions::Orientation returnval = faceOrient;
2273
2274 if (perFaceOrient != StdRegions::eDir1FwdDir1_Dir2FwdDir2)
2275 {
2276 int tmp1 = (int)faceOrient - 5;
2277 int tmp2 = (int)perFaceOrient - 5;
2278
2279 int flipDir1Map[8] = {2, 3, 0, 1, 6, 7, 4, 5};
2280 int flipDir2Map[8] = {1, 0, 3, 2, 5, 4, 7, 6};
2281 int transposeMap[8] = {4, 5, 6, 7, 0, 2, 1, 3};
2282
2283 // Transpose orientation
2284 if (tmp2 > 3)
2285 {
2286 tmp1 = transposeMap[tmp1];
2287 }
2288
2289 // Reverse orientation in direction 1.
2290 if (tmp2 == 2 || tmp2 == 3 || tmp2 == 6 || tmp2 == 7)
2291 {
2292 tmp1 = flipDir1Map[tmp1];
2293 }
2294
2295 // Reverse orientation in direction 2
2296 if (tmp2 % 2 == 1)
2297 {
2298 tmp1 = flipDir2Map[tmp1];
2299 }
2300
2301 returnval = (StdRegions::Orientation)(tmp1 + 5);
2302 }
2303 return returnval;
2304}

References Nektar::StdRegions::eDir1FwdDir1_Dir2FwdDir2.

Referenced by Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerCG(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), and Nektar::MultiRegions::PreconditionerLowEnergy::v_BuildPreconditioner().

◆ GetGlobalLinSysFactory()

GlobalLinSysFactory & Nektar::MultiRegions::GetGlobalLinSysFactory ( )

Definition at line 90 of file GlobalLinSys.cpp.

91{
92 static GlobalLinSysFactory instance;
93 return instance;
94}
Provides a generic Factory class.

Referenced by Nektar::MultiRegions::ExpList::GenGlobalBndLinSys(), and Nektar::MultiRegions::ExpList::GenGlobalLinSys().

◆ GetPreconFactory()

PreconFactory & Nektar::MultiRegions::GetPreconFactory ( )

◆ MultiLevelBisectionReordering()

void Nektar::MultiRegions::MultiLevelBisectionReordering ( const BoostGraph &  graph,
Array< OneD, int > &  perm,
Array< OneD, int > &  iperm,
BottomUpSubStructuredGraphSharedPtr substructgraph,
std::set< int >  partVerts,
int  mdswitch 
)

Definition at line 703 of file SubStructuredGraph.cpp.

709{
710#ifndef NEKTAR_USE_SCOTCH
711 ASSERTL0(false, "Multi-level static condensation requires Nektar++"
712 " to be built with SCOTCH.");
713#else
714 int nGraphVerts = boost::num_vertices(graph);
715 int nGraphEdges = boost::num_edges(graph);
716
717 ASSERTL1(perm.size() >= nGraphVerts && iperm.size() >= nGraphVerts,
718 "Non-matching dimensions");
719
720 // We will now use Scotch to reorder the graph. For the purpose of
721 // multi-level static condensation, we will use a Scotch routine
722 // that partitions the graph recursively using a multi-level nested
723 // bisection algorithm. The name of this routine is
724 // SCOTCH_graphOrder and it was originally designed to reorder the
725 // DOFs in a matrix in order to minimise the fill-in when applying a
726 // factorisation technique (such as Cholesky). However, this
727 // reordering of DOFs also seems to be perfectly suited in the
728 // context of multilevel substructuring. Therefore, we will use this
729 // Scotch routine instead of the more well-known graph-partitioning
730 // routines.
731 if (nGraphEdges)
732 {
733 //
734 // Step 1: Convert boost graph to a graph in adjncy-list format
735 // as required by Scotch.
736 //
737 int acnt = 0, vcnt = 0, i, cnt;
738 int nPartition = partVerts.size();
739 int nNonPartition = nGraphVerts - partVerts.size();
740
741 Array<OneD, int> xadj(nNonPartition + 1, 0);
742 Array<OneD, int> adjncy(2 * nGraphEdges);
743 Array<OneD, int> initial_perm(nGraphVerts);
744 Array<OneD, int> iinitial_perm(nGraphVerts);
745 Array<OneD, int> perm_tmp(nNonPartition);
746 Array<OneD, int> iperm_tmp(nNonPartition);
747
748 // Perform an initial reordering of the vertices, so that
749 // partition nodes are at the end. This allows Scotch to
750 // partition the interior nodes from values starting at zero.
751 for (i = cnt = 0; i < nGraphVerts; ++i)
752 {
753 if (partVerts.count(i) == 0)
754 {
755 initial_perm[i] = cnt;
756 iinitial_perm[cnt++] = i;
757 }
758 }
759
760 for (i = 0; i < nGraphVerts; ++i)
761 {
762 if (partVerts.count(i) > 0)
763 {
764 initial_perm[i] = cnt;
765 iinitial_perm[cnt++] = i;
766 }
767 }
768
769 // Apply this reordering to the graph.
770 boost::property_map<BoostGraph, boost::vertex_index_t>::type index =
771 get(boost::vertex_index, graph);
772
773 // Now construct the adjaceny list using
774 // boost::adjacent_vertices.
775 auto verts = boost::vertices(graph);
776 for (auto vertit = verts.first; vertit != verts.second; ++vertit)
777 {
778 if (partVerts.count(index[*vertit]) > 0)
779 {
780 continue;
781 }
782
783 auto adjverts = boost::adjacent_vertices(*vertit, graph);
784 for (auto adjvertit = adjverts.first; adjvertit != adjverts.second;
785 ++adjvertit)
786 {
787 if (partVerts.count(index[*adjvertit]) > 0)
788 {
789 continue;
790 }
791 adjncy[acnt++] = initial_perm[*adjvertit];
792 }
793 xadj[++vcnt] = acnt;
794 }
795
796 //
797 // Step 2: pass the graph to Scotch and perform the nested
798 // dissection to obtain a separator tree.
799 //
800
801 // Pass the adjaceny graph into Scotch.
802 SCOTCH_Graph *scGraph = SCOTCH_graphAlloc();
803 ASSERTL0(scGraph != nullptr,
804 "Failed to allocate Scotch graph for substructuring.");
805
806 ASSERTL0(SCOTCH_graphInit(scGraph) == 0,
807 "Failed to initialise Scotch graph for substructuring.");
808
809 SCOTCH_CALL(SCOTCH_graphBuild,
810 (scGraph, 0, nNonPartition, &xadj[0], &xadj[1], nullptr,
811 nullptr, xadj[nNonPartition], &adjncy[0], nullptr));
812
813 // This horrible looking string defines the Scotch graph
814 // reordering strategy, which essentially does a nested
815 // dissection + compression. We take this almost directly from
816 // the SCOTCH_stratGraphOrderBuild function (defined in
817 // library_graph_order.c), but by specifying the string
818 // manually, we can replace the subdivision strategy to allow us
819 // to control the number of vertices used to determine whether
820 // to perform another dissection using the mdswitch
821 // parameter. The below is essentially equivalent to calling
822 // SCOTCH_stratGraphOrderBuild with the flags
823 // SCOTCH_STRATLEAFSIMPLE and SCOTCH_STRATSEPASIMPLE to make
824 // sure leaf nodes do not have any reordering applied to them.
825 std::string strat_str =
826 "c{rat=0.7,cpr=n{sep=/(<TSTS>)?m{rat=0.7,vert=100,low="
827 "h{pass=10},asc=b{width=3,bnd=f{bal=<BBAL>},"
828 "org=(|h{pass=10})f{bal=<BBAL>}}}<SEPA>;,"
829 "ole=<OLEA>,ose=<OSEP>},unc=n{sep=/(<TSTS>)?m{rat=0.7,"
830 "vert=100,low=h{pass=10},asc=b{width=3,bnd=f{bal=<BBAL>},"
831 "org=(|h{pass=10})f{bal=<BBAL>}}}<SEPA>;"
832 ",ole=<OLEA>,ose=<OSEP>}}";
833
834 // Replace flags in the string with appropriate values.
835 boost::replace_all(strat_str, "<SEPA>",
836 "|m{rat=0.7,vert=100,low=h{pass=10},"
837 "asc=b{width=3,bnd=f{bal=<BBAL>},"
838 "org=(|h{pass=10})f{bal=<BBAL>}}}");
839 boost::replace_all(strat_str, "<OSEP>", "s");
840 boost::replace_all(strat_str, "<OLEA>", "s");
841 boost::replace_all(strat_str, "<BBAL>", "0.1");
842 boost::replace_all(strat_str, "<TSTS>",
843 "vert>" + std::to_string(mdswitch));
844
845 // Set up the re-ordering strategy.
846 SCOTCH_Strat strat;
847 SCOTCH_CALL(SCOTCH_stratInit, (&strat));
848 SCOTCH_CALL(SCOTCH_stratGraphOrder, (&strat, strat_str.c_str()));
849
850 // As output, Scotch will give us the total number of 'blocks'
851 // (i.e. the separators and all of the leaves), the separator
852 // tree as a mapping of block to parent block, and the range of
853 // indices that is contained within each block. Reordering of
854 // the vertices goes from largest index (at the top level) to
855 // smallest (at the bottom level). The precise ordering is given
856 // in the Scotch user guide.
857 //
858 // Note that we pass in iperm into the 'permtab' field of
859 // graphOrder and 'perm' into the 'peritab' field; this is
860 // because our definition of the permutation is the opposite of
861 // what's defined in Scotch (this is leftover from a previous
862 // implementation that used Metis).
863 Array<OneD, int> treetab(nNonPartition);
864 Array<OneD, int> rangtab(nNonPartition + 1);
865 int cblknbr = 0;
866 SCOTCH_CALL(SCOTCH_graphOrder,
867 (scGraph, &strat, &iperm_tmp[0], &perm_tmp[0], &cblknbr,
868 &rangtab[0], &treetab[0]));
869
870 // We're now done with Scotch: clean up the created structures.
871 SCOTCH_graphExit(scGraph);
872 SCOTCH_stratExit(&strat);
873
874 //
875 // Step 3: create a MultiLevelBisectedGraph by reading the
876 // separator tree we obtained from Scotch.
877 //
878
879 // Setup root block, which lies at the end of the blocks
880 // described in treetab[].
881 std::vector<MultiLevelBisectedGraphSharedPtr> graphs(cblknbr);
882
883 // The strategy now is to traverse backwards over the blocks
884 // described in treetab to set up the levels of the top-down
885 // graph. rangtab allows us to calculate how many degrees of
886 // freedom lie in the separator.
887 for (i = cblknbr - 1; i >= 0; --i)
888 {
889 // Set up this block.
890 graphs[i] =
891 MemoryManager<MultiLevelBisectedGraph>::AllocateSharedPtr(
892 rangtab[i + 1] - rangtab[i]);
893
894 // If we're a root block (treetab[i] == -1) we don't need to
895 // do anything, just move onto the next block.
896 if (treetab[i] == -1)
897 {
898 continue;
899 }
900
901 // Now use treetab[i] to figure out the parent block. We
902 // have to be a bit careful in setting left/right daughters
903 // here. The left daughter's degrees of freedom are ordered
904 // _first_ in the iperm/perm arrays returned from Scotch,
905 // but if there is both a left and right daughter, we'll
906 // come across the right daughter first because the
907 // separators are being traversed backwards. We'll therefore
908 // insert this at the beginning of the daughter graphs
909 // vector.
910 MultiLevelBisectedGraphSharedPtr tmp = graphs[treetab[i]];
911 std::vector<MultiLevelBisectedGraphSharedPtr> &daughters =
912 tmp->GetDaughterGraphs();
913 daughters.insert(daughters.begin(), graphs[i]);
914 }
915
916 // Change permutations from Scotch to account for initial offset
917 // in case we had partition vertices.
918 for (i = 0; i < nGraphVerts; ++i)
919 {
920 if (partVerts.count(i) == 0)
921 {
922 iperm[i] = iperm_tmp[initial_perm[i]];
923 perm[iperm[i]] = i;
924 }
925 }
926
927 auto it = partVerts.begin(), it2 = partVerts.end();
928 for (i = nNonPartition; it != it2; ++it, ++i)
929 {
930 perm[i] = *it;
931 iperm[*it] = i;
932 }
933
934 for (i = 0; i < nGraphVerts; ++i)
935 {
936 ASSERTL1(perm[iperm[i]] == i, "Perm error " + std::to_string(i));
937 }
938
939 // If we were passed a graph with disconnected regions, we need
940 // to create a bisected graph with the appropriate roots.
941 std::vector<int> rootBlocks;
942 for (i = 0; i < cblknbr; ++i)
943 {
944 if (treetab[i] == -1)
945 {
946 rootBlocks.push_back(i);
947 }
948 }
949
951 if (rootBlocks.size() == 1)
952 {
953 root = graphs[rootBlocks[0]];
954 }
955 else
956 {
957 root = MemoryManager<MultiLevelBisectedGraph>::AllocateSharedPtr(0);
958
959 for (int i = 0; i < rootBlocks.size(); ++i)
960 {
961 root->GetDaughterGraphs().push_back(graphs[rootBlocks[i]]);
962 }
963 }
964
965 // Check that our degree of freedom count in the constructed
966 // graph is the same as the number of degrees of freedom that we
967 // were given in the function input.
968 ASSERTL0(root->GetTotDofs() == nNonPartition,
969 "Error in constructing Scotch graph for multi-level"
970 " static condensation.");
971
972 //
973 // Step 4: Set up the bottom-up graph from the top-down graph,
974 // and reorder the permutation from Scotch.
975 //
976 substructgraph =
977 MemoryManager<BottomUpSubStructuredGraph>::AllocateSharedPtr(
978 root, nPartition, true);
979
980 // Important: we cannot simply use the ordering given by Scotch
981 // as it does not order the different blocks as we would like
982 // it. Therefore, we use following command to re-order them
983 // again in the context of the bottom-up substructuring. As a
984 // result, we will now obtain an ordering where the interior
985 // degrees of freedom of the first (=bottom) level will be
986 // ordered last (block by block ofcoarse). The interior degrees
987 // of freedom of the second level will be ordered second to
988 // last, etc ... As a result, the boundary degrees of freedom of
989 // the last level (i.e. the dofs that will have to solved
990 // non-recursively) will be ordered first (after the Dirichlet
991 // Dofs that is). (this way, we actually follow the same idea
992 // and convention in the standard (non-multi-level) static
993 // condensation approach).
994 substructgraph->UpdateBottomUpReordering(perm, iperm);
995 }
996 else
997 {
998 // This is the very special case of a graph without any
999 // connectivity i.e. a collection of vertices without any edges
1000 for (int i = 0; i < nGraphVerts; i++)
1001 {
1002 perm[i] = i;
1003 iperm[i] = i;
1004 }
1005 substructgraph =
1006 MemoryManager<BottomUpSubStructuredGraph>::AllocateSharedPtr(
1007 nGraphVerts);
1008 }
1009#endif
1010}
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208
#define SCOTCH_CALL(scotchFunc, args)
std::shared_ptr< MultiLevelBisectedGraph > MultiLevelBisectedGraphSharedPtr

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, and SCOTCH_CALL.

Referenced by Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), and Nektar::MultiRegions::AssemblyMapCG::CreateGraph().

◆ NoReordering()

void Nektar::MultiRegions::NoReordering ( const BoostGraph &  graph,
Array< OneD, int > &  perm,
Array< OneD, int > &  iperm 
)

Definition at line 1012 of file SubStructuredGraph.cpp.

1014{
1015 int nGraphVerts = boost::num_vertices(graph);
1016
1017 ASSERTL1(perm.size() >= nGraphVerts && iperm.size() >= nGraphVerts,
1018 "Non-matching dimensions");
1019
1020 for (int i = 0; i < nGraphVerts; i++)
1021 {
1022 perm[i] = i;
1023 iperm[i] = i;
1024 }
1025}

References ASSERTL1.

Referenced by Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), and Nektar::MultiRegions::AssemblyMapCG::CreateGraph().

◆ NullGlobalLinSysKey()

static GlobalLinSysKey Nektar::MultiRegions::NullGlobalLinSysKey ( StdRegions::eNoMatrixType  )
static

◆ operator<() [1/2]

bool Nektar::MultiRegions::operator< ( const GlobalLinSysKey lhs,
const GlobalLinSysKey rhs 
)

Compares two GlobalLinSysKeys by comparing their solution types and matrix keys.

Parameters
lhsFirst operand.
rhsSecond operand.
Returns
true if the first operand is considered less than the second operand.

Definition at line 106 of file GlobalLinSysKey.cpp.

107{
108 if (lhs.m_solnType < rhs.m_solnType)
109 {
110 return true;
111 }
112
113 if (lhs.m_solnType > rhs.m_solnType)
114 {
115 return false;
116 }
117
118 if (lhs.m_varFactors.size() < rhs.m_varFactors.size())
119 {
120 return true;
121 }
122
123 if (lhs.m_varFactors.size() > rhs.m_varFactors.size())
124 {
125 return false;
126 }
127
128 for (unsigned int i = 0; i < lhs.m_varFactors_hashes.size(); ++i)
129 {
130 if (lhs.m_varFactors_hashes[i] < rhs.m_varFactors_hashes[i])
131 {
132 return true;
133 }
134 if (lhs.m_varFactors_hashes[i] > rhs.m_varFactors_hashes[i])
135 {
136 return false;
137 }
138 }
139
140 return (*dynamic_cast<const GlobalMatrixKey *>(&lhs) <
141 *dynamic_cast<const GlobalMatrixKey *>(&rhs));
142}
GlobalSysSolnType m_solnType
Store the solution type associated with the linear system. This may be none, full matrix,...
std::vector< std::size_t > m_varFactors_hashes

◆ operator<() [2/2]

bool Nektar::MultiRegions::operator< ( const GlobalMatrixKey lhs,
const GlobalMatrixKey rhs 
)

Definition at line 70 of file GlobalMatrixKey.cpp.

71{
72 if (lhs.m_matrixType < rhs.m_matrixType)
73 {
74 return true;
75 }
76
77 if (lhs.m_matrixType > rhs.m_matrixType)
78 {
79 return false;
80 }
81
82 if (lhs.m_shapeType < rhs.m_shapeType)
83 {
84 return true;
85 }
86
87 if (lhs.m_shapeType > rhs.m_shapeType)
88 {
89 return false;
90 }
91
92 if (lhs.m_constFactors.size() < rhs.m_constFactors.size())
93 {
94 return true;
95 }
96 else if (lhs.m_constFactors.size() > rhs.m_constFactors.size())
97 {
98 return false;
99 }
100 else
101 {
102 StdRegions::ConstFactorMap::const_iterator x, y;
103 for (x = lhs.m_constFactors.begin(), y = rhs.m_constFactors.begin();
104 x != lhs.m_constFactors.end(); ++x, ++y)
105 {
106 if (x->second < y->second)
107 {
108 return true;
109 }
110 if (x->second > y->second)
111 {
112 return false;
113 }
114 }
115 }
116
117 if (lhs.m_varCoeffs.size() < rhs.m_varCoeffs.size())
118 {
119 return true;
120 }
121 else if (lhs.m_varCoeffs.size() > rhs.m_varCoeffs.size())
122 {
123 return false;
124 }
125 else
126 {
127 StdRegions::VarCoeffMap::const_iterator x, y;
128 for (x = lhs.m_varCoeffs.begin(), y = rhs.m_varCoeffs.begin();
129 x != lhs.m_varCoeffs.end(); ++x, ++y)
130 {
131 if (x->second.GetHash() < y->second.GetHash())
132 {
133 return true;
134 }
135 if (x->second.GetHash() > y->second.GetHash())
136 {
137 return false;
138 }
139 }
140 }
141
142 if (!rhs.m_locToGloMap.lock().get())
143 {
144 return false;
145 }
146 else if (!lhs.m_locToGloMap.lock().get() && rhs.m_locToGloMap.lock().get())
147 {
148 return true;
149 }
150 if (lhs.m_locToGloMap.lock()->GetHash() <
151 rhs.m_locToGloMap.lock()->GetHash())
152 {
153 return true;
154 }
155
156 return false;
157}
std::weak_ptr< AssemblyMap > m_locToGloMap
Pointer to the local to global mapping.
LibUtilities::ShapeType m_shapeType
Stores the expansion/shape type that the matrix is to be based on.
StdRegions::ConstFactorMap m_constFactors
StdRegions::MatrixType m_matrixType
Stores the matrix type based on the enum StdRegions::MatrixType.

◆ operator<<() [1/2]

std::ostream & Nektar::MultiRegions::operator<< ( std::ostream &  os,
const GlobalLinSysKey rhs 
)

Writes information about the object to a given stream.

Writes the vital statistics of a global linear system to a stream.

Parameters
osOutput stream.
rhsGlobalLinSys object to use.
Returns
Reference to the output stream os.

Definition at line 150 of file GlobalLinSysKey.cpp.

151{
152 os << "MatrixType: " << StdRegions::MatrixTypeMap[rhs.GetMatrixType()]
153 << ", ShapeType: " << LibUtilities::ShapeTypeMap[rhs.GetShapeType()]
154 << std::endl;
155 os << "Solution Type: " << GlobalSysSolnTypeMap[rhs.GetGlobalSysSolnType()]
156 << endl;
157 os << "Number of constants: " << rhs.GetNConstFactors() << endl;
158 for (auto &x : rhs.GetConstFactors())
159 {
160 os << " Constant " << StdRegions::ConstFactorTypeMap[x.first] << ": "
161 << x.second << endl;
162 }
163 os << "Number of variable coefficients: " << rhs.GetNVarCoeffs() << endl;
164
165 os << "Number of variable factors : " << rhs.GetNVarFactors() << endl;
166
167 return os;
168}
GlobalSysSolnType GetGlobalSysSolnType() const
Return the associated solution type.
const StdRegions::ConstFactorMap & GetConstFactors() const
Returns all the constants.
int GetNConstFactors() const
Returns the number of constants defined for this matrix.
LibUtilities::ShapeType GetShapeType() const
Return the expansion type associated with key.
StdRegions::MatrixType GetMatrixType() const
Return the matrix type.
const char *const ShapeTypeMap[SIZE_ShapeType]
Definition: ShapeType.hpp:75
const char *const GlobalSysSolnTypeMap[]
const char *const ConstFactorTypeMap[]
Definition: StdRegions.hpp:413
const char *const MatrixTypeMap[]
Definition: StdRegions.hpp:139

References Nektar::StdRegions::ConstFactorTypeMap, Nektar::MultiRegions::GlobalMatrixKey::GetConstFactors(), Nektar::MultiRegions::GlobalLinSysKey::GetGlobalSysSolnType(), Nektar::MultiRegions::GlobalMatrixKey::GetMatrixType(), Nektar::MultiRegions::GlobalMatrixKey::GetNConstFactors(), Nektar::MultiRegions::GlobalMatrixKey::GetNVarCoeffs(), Nektar::MultiRegions::GlobalLinSysKey::GetNVarFactors(), Nektar::MultiRegions::GlobalMatrixKey::GetShapeType(), GlobalSysSolnTypeMap, Nektar::StdRegions::MatrixTypeMap, and Nektar::LibUtilities::ShapeTypeMap.

◆ operator<<() [2/2]

std::ostream & Nektar::MultiRegions::operator<< ( std::ostream &  os,
const GlobalMatrixKey rhs 
)

Writes statistics about the matrix key to an output stream.

Definition at line 159 of file GlobalMatrixKey.cpp.

160{
161 os << "MatrixType: " << rhs.GetMatrixType() << endl;
162 os << "Number of constants: " << rhs.GetNConstFactors() << endl;
163 for (auto &x : rhs.GetConstFactors())
164 {
165 os << " Constant " << StdRegions::ConstFactorTypeMap[x.first] << ": "
166 << x.second << endl;
167 }
168 os << "Number of variable coefficients: " << rhs.GetNVarCoeffs() << endl;
169
170 return os;
171}

References Nektar::StdRegions::ConstFactorTypeMap, Nektar::MultiRegions::GlobalMatrixKey::GetConstFactors(), Nektar::MultiRegions::GlobalMatrixKey::GetMatrixType(), Nektar::MultiRegions::GlobalMatrixKey::GetNConstFactors(), and Nektar::MultiRegions::GlobalMatrixKey::GetNVarCoeffs().

◆ RoundNekDoubleToInt() [1/2]

void Nektar::MultiRegions::RoundNekDoubleToInt ( const Array< OneD, const NekDouble inarray,
Array< OneD, int >  outarray 
)

Rounds an array of double precision numbers to integers.

Definition at line 62 of file AssemblyMap.cpp.

64{
65 int size = inarray.size();
66 ASSERTL1(outarray.size() >= size, "Array sizes not compatible");
67
68 NekDouble x;
69 for (int i = 0; i < size; i++)
70 {
71 x = inarray[i];
72 outarray[i] = int(x > 0.0 ? x + 0.5 : x - 0.5);
73 }
74}
double NekDouble

References ASSERTL1.

◆ RoundNekDoubleToInt() [2/2]

int Nektar::MultiRegions::RoundNekDoubleToInt ( NekDouble  x)

Rounds a double precision number to an integer.

Definition at line 56 of file AssemblyMap.cpp.

57{
58 return int(x > 0.0 ? x + 0.5 : x - 0.5);
59}

Referenced by Nektar::MultiRegions::AssemblyMap::AssemblyMap().

◆ SubGraphWithoutVerts()

bool Nektar::MultiRegions::SubGraphWithoutVerts ( const SubGraphSharedPtr  g)

Definition at line 665 of file SubStructuredGraph.cpp.

666{
667 return g->GetNverts() == 0;
668}

Referenced by Nektar::MultiRegions::BottomUpSubStructuredGraph::ExpandGraphWithVertexWeights().

Variable Documentation

◆ DirCartesianMap

MultiRegions::Direction const Nektar::MultiRegions::DirCartesianMap[] = {eX, eY, eZ}

Definition at line 87 of file ExpList.h.

Referenced by Nektar::VCSImplicit::AddImplicitSkewSymAdvection(), Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::VCSMapping::MappingAccelerationCorrection(), Nektar::FieldUtils::ProcessGrad::ProcessCartesianFld(), Nektar::FieldUtils::ProcessGrad::ProcessMappingFld(), Nektar::SmoothedProfileMethod::SetUpCorrectionPressure(), Nektar::CoupledLinearNS::SetUpCoupledMatrix(), Nektar::LEE::v_AddLinTerm(), Nektar::AlternateSkewAdvection::v_Advect(), Nektar::NavierStokesAdvection::v_Advect(), Nektar::SkewSymmetricAdvection::v_Advect(), Nektar::MappingExtrapolate::v_CalcNeumannPressureBCs(), Nektar::MappingExtrapolate::v_CorrectPressureBCs(), Nektar::GlobalMapping::Mapping::v_Divergence(), Nektar::VCSMapping::v_DoInitialise(), Nektar::LinearSWE::v_DoOdeRhs(), Nektar::NonlinearSWE::v_DoOdeRhs(), Nektar::GlobalMapping::Mapping::v_DotGradJacobian(), Nektar::ShallowWaterSystem::v_InitObject(), Nektar::ForcingQuasi1D::v_InitObject(), Nektar::MultiRegions::ExpList::v_PhysDeriv(), Nektar::FieldUtils::ProcessStreamFunction::v_Process(), Nektar::VelocityCorrectionScheme::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SetUpPressureForcing(), Nektar::VCSMapping::v_SolvePressure(), Nektar::GlobalMapping::MappingXofXZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXofZ::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofXY::v_UpdateGeomInfo(), Nektar::GlobalMapping::MappingXYofZ::v_UpdateGeomInfo(), and Nektar::GlobalMapping::Mapping::v_VelocityLaplacian().

◆ GlobalSysSolnTypeMap

const char* const Nektar::MultiRegions::GlobalSysSolnTypeMap[]
Initial value:
= {"No Solution Type",
"DirectFull",
"DirectStaticCond",
"DirectMultiLevelStaticCond",
"IterativeFull",
"IterativeStaticCond",
"IterativeMultiLevelStaticCond",
"XxtFull",
"XxtStaticCond",
"XxtMultiLevelStaticCond",
"PETScFull",
"PETScStaticCond",
"PETScMultiLevelStaticCond"}

Definition at line 84 of file MultiRegions.hpp.

Referenced by Nektar::MultiRegions::AssemblyMapCG::CreateGraph(), Nektar::MultiRegions::ExpList::GenGlobalBndLinSys(), Nektar::MultiRegions::ExpList::GenGlobalLinSys(), and operator<<().

◆ LinSysIterSolverMap

const char* const Nektar::MultiRegions::LinSysIterSolverMap[]
Initial value:
= {
"NoLinSysIterSolver", "ConjugateGradient", "GMRES", "GMRESLoc"}

Definition at line 121 of file MultiRegions.hpp.

◆ LocalMatrixStorageStrategyMap

const char* const Nektar::MultiRegions::LocalMatrixStorageStrategyMap[]
Initial value:
= {
"Contiguous", "Non-contiguous", "Sparse"}

Definition at line 59 of file GlobalLinSysIterativeStaticCond.h.

◆ MatrixStorageTypeMap

const char* const Nektar::MultiRegions::MatrixStorageTypeMap[] = {"SmvBSR"}

Definition at line 131 of file MultiRegions.hpp.

Referenced by Nektar::MultiRegions::GlobalMatrix::GlobalMatrix().

◆ NullAssemblyMapSharedPtr

AssemblyMapSharedPtr Nektar::MultiRegions::NullAssemblyMapSharedPtr
static

◆ NullExpList

ExpList Nektar::MultiRegions::NullExpList
static

An empty ExpList object.

Definition at line 1498 of file ExpList.h.

◆ NullExpListSharedPtr

ExpListSharedPtr Nektar::MultiRegions::NullExpListSharedPtr
static

◆ NullExpListSharedPtrArray

const Array<OneD, ExpListSharedPtr> Nektar::MultiRegions::NullExpListSharedPtrArray
static

Definition at line 2305 of file ExpList.h.

◆ NullGlobalLinSysManager

LibUtilities::NekManager<GlobalLinSysKey, GlobalLinSys> Nektar::MultiRegions::NullGlobalLinSysManager
static

Definition at line 1503 of file ExpList.h.

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

◆ NullIntIntMap

std::map<int, int> Nektar::MultiRegions::NullIntIntMap
static

Definition at line 46 of file AssemblyMapCG.h.

◆ NullLocTraceToTraceMapSharedPtr

LocTraceToTraceMapSharedPtr Nektar::MultiRegions::NullLocTraceToTraceMapSharedPtr
static

◆ NullPeriodicMap

PeriodicMap Nektar::MultiRegions::NullPeriodicMap
static

Definition at line 176 of file MultiRegions.hpp.

◆ NullPreconditionerSharedPtr

PreconditionerSharedPtr Nektar::MultiRegions::NullPreconditionerSharedPtr
static

Definition at line 55 of file Preconditioner.h.

Referenced by Nektar::LinearElasticSystem::v_DoSolve().

◆ NullVarFactorsMap

VarFactorsMap Nektar::MultiRegions::NullVarFactorsMap
static

◆ NullVecIntIntMap

const std::vector<std::map<int, int> > Nektar::MultiRegions::NullVecIntIntMap
static

Definition at line 47 of file AssemblyMapCG.h.