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

Classes

class  ExchangeMethod
 
class  Serial
 
class  AllToAll
 
class  AllToAllV
 
class  NeighborAllToAllV
 
class  Pairwise
 
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
 
struct  cmpop
 
class  LocTraceToTraceMap
 A helper class to deal with trace operations in the discontinuous Galerkin code. More...
 
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  ExpList
 Base class for all multi-elemental spectral/hp expansions. More...
 
class  ExpList1DHomogeneous2D
 Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expansions. More...
 
class  ExpList2DHomogeneous1D
 Abstraction of a two-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  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...
 
struct  RobinBCInfo
 
struct  PeriodicEntity
 
struct  RotPeriodicInfo
 
class  Preconditioner
 
class  PreconditionerBlock
 
class  PreconditionerDiagonal
 
class  PreconditionerNull
 
class  PreconditionerLinear
 
class  PreconditionerLinearWithBlock
 
class  PreconditionerLinearWithDiag
 
class  PreconditionerLinearWithLowEnergy
 
class  PreconditionerLowEnergy
 
class  PatchMap
 
class  SubGraph
 
class  MultiLevelBisectedGraph
 
class  BottomUpSubStructuredGraph
 

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< 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< ExpList1DHomogeneous2DExpList1DHomogeneous2DSharedPtr
 Shared pointer to an ExpList1DHomogeneous2D object. More...
 
typedef std::vector< ExpList1DHomogeneous2DSharedPtrExpList1DHomogeneous2DVector
 Vector of pointers to ExpList1DHomogeneous2D objects. 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< 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< 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< 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  PreconditionerType {
  eNull , eDiagonal , eLinearWithDiagonal , eLinear ,
  eLowEnergy , eLinearWithLowEnergy , eBlock , eLinearWithBlock
}
 
enum  LinSysIterSolver { eNoLinSysIterSolver , eConjugateGradient , eGMRES }
 
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...
 
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 []
 
static ExpList NullExpList
 An empty ExpList object. More...
 
static ExpListSharedPtr NullExpListSharedPtr
 
static const Array< OneD, ExpListSharedPtrNullExpListSharedPtrArray
 
const char *const LocalMatrixStorageStrategyMap []
 
static VarFactorsMap NullVarFactorsMap
 
const char *const GlobalSysSolnTypeMap []
 
const char *const PreconditionerTypeMap []
 
const char *const LinSysIterSolverMap []
 
const char *const MatrixStorageTypeMap []
 
static PeriodicMap NullPeriodicMap
 
static PreconditionerSharedPtr NullPreconditionerSharedPtr
 

Typedef Documentation

◆ AssemblyCommDGSharedPtr

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

◆ BlockMatrixMap

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

Definition at line 99 of file ExpList.h.

◆ BlockMatrixMapShPtr

A shared pointer to a BlockMatrixMap.

Definition at line 101 of file ExpList.h.

◆ BndTypesVector

Definition at line 165 of file MultiRegions.hpp.

◆ BndTypesVectorIter

Definition at line 166 of file MultiRegions.hpp.

◆ BottomUpSubStructuredGraphSharedPtr

Definition at line 62 of file SubStructuredGraph.h.

◆ ContField3DHomogeneous1DSharedPtr

Definition at line 107 of file ContField3DHomogeneous1D.h.

◆ ContField3DHomogeneous2DSharedPtr

Definition at line 102 of file ContField3DHomogeneous2D.h.

◆ ContFieldSharedPtr

Definition at line 292 of file ContField.h.

◆ DisContField3DHomogeneous1DSharedPtr

Definition at line 306 of file DisContField3DHomogeneous1D.h.

◆ DisContField3DHomogeneous2DSharedPtr

Definition at line 167 of file DisContField3DHomogeneous2D.h.

◆ DisContFieldSharedPtr

Definition at line 385 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.

◆ ExpList1DHomogeneous2DSharedPtr

Shared pointer to an ExpList1DHomogeneous2D object.

Definition at line 52 of file ExpList1DHomogeneous2D.h.

◆ ExpList1DHomogeneous2DVector

Vector of pointers to ExpList1DHomogeneous2D objects.

Definition at line 54 of file ExpList1DHomogeneous2D.h.

◆ ExpList2DHomogeneous1DSharedPtr

Shared pointer to an ExpList2DHomogeneous1D object.

Definition at line 53 of file ExpList2DHomogeneous1D.h.

◆ ExpList2DHomogeneous1DVector

Vector of pointers to ExpList2DHomogeneous1D objects.

Definition at line 56 of file ExpList2DHomogeneous1D.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 56 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 54 of file ExpList3DHomogeneous2D.h.

◆ ExpListHomogeneous1DSharedPtr

Shared pointer to an ExpList3DHomogeneous1D object.

Definition at line 68 of file ExpListHomogeneous1D.h.

◆ ExpListHomogeneous1DVector

Vector of pointers to ExpList3DHomogeneous1D objects.

Definition at line 70 of file ExpListHomogeneous1D.h.

◆ ExpListHomogeneous2DSharedPtr

Shared pointer to an ExpList3DHomogeneous2D object.

Definition at line 72 of file ExpListHomogeneous2D.h.

◆ ExpListHomogeneous2DVector

Vector of pointers to ExpList3DHomogeneous2D objects.

Definition at line 74 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.

◆ 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 52 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 53 of file GlobalLinSysStaticCond.h.

◆ GlobalLinSysXxtStaticCondSharedPtr

Definition at line 54 of file GlobalLinSysXxtStaticCond.h.

◆ GlobalMatrixKeySharedPtr

A pointer to a GlobalMatrixKey.

Definition at line 112 of file GlobalMatrixKey.h.

◆ GlobalMatrixMap

Mapping from global matrix keys to global matrices.

Definition at line 90 of file GlobalMatrix.h.

◆ GlobalMatrixMapShPtr

Shared pointer to a global matrix map.

Definition at line 92 of file GlobalMatrix.h.

◆ GlobalMatrixSharedPtr

Shared pointer to a GlobalMatrix object.

Definition at line 88 of file GlobalMatrix.h.

◆ Homo1DBlockMatrixMap

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

Definition at line 60 of file ExpListHomogeneous1D.h.

◆ Homo1DBlockMatrixMapShPtr

A shared pointer to a BlockMatrixMap.

Definition at line 62 of file ExpListHomogeneous1D.h.

◆ Homo2DBlockMatrixMap

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

Definition at line 64 of file ExpListHomogeneous2D.h.

◆ Homo2DBlockMatrixMapShPtr

A shared pointer to a BlockMatrixMap.

Definition at line 66 of file ExpListHomogeneous2D.h.

◆ LocTraceToTraceMapSharedPtr

Definition at line 381 of file LocTraceToTraceMap.h.

◆ MultiLevelBisectedGraphSharedPtr

Definition at line 66 of file SubStructuredGraph.h.

◆ PatchMapSharedPtr

Definition at line 68 of file SubStructuredGraph.h.

◆ PeriodicMap

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

Definition at line 207 of file MultiRegions.hpp.

◆ PreconditionerBlockSharedPtr

Definition at line 49 of file PreconditionerBlock.h.

◆ PreconditionerDiagonalSharedPtr

Definition at line 47 of file PreconditionerDiagonal.h.

◆ PreconditionerLinearSharedPtr

Definition at line 55 of file PreconditionerLinear.h.

◆ PreconditionerLinearWithBlockSharedPtr

Definition at line 46 of file PreconditionerLinearWithBlock.h.

◆ PreconditionerLinearWithDiagSharedPtr

Definition at line 48 of file PreconditionerLinearWithDiag.h.

◆ PreconditionerLinearWithLowEnergySharedPtr

Definition at line 46 of file PreconditionerLinearWithLowEnergy.h.

◆ PreconditionerLowEnergySharedPtr

Definition at line 51 of file PreconditionerLowEnergy.h.

◆ PreconditionerNullSharedPtr

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

◆ RobinBCInfoSharedPtr

Definition at line 187 of file MultiRegions.hpp.

◆ SubGraphSharedPtr

Definition at line 64 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 81 of file LocTraceToTraceMap.h.

◆ VarFactorsMap

Definition at line 46 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.

70  {
71  eX,
72  eY,
73  eZ,
74  eS,
75  eN
76  };

◆ ExpansionType

Enumerator
e0D 
e1D 
e2D 
e2DH1D 
e3DH1D 
e3DH2D 
e3D 
eNoType 

Definition at line 78 of file ExpList.h.

◆ 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 48 of file PreconditionerLinear.h.

◆ LinSysIterSolver

Enumerator
eNoLinSysIterSolver 

No Solution type specified.

eConjugateGradient 
eGMRES 

Definition at line 137 of file MultiRegions.hpp.

138  {
139  eNoLinSysIterSolver,///< No Solution type specified
141  eGMRES
142  };
@ eNoLinSysIterSolver
No Solution type specified.

◆ LocalMatrixStorageStrategy

Enumerator
eNoStrategy 
eContiguous 
eNonContiguous 
eSparse 

Definition at line 54 of file GlobalLinSysIterativeStaticCond.h.

◆ MatrixStorageType

Enumerator
eSmvBSR 

Definition at line 154 of file MultiRegions.hpp.

155  {
156  eSmvBSR
157  };

◆ PETScMatMult

Enumerator.

Enumerator
ePETScMatMultSparse 
ePETScMatMultShell 

Definition at line 51 of file GlobalLinSysPETSc.h.

◆ PreconditionerType

Enumerator
eNull 

No Solution type specified.

eDiagonal 
eLinearWithDiagonal 
eLinear 
eLowEnergy 
eLinearWithLowEnergy 
eBlock 
eLinearWithBlock 

Definition at line 112 of file MultiRegions.hpp.

113  {
114  eNull, ///< No Solution type specified
115  eDiagonal,
117  eLinear,
118  eLowEnergy,
120  eBlock,
122  };
@ eNull
No Solution type specified.

◆ ProjectionType

Type of Galerkin projection.

Enumerator
eGalerkin 
eDiscontinuous 
eMixed_CG_Discontinuous 

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

3826  {
3827  // Copy transpose.
3828  if (orient == StdRegions::eDir1FwdDir2_Dir2FwdDir1 ||
3832  {
3833  for (int i = 0; i < nquad2; ++i)
3834  {
3835  for (int j = 0; j < nquad1; ++j)
3836  {
3837  out[i*nquad1 + j] = in[j*nquad2 + i];
3838  }
3839  }
3840  }
3841  else
3842  {
3843  for (int i = 0; i < nquad2; ++i)
3844  {
3845  for (int j = 0; j < nquad1; ++j)
3846  {
3847  out[i*nquad1 + j] = in[i*nquad1 + j];
3848  }
3849  }
3850  }
3851 
3852  if (orient == StdRegions::eDir1BwdDir1_Dir2FwdDir2 ||
3856  {
3857  // Reverse x direction
3858  for (int i = 0; i < nquad2; ++i)
3859  {
3860  for (int j = 0; j < nquad1/2; ++j)
3861  {
3862  swap(out[i*nquad1 + j],
3863  out[i*nquad1 + nquad1-j-1]);
3864  }
3865  }
3866  }
3867 
3868  if (orient == StdRegions::eDir1FwdDir1_Dir2BwdDir2 ||
3872  {
3873  // Reverse y direction
3874  for (int j = 0; j < nquad1; ++j)
3875  {
3876  for (int i = 0; i < nquad2/2; ++i)
3877  {
3878  swap(out[i*nquad1 + j],
3879  out[(nquad2-i-1)*nquad1 + j]);
3880  }
3881  }
3882  }
3883  }

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

712  {
713  int nGraphVerts = boost::num_vertices(graph);
714 
715  ASSERTL1(perm. size() >= nGraphVerts &&
716  iperm.size() >= nGraphVerts,
717  "Non-matching dimensions");
718 
719  // Call boost::cuthill_mckee_ordering to reorder the graph-vertices
720  // using the reverse Cuthill-Mckee algorithm
721  std::vector<BoostVertex> reorderedVerts(nGraphVerts);
722  boost::cuthill_mckee_ordering(graph, reorderedVerts.rbegin());
723 
724  //copy the reordering to the Arrays perm and iperm
725  for(int i = 0; i < nGraphVerts; i++)
726  {
727  perm[i] = reorderedVerts[i];
728  iperm[ reorderedVerts[i] ] = i;
729  }
730  }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:250

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

2239  {
2240  int minId = periodicEdges[0].id;
2241  int minIdK = 0;
2242  int k;
2243 
2244  for (k = 1; k < periodicEdges.size(); ++k)
2245  {
2246  if (periodicEdges[k].id < minId)
2247  {
2248  minId = min(minId, periodicEdges[k].id);
2249  minIdK = k;
2250  }
2251  }
2252 
2253  minId = min(minId, meshEdgeId);
2254 
2255  if (meshEdgeId != minId)
2256  {
2257  if (periodicEdges[minIdK].orient == StdRegions::eBackwards)
2258  {
2259  // Swap edge orientation
2260  edgeOrient = (edgeOrient == StdRegions::eForwards) ?
2262  }
2263  }
2264 
2265  return make_pair(minId, edgeOrient);
2266  }

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

2286  {
2287  StdRegions::Orientation returnval = faceOrient;
2288 
2289  if(perFaceOrient != StdRegions::eDir1FwdDir1_Dir2FwdDir2)
2290  {
2291  int tmp1 = (int)faceOrient - 5;
2292  int tmp2 = (int)perFaceOrient - 5;
2293 
2294  int flipDir1Map [8] = {2,3,0,1,6,7,4,5};
2295  int flipDir2Map [8] = {1,0,3,2,5,4,7,6};
2296  int transposeMap[8] = {4,5,6,7,0,2,1,3};
2297 
2298  // Transpose orientation
2299  if (tmp2 > 3)
2300  {
2301  tmp1 = transposeMap[tmp1];
2302  }
2303 
2304  // Reverse orientation in direction 1.
2305  if (tmp2 == 2 || tmp2 == 3 || tmp2 == 6 || tmp2 == 7)
2306  {
2307  tmp1 = flipDir1Map[tmp1];
2308  }
2309 
2310  // Reverse orientation in direction 2
2311  if (tmp2 % 2 == 1)
2312  {
2313  tmp1 = flipDir2Map[tmp1];
2314  }
2315 
2316  returnval = (StdRegions::Orientation)(tmp1+5);
2317  }
2318  return returnval;
2319  }

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

213  {
214  static GlobalLinSysFactory instance;
215  return instance;
216  }
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.
Definition: GlobalLinSys.h:67

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

◆ GetGlobalVecLinSysFactory()

GlobalVecLinSysFactory& Nektar::MultiRegions::GetGlobalVecLinSysFactory ( )

Definition at line 75 of file GlobalLinSysBlockDiagonal.cpp.

76  {
77  static GlobalVecLinSysFactory instance;
78  return instance;
79  }

◆ GetPreconFactory()

PreconFactory & Nektar::MultiRegions::GetPreconFactory ( )

Definition at line 89 of file Preconditioner.cpp.

90  {
91  static PreconFactory instance;
92  return instance;
93  }
LibUtilities::NekFactory< std::string, Preconditioner, const std::shared_ptr< GlobalLinSys > &, const std::shared_ptr< AssemblyMap > & > PreconFactory

Referenced by Nektar::MultiRegions::GlobalLinSys::CreatePrecon(), Nektar::MultiRegions::PreconditionerLinearWithBlock::v_InitObject(), Nektar::MultiRegions::PreconditionerLinearWithDiag::v_InitObject(), and Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_InitObject().

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

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

1042  {
1043  int nGraphVerts = boost::num_vertices(graph);
1044 
1045  ASSERTL1(perm. size() >= nGraphVerts &&
1046  iperm.size() >= nGraphVerts,
1047  "Non-matching dimensions");
1048 
1049  for (int i = 0; i < nGraphVerts; i++)
1050  {
1051  perm [i] = i;
1052  iperm[i] = i;
1053  }
1054  }

References ASSERTL1.

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

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

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

◆ operator<() [2/2]

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

Definition at line 79 of file GlobalMatrixKey.cpp.

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

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

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

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

170  {
171  os << "MatrixType: " << rhs.GetMatrixType() << endl;
172  os << "Number of constants: " << rhs.GetNConstFactors() << endl;
173  for(auto &x : rhs.GetConstFactors())
174  {
175  os << " Constant " << StdRegions::ConstFactorTypeMap[x.first]
176  << ": " << x.second << endl;
177  }
178  os << "Number of variable coefficients: "
179  << rhs.GetNVarCoeffs() << endl;
180 
181  return os;
182  }

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

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

References ASSERTL1.

◆ RoundNekDoubleToInt() [2/2]

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

Rounds a double precision number to an integer.

Definition at line 58 of file AssemblyMap.cpp.

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

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

◆ SubGraphWithoutVerts()

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

Definition at line 691 of file SubStructuredGraph.cpp.

692  {
693  return g->GetNverts() == 0;
694  }

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

Variable Documentation

◆ DirCartesianMap

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

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::Process(), Nektar::FieldUtils::ProcessStreamFunction::Process(), 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::VCSMapping::v_SetUpPressureForcing(), Nektar::VelocityCorrectionScheme::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 87 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"
}

Definition at line 144 of file MultiRegions.hpp.

◆ LocalMatrixStorageStrategyMap

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

Definition at line 62 of file GlobalLinSysIterativeStaticCond.h.

◆ MatrixStorageTypeMap

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

Definition at line 159 of file MultiRegions.hpp.

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

◆ NullAssemblyMapSharedPtr

AssemblyMapSharedPtr Nektar::MultiRegions::NullAssemblyMapSharedPtr
static

Definition at line 54 of file AssemblyMap.h.

Referenced by Nektar::MultiRegions::DisContField::v_HelmSolve().

◆ NullExpList

ExpList Nektar::MultiRegions::NullExpList
static

An empty ExpList object.

Definition at line 1791 of file ExpList.h.

◆ NullExpListSharedPtr

ExpListSharedPtr Nektar::MultiRegions::NullExpListSharedPtr
static

◆ NullExpListSharedPtrArray

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

Definition at line 2749 of file ExpList.h.

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

◆ PreconditionerTypeMap

const char* const Nektar::MultiRegions::PreconditionerTypeMap[]
Initial value:
=
{
"Null",
"Diagonal",
"FullLinearSpaceWithDiagonal",
"FullLinearSpace",
"LowEnergyBlock",
"FullLinearSpaceWithLowEnergyBlock",
"Block",
"FullLinearSpaceWithBlock"
}

Definition at line 124 of file MultiRegions.hpp.

Referenced by Nektar::MultiRegions::GlobalLinSys::CreatePrecon().