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 ()
 
GlobalVecLinSysFactory & GetGlobalVecLinSysFactory ()
 
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 302 of file AssemblyCommDG.h.

◆ AssemblyMapCGSharedPtr

Definition at line 52 of file AssemblyMapCG.h.

◆ AssemblyMapDGSharedPtr

Definition at line 48 of file AssemblyMapDG.h.

◆ AssemblyMapSharedPtr

Definition at line 52 of file AssemblyMap.h.

◆ BlockMatrixMap

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

Definition at line 94 of file ExpList.h.

◆ BlockMatrixMapShPtr

A shared pointer to a BlockMatrixMap.

Definition at line 96 of file ExpList.h.

◆ BndTypesVector

Definition at line 135 of file MultiRegions.hpp.

◆ BndTypesVectorIter

Definition at line 137 of file MultiRegions.hpp.

◆ BottomUpSubStructuredGraphSharedPtr

Definition at line 62 of file SubStructuredGraph.h.

◆ ContField3DHomogeneous1DSharedPtr

Definition at line 105 of file ContField3DHomogeneous1D.h.

◆ ContField3DHomogeneous2DSharedPtr

Definition at line 98 of file ContField3DHomogeneous2D.h.

◆ ContFieldSharedPtr

Definition at line 270 of file ContField.h.

◆ DisContField3DHomogeneous1DSharedPtr

Definition at line 219 of file DisContField3DHomogeneous1D.h.

◆ DisContField3DHomogeneous2DSharedPtr

Definition at line 138 of file DisContField3DHomogeneous2D.h.

◆ DisContFieldSharedPtr

Definition at line 341 of file DisContField.h.

◆ DofGraph

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

Definition at line 55 of file AssemblyMapCG.h.

◆ ExchangeMethodSharedPtr

Definition at line 75 of file AssemblyCommDG.h.

◆ ExpList2DHomogeneous1DSharedPtr

Shared pointer to an ExpList2DHomogeneous1D object.

Definition at line 52 of file ExpList2DHomogeneous1D.h.

◆ ExpList2DHomogeneous1DVector

Vector of pointers to ExpList2DHomogeneous1D objects.

Definition at line 55 of file ExpList2DHomogeneous1D.h.

◆ ExpList2DHomogeneous2DSharedPtr

Shared pointer to an ExpList2DHomogeneous2D object.

Definition at line 52 of file ExpList2DHomogeneous2D.h.

◆ ExpList2DHomogeneous2DVector

Vector of pointers to ExpList2DHomogeneous2D objects.

Definition at line 55 of file ExpList2DHomogeneous2D.h.

◆ ExpList3DHomogeneous1DSharedPtr

Shared pointer to an ExpList3DHomogeneous1D object.

Definition at line 54 of file ExpList3DHomogeneous1D.h.

◆ ExpList3DHomogeneous1DVector

Vector of pointers to ExpList3DHomogeneous1D objects.

Definition at line 57 of file ExpList3DHomogeneous1D.h.

◆ ExpList3DHomogeneous2DSharedPtr

Shared pointer to an ExpList3DHomogeneous2D object.

Definition at line 52 of file ExpList3DHomogeneous2D.h.

◆ ExpList3DHomogeneous2DVector

Vector of pointers to ExpList3DHomogeneous2D objects.

Definition at line 55 of file ExpList3DHomogeneous2D.h.

◆ ExpListHomogeneous1DSharedPtr

Shared pointer to an ExpList3DHomogeneous1D object.

Definition at line 69 of file ExpListHomogeneous1D.h.

◆ ExpListHomogeneous1DVector

Vector of pointers to ExpList3DHomogeneous1D objects.

Definition at line 71 of file ExpListHomogeneous1D.h.

◆ ExpListHomogeneous2DSharedPtr

Shared pointer to an ExpList3DHomogeneous2D object.

Definition at line 73 of file ExpListHomogeneous2D.h.

◆ ExpListHomogeneous2DVector

Vector of pointers to ExpList3DHomogeneous2D objects.

Definition at line 75 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 53 of file AssemblyMapCG.h.

◆ GJPStabilisationSharedPtr

Definition at line 105 of file GJPStabilisation.h.

◆ GlobalLinSysDirectStaticCondSharedPtr

Definition at line 50 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 67 of file GlobalLinSys.h.

◆ GlobalLinSysIterativeStaticCondSharedPtr

Definition at line 51 of file GlobalLinSysIterativeStaticCond.h.

◆ GlobalLinSysMap

Mapping between GlobalLinSys objects and their associated keys.

Definition at line 55 of file GlobalLinSys.h.

◆ GlobalLinSysMapShPtr

Pointer to a GlobalLinSys/key map.

Definition at line 57 of file GlobalLinSys.h.

◆ GlobalLinSysPETScStaticCondSharedPtr

Definition at line 51 of file GlobalLinSysPETScStaticCond.h.

◆ GlobalLinSysSharedPtr

Pointer to a GlobalLinSys object.

Definition at line 53 of file GlobalLinSys.h.

◆ GlobalLinSysStaticCondSharedPtr

Definition at line 52 of file GlobalLinSysStaticCond.h.

◆ GlobalLinSysXxtStaticCondSharedPtr

Definition at line 54 of file GlobalLinSysXxtStaticCond.h.

◆ GlobalMatrixKeySharedPtr

A pointer to a GlobalMatrixKey.

Definition at line 116 of file GlobalMatrixKey.h.

◆ GlobalMatrixMap

Mapping from global matrix keys to global matrices.

Definition at line 88 of file GlobalMatrix.h.

◆ GlobalMatrixMapShPtr

Shared pointer to a global matrix map.

Definition at line 90 of file GlobalMatrix.h.

◆ GlobalMatrixSharedPtr

Shared pointer to a GlobalMatrix object.

Definition at line 86 of file GlobalMatrix.h.

◆ Homo1DBlockMatrixMap

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

Definition at line 61 of file ExpListHomogeneous1D.h.

◆ Homo1DBlockMatrixMapShPtr

A shared pointer to a BlockMatrixMap.

Definition at line 63 of file ExpListHomogeneous1D.h.

◆ Homo2DBlockMatrixMap

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

Definition at line 65 of file ExpListHomogeneous2D.h.

◆ Homo2DBlockMatrixMapShPtr

A shared pointer to a BlockMatrixMap.

Definition at line 67 of file ExpListHomogeneous2D.h.

◆ InterfaceExchangeSharedPtr

Definition at line 216 of file InterfaceMapDG.h.

◆ InterfaceMapDGSharedPtr

Definition at line 269 of file InterfaceMapDG.h.

◆ InterfaceTraceSharedPtr

Definition at line 103 of file InterfaceMapDG.h.

◆ LocTraceToTraceMapSharedPtr

Definition at line 412 of file LocTraceToTraceMap.h.

◆ MultiLevelBisectedGraphSharedPtr

Definition at line 65 of file SubStructuredGraph.h.

◆ PatchMapSharedPtr

Definition at line 66 of file SubStructuredGraph.h.

◆ PeriodicMap

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

Definition at line 177 of file MultiRegions.hpp.

◆ PreconditionerBlockSharedPtr

Definition at line 48 of file PreconditionerBlock.h.

◆ PreconditionerDiagonalSharedPtr

Definition at line 46 of file PreconditionerDiagonal.h.

◆ PreconditionerJacobiSharedPtr

Definition at line 140 of file PreconditionerDiagonal.h.

◆ PreconditionerLinearSharedPtr

Definition at line 54 of file PreconditionerLinear.h.

◆ PreconditionerLinearWithBlockSharedPtr

Definition at line 47 of file PreconditionerLinearWithBlock.h.

◆ PreconditionerLinearWithDiagSharedPtr

Definition at line 49 of file PreconditionerLinearWithDiag.h.

◆ PreconditionerLinearWithLowEnergySharedPtr

Definition at line 47 of file PreconditionerLinearWithLowEnergy.h.

◆ PreconditionerLowEnergySharedPtr

Definition at line 51 of file PreconditionerLowEnergy.h.

◆ PreconditionerNullSharedPtr

Definition at line 97 of file PreconditionerDiagonal.h.

◆ PreconditionerSharedPtr

Definition at line 60 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 62 of file Preconditioner.h.

◆ RobinBCInfoSharedPtr

Definition at line 155 of file MultiRegions.hpp.

◆ SubGraphSharedPtr

Definition at line 63 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 47 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 56 of file MultiRegions.hpp.

◆ AdjacentTraceOrientation

Enumerator
eAdjacentEdgeIsForwards 
eAdjacentEdgeIsBackwards 

Definition at line 48 of file MultiRegions.hpp.

◆ Direction

Enumerator
eX 
eY 
eZ 
eS 
eN 

Definition at line 69 of file ExpList.h.

◆ ExpansionType

Enumerator
e0D 
e1D 
e2D 
e2DH1D 
e3DH1D 
e3DH2D 
e3D 
eNoType 

Definition at line 78 of file ExpList.h.

◆ GJPStabilisationType

Enumerator
eNoGJPStabilisation 
eExplicitGJPStabilisation 
eSemiImplicitGJPStabilisation 

Definition at line 108 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 68 of file MultiRegions.hpp.

69{
70 eNoSolnType, ///< No Solution type specified
84};
@ eNoSolnType
No Solution type specified.

◆ Homogeneous1DMatType

Enumerator
eForwardsCoeffSpace1D 
eBackwardsCoeffSpace1D 
eForwardsPhysSpace1D 
eBackwardsPhysSpace1D 

Definition at line 50 of file ExpListHomogeneous1D.h.

◆ Homogeneous2DMatType

Enumerator
eForwardsCoeffSpaceY1D 
eForwardsCoeffSpaceZ1D 
eBackwardsCoeffSpaceY1D 
eBackwardsCoeffSpaceZ1D 
eForwardsPhysSpaceY1D 
eForwardsPhysSpaceZ1D 
eBackwardsPhysSpaceY1D 
eBackwardsPhysSpaceZ1D 

Definition at line 50 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 47 of file PreconditionerLinear.h.

◆ LinSysIterSolver

Enumerator
eNoLinSysIterSolver 

No Solution type specified.

eConjugateGradient 

Conjugate Gradient.

eGMRES 

GMRES.

eGMRESLoc 

GMRES in Local storage.

Definition at line 115 of file MultiRegions.hpp.

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

◆ LocalMatrixStorageStrategy

◆ MatrixStorageType

Enumerator
eSmvBSR 

Definition at line 128 of file MultiRegions.hpp.

129{
130 eSmvBSR
131};

◆ PETScMatMult

Enumerator.

Enumerator
ePETScMatMultSparse 
ePETScMatMultShell 

Definition at line 51 of file GlobalLinSysPETSc.h.

◆ ProjectionType

Type of Galerkin projection.

Enumerator
eGalerkin 
eDiscontinuous 
eMixed_CG_Discontinuous 

Definition at line 101 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 4346 of file ExpList.cpp.

4349{
4350 // Copy transpose.
4355 {
4356 for (int i = 0; i < nquad2; ++i)
4357 {
4358 for (int j = 0; j < nquad1; ++j)
4359 {
4360 out[i * nquad1 + j] = in[j * nquad2 + i];
4361 }
4362 }
4363 }
4364 else
4365 {
4366 for (int i = 0; i < nquad2; ++i)
4367 {
4368 for (int j = 0; j < nquad1; ++j)
4369 {
4370 out[i * nquad1 + j] = in[i * nquad1 + j];
4371 }
4372 }
4373 }
4374
4379 {
4380 // Reverse x direction
4381 for (int i = 0; i < nquad2; ++i)
4382 {
4383 for (int j = 0; j < nquad1 / 2; ++j)
4384 {
4385 swap(out[i * nquad1 + j], out[i * nquad1 + nquad1 - j - 1]);
4386 }
4387 }
4388 }
4389
4394 {
4395 // Reverse y direction
4396 for (int j = 0; j < nquad1; ++j)
4397 {
4398 for (int i = 0; i < nquad2 / 2; ++i)
4399 {
4400 swap(out[i * nquad1 + j], out[(nquad2 - i - 1) * nquad1 + j]);
4401 }
4402 }
4403 }
4404}

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 684 of file SubStructuredGraph.cpp.

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

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 2223 of file AssemblyMapCG.cpp.

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

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 2271 of file AssemblyMapCG.cpp.

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

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 94 of file GlobalLinSys.cpp.

95{
96 static GlobalLinSysFactory instance;
97 return instance;
98}
Provides a generic Factory class.
Definition: NekFactory.hpp:105

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

◆ GetGlobalVecLinSysFactory()

GlobalVecLinSysFactory & Nektar::MultiRegions::GetGlobalVecLinSysFactory ( )

Definition at line 69 of file GlobalLinSysBlockDiagonal.cpp.

70{
71 static GlobalVecLinSysFactory instance;
72 return instance;
73}

◆ 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 705 of file SubStructuredGraph.cpp.

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

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

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 108 of file GlobalLinSysKey.cpp.

109{
110 if (lhs.m_solnType < rhs.m_solnType)
111 {
112 return true;
113 }
114
115 if (lhs.m_solnType > rhs.m_solnType)
116 {
117 return false;
118 }
119
120 if (lhs.m_varFactors.size() < rhs.m_varFactors.size())
121 {
122 return true;
123 }
124
125 if (lhs.m_varFactors.size() > rhs.m_varFactors.size())
126 {
127 return false;
128 }
129
130 for (unsigned int i = 0; i < lhs.m_varFactors_hashes.size(); ++i)
131 {
132 if (lhs.m_varFactors_hashes[i] < rhs.m_varFactors_hashes[i])
133 {
134 return true;
135 }
136 if (lhs.m_varFactors_hashes[i] > rhs.m_varFactors_hashes[i])
137 {
138 return false;
139 }
140 }
141
142 return (*dynamic_cast<const GlobalMatrixKey *>(&lhs) <
143 *dynamic_cast<const GlobalMatrixKey *>(&rhs));
144}
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 72 of file GlobalMatrixKey.cpp.

73{
74 if (lhs.m_matrixType < rhs.m_matrixType)
75 {
76 return true;
77 }
78
79 if (lhs.m_matrixType > rhs.m_matrixType)
80 {
81 return false;
82 }
83
84 if (lhs.m_shapeType < rhs.m_shapeType)
85 {
86 return true;
87 }
88
89 if (lhs.m_shapeType > rhs.m_shapeType)
90 {
91 return false;
92 }
93
94 if (lhs.m_constFactors.size() < rhs.m_constFactors.size())
95 {
96 return true;
97 }
98 else if (lhs.m_constFactors.size() > rhs.m_constFactors.size())
99 {
100 return false;
101 }
102 else
103 {
104 StdRegions::ConstFactorMap::const_iterator x, y;
105 for (x = lhs.m_constFactors.begin(), y = rhs.m_constFactors.begin();
106 x != lhs.m_constFactors.end(); ++x, ++y)
107 {
108 if (x->second < y->second)
109 {
110 return true;
111 }
112 if (x->second > y->second)
113 {
114 return false;
115 }
116 }
117 }
118
119 if (lhs.m_varCoeffs.size() < rhs.m_varCoeffs.size())
120 {
121 return true;
122 }
123 else if (lhs.m_varCoeffs.size() > rhs.m_varCoeffs.size())
124 {
125 return false;
126 }
127 else
128 {
129 StdRegions::VarCoeffMap::const_iterator x, y;
130 for (x = lhs.m_varCoeffs.begin(), y = rhs.m_varCoeffs.begin();
131 x != lhs.m_varCoeffs.end(); ++x, ++y)
132 {
133 if (x->second.GetHash() < y->second.GetHash())
134 {
135 return true;
136 }
137 if (x->second.GetHash() > y->second.GetHash())
138 {
139 return false;
140 }
141 }
142 }
143
144 if (!rhs.m_locToGloMap.lock().get())
145 {
146 return false;
147 }
148 else if (!lhs.m_locToGloMap.lock().get() && rhs.m_locToGloMap.lock().get())
149 {
150 return true;
151 }
152 if (lhs.m_locToGloMap.lock()->GetHash() <
153 rhs.m_locToGloMap.lock()->GetHash())
154 {
155 return true;
156 }
157
158 return false;
159}
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 152 of file GlobalLinSysKey.cpp.

153{
154 os << "MatrixType: " << StdRegions::MatrixTypeMap[rhs.GetMatrixType()]
155 << ", ShapeType: " << LibUtilities::ShapeTypeMap[rhs.GetShapeType()]
156 << std::endl;
157 os << "Solution Type: " << GlobalSysSolnTypeMap[rhs.GetGlobalSysSolnType()]
158 << endl;
159 os << "Number of constants: " << rhs.GetNConstFactors() << endl;
160 for (auto &x : rhs.GetConstFactors())
161 {
162 os << " Constant " << StdRegions::ConstFactorTypeMap[x.first] << ": "
163 << x.second << endl;
164 }
165 os << "Number of variable coefficients: " << rhs.GetNVarCoeffs() << endl;
166
167 os << "Number of variable factors : " << rhs.GetNVarFactors() << endl;
168
169 return os;
170}
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:79
const char *const GlobalSysSolnTypeMap[]
const char *const ConstFactorTypeMap[]
Definition: StdRegions.hpp:391
const char *const MatrixTypeMap[]
Definition: StdRegions.hpp:145

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 161 of file GlobalMatrixKey.cpp.

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

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 65 of file AssemblyMap.cpp.

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

References ASSERTL1.

◆ RoundNekDoubleToInt() [2/2]

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

Rounds a double precision number to an integer.

Definition at line 59 of file AssemblyMap.cpp.

60{
61 return int(x > 0.0 ? x + 0.5 : x - 0.5);
62}

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

◆ SubGraphWithoutVerts()

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

Definition at line 667 of file SubStructuredGraph.cpp.

668{
669 return g->GetNverts() == 0;
670}

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

Variable Documentation

◆ DirCartesianMap

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

Definition at line 90 of file ExpList.h.

Referenced by Nektar::GlobalMapping::MappingGeneral::CalculateChristoffel(), Nektar::GlobalMapping::MappingXYofXY::CalculateChristoffel(), Nektar::SolverUtils::FilterAeroForces::CalculateForcesMapping(), Nektar::GlobalMapping::MappingGeneral::CalculateMetricTerms(), Nektar::LinearSWE::DoOdeRhs(), Nektar::NonlinearSWE::DoOdeRhs(), 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::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 86 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 123 of file MultiRegions.hpp.

◆ LocalMatrixStorageStrategyMap

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

Definition at line 61 of file GlobalLinSysIterativeStaticCond.h.

◆ MatrixStorageTypeMap

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

Definition at line 133 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 1513 of file ExpList.h.

◆ NullExpListSharedPtr

ExpListSharedPtr Nektar::MultiRegions::NullExpListSharedPtr
static

◆ NullExpListSharedPtrArray

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

Definition at line 2334 of file ExpList.h.

◆ NullGlobalLinSysManager

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

Definition at line 1518 of file ExpList.h.

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

◆ NullIntIntMap

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

Definition at line 48 of file AssemblyMapCG.h.

◆ NullLocTraceToTraceMapSharedPtr

LocTraceToTraceMapSharedPtr Nektar::MultiRegions::NullLocTraceToTraceMapSharedPtr
static

◆ NullPeriodicMap

PeriodicMap Nektar::MultiRegions::NullPeriodicMap
static

Definition at line 178 of file MultiRegions.hpp.

◆ NullPreconditionerSharedPtr

PreconditionerSharedPtr Nektar::MultiRegions::NullPreconditionerSharedPtr
static

Definition at line 57 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 49 of file AssemblyMapCG.h.