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

Classes

struct  _PeriodicEntity
 
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
 
class  ContField1D
 Abstraction of a global continuous one-dimensional spectral/hp element expansion which approximates the solution of a set of partial differential equations. More...
 
class  ContField2D
 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  ContField3D
 
class  ContField3DHomogeneous1D
 
class  ContField3DHomogeneous2D
 
class  DisContField1D
 This class is the abstraction of a global discontinuous two- dimensional spectral/hp element expansion which approximates the solution of a set of partial differential equations. More...
 
class  DisContField2D
 
class  DisContField3D
 
class  DisContField3DHomogeneous1D
 
class  DisContField3DHomogeneous2D
 
class  ExpList
 Base class for all multi-elemental spectral/hp expansions. More...
 
class  ExpList0D
 This class is the abstraction of a collection of zero-dimensional expansions which is merely a collection of points/values. More...
 
class  ExpList1D
 This class is the abstraction of a one-dimensional multi-elemental expansions which is merely a collection of local expansions. More...
 
class  ExpList1DHomogeneous2D
 Abstraction of a one-dimensional multi-elemental expansion which is merely a collection of local expansions. More...
 
class  ExpList2D
 Abstraction of a two-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  ExpList3D
 Abstraction of a three-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 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  MultiLevelBisectedGraph
 
class  PatchMap
 
class  Preconditioner
 
class  PreconditionerBlock
 
class  PreconditionerDiagonal
 
class  PreconditionerLinear
 
class  PreconditionerLinearWithBlock
 
class  PreconditionerLinearWithDiag
 
class  PreconditionerLinearWithLowEnergy
 
class  PreconditionerLowEnergy
 
class  PreconditionerNull
 
struct  RobinBCInfo
 
class  SubGraph
 

Typedefs

typedef boost::shared_ptr< AssemblyMapAssemblyMapSharedPtr
 
typedef boost::shared_ptr< AssemblyMapCGAssemblyMapCGSharedPtr
 
typedef boost::tuple< int, int, NekDoubleExtraDirDof
 
typedef vector< map< int, int > > DofGraph
 
typedef boost::shared_ptr< AssemblyMapDGAssemblyMapDGSharedPtr
 
typedef boost::shared_ptr< ContField1DContField1DSharedPtr
 
typedef boost::shared_ptr< ContField2DContField2DSharedPtr
 
typedef boost::shared_ptr< ContField3DContField3DSharedPtr
 
typedef boost::shared_ptr< ContField3DHomogeneous1DContField3DHomogeneous1DSharedPtr
 
typedef boost::shared_ptr< ContField3DHomogeneous2DContField3DHomogeneous2DSharedPtr
 
typedef boost::shared_ptr< DisContField1DDisContField1DSharedPtr
 
typedef boost::shared_ptr< DisContField2DDisContField2DSharedPtr
 
typedef boost::shared_ptr< DisContField3DDisContField3DSharedPtr
 
typedef boost::shared_ptr< DisContField3DHomogeneous1DDisContField3DHomogeneous1DSharedPtr
 
typedef boost::shared_ptr< DisContField3DHomogeneous2DDisContField3DHomogeneous2DSharedPtr
 
typedef map< GlobalMatrixKey, DNekScalBlkMatSharedPtrBlockMatrixMap
 A map between global matrix keys and their associated block matrices. More...
 
typedef boost::shared_ptr< BlockMatrixMapBlockMatrixMapShPtr
 A shared pointer to a BlockMatrixMap. More...
 
typedef boost::shared_ptr< ExpListExpListSharedPtr
 Shared pointer to an ExpList object. More...
 
typedef boost::shared_ptr< ExpList0DExpList0DSharedPtr
 Shared pointer to an ExpList0D object. More...
 
typedef std::vector< ExpList0DSharedPtrExpList0DVector
 Vector of pointers to ExpList0D objects. More...
 
typedef std::vector< ExpList0DSharedPtr >::iterator ExpList0DVectorIter
 Iterator for the vector of ExpList0D pointers. More...
 
typedef boost::shared_ptr< ExpList1DExpList1DSharedPtr
 Shared pointer to an ExpList1D object. More...
 
typedef std::vector< ExpList1DSharedPtrExpList1DVector
 Vector of pointers to ExpList1D objects. More...
 
typedef std::vector< ExpList1DSharedPtr >::iterator ExpList1DVectorIter
 Iterator for the vector of ExpList1D pointers. More...
 
typedef boost::shared_ptr< ExpList1DHomogeneous2DExpList1DHomogeneous2DSharedPtr
 Shared pointer to an ExpList1DHomogeneous2D object. More...
 
typedef std::vector< ExpList1DHomogeneous2DSharedPtrExpList1DHomogeneous2DVector
 Vector of pointers to ExpList1DHomogeneous2D objects. More...
 
typedef std::vector< ExpList1DHomogeneous2DSharedPtr >::iterator ExpList1DHomogeneous2DVectorIter
 Iterator for the vector of ExpList1DHomogeneous2D pointers. More...
 
typedef boost::shared_ptr< ExpList2DExpList2DSharedPtr
 Shared pointer to an ExpList2D object. More...
 
typedef std::vector< ExpList2DSharedPtrExpList2DVector
 Vector of pointers to ExpList2D objects. More...
 
typedef std::vector< ExpList2DSharedPtr >::iterator ExpList2DVectorIter
 Iterator for the vector of ExpList2D pointers. More...
 
typedef boost::shared_ptr< ExpList2DHomogeneous1DExpList2DHomogeneous1DSharedPtr
 Shared pointer to an ExpList2DHomogeneous1D object. More...
 
typedef std::vector< ExpList2DHomogeneous1DSharedPtrExpList2DHomogeneous1DVector
 Vector of pointers to ExpList2DHomogeneous1D objects. More...
 
typedef std::vector< ExpList2DHomogeneous1DSharedPtr >::iterator ExpList2DHomogeneous1DVectorIter
 Iterator for the vector of ExpList2DHomogeneous1D pointers. More...
 
typedef boost::shared_ptr< ExpList3DExpList3DSharedPtr
 Shared pointer to an ExpList3D object. More...
 
typedef std::vector< ExpList3DSharedPtrExpList3DVector
 Vector of pointers to ExpList3D objects. More...
 
typedef std::vector< ExpList3DSharedPtr >::iterator ExpList3DVectorIter
 Iterator over an ExpList3DVector. More...
 
typedef boost::shared_ptr< ExpList3DHomogeneous1DExpList3DHomogeneous1DSharedPtr
 Shared pointer to an ExpList3DHomogeneous1D object. More...
 
typedef std::vector< ExpList3DHomogeneous1DSharedPtrExpList3DHomogeneous1DVector
 Vector of pointers to ExpList3DHomogeneous1D objects. More...
 
typedef std::vector< ExpList3DHomogeneous1DSharedPtr >::iterator ExpList3DHomogeneous1DVectorIter
 Iterator for the vector of ExpList3DHomogeneous1D pointers. More...
 
typedef boost::shared_ptr< ExpList3DHomogeneous2DExpList3DHomogeneous2DSharedPtr
 Shared pointer to an ExpList3DHomogeneous2D object. More...
 
typedef std::vector< ExpList3DHomogeneous2DSharedPtrExpList3DHomogeneous2DVector
 Vector of pointers to ExpList3DHomogeneous2D objects. More...
 
typedef std::vector< ExpList3DHomogeneous2DSharedPtr >::iterator ExpList3DHomogeneous2DVectorIter
 Iterator for the vector of ExpList3DHomogeneous2D pointers. More...
 
typedef map< Homogeneous1DMatType, DNekBlkMatSharedPtrHomo1DBlockMatrixMap
 A map between homo matrix keys and their associated block matrices. More...
 
typedef boost::shared_ptr< Homo1DBlockMatrixMapHomo1DBlockMatrixMapShPtr
 A shared pointer to a BlockMatrixMap. More...
 
typedef boost::shared_ptr< ExpListHomogeneous1DExpListHomogeneous1DSharedPtr
 Shared pointer to an ExpList3DHomogeneous1D object. More...
 
typedef std::vector< ExpListHomogeneous1DSharedPtrExpListHomogeneous1DVector
 Vector of pointers to ExpList3DHomogeneous1D objects. More...
 
typedef std::vector< ExpListHomogeneous1DSharedPtr >::iterator ExpListHomogeneous1DVectorIter
 Iterator for the vector of ExpList3DHomogeneous1D pointers. More...
 
typedef map< Homogeneous2DMatType, DNekBlkMatSharedPtrHomo2DBlockMatrixMap
 A map between homo matrix keys and their associated block matrices. More...
 
typedef boost::shared_ptr< Homo2DBlockMatrixMapHomo2DBlockMatrixMapShPtr
 A shared pointer to a BlockMatrixMap. More...
 
typedef boost::shared_ptr< ExpListHomogeneous2DExpListHomogeneous2DSharedPtr
 Shared pointer to an ExpList3DHomogeneous2D object. More...
 
typedef std::vector< ExpListHomogeneous2DSharedPtrExpListHomogeneous2DVector
 Vector of pointers to ExpList3DHomogeneous2D objects. More...
 
typedef std::vector< ExpListHomogeneous2DSharedPtr >::iterator ExpListHomogeneous2DVectorIter
 Iterator for the vector of ExpList3DHomogeneous2D pointers. More...
 
typedef boost::shared_ptr< GlobalLinSysGlobalLinSysSharedPtr
 Pointer to a GlobalLinSys object. More...
 
typedef map< GlobalLinSysKey, GlobalLinSysSharedPtrGlobalLinSysMap
 Mapping between GlobalLinSys objects and their associated keys. More...
 
typedef boost::shared_ptr< GlobalLinSysMapGlobalLinSysMapShPtr
 Pointer to a GlobalLinSys/key map. More...
 
typedef LibUtilities::NekFactory< std::string, GlobalLinSys, const GlobalLinSysKey &, const boost::weak_ptr< ExpList > &, const boost::shared_ptr< AssemblyMap > & > GlobalLinSysFactory
 Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class. More...
 
typedef boost::shared_ptr< GlobalLinSysDirectStaticCondGlobalLinSysDirectStaticCondSharedPtr
 
typedef boost::shared_ptr< GlobalLinSysIterativeStaticCondGlobalLinSysIterativeStaticCondSharedPtr
 
typedef boost::shared_ptr< GlobalLinSysPETScStaticCondGlobalLinSysPETScStaticCondSharedPtr
 
typedef boost::shared_ptr< GlobalLinSysStaticCondGlobalLinSysStaticCondSharedPtr
 
typedef boost::shared_ptr< GlobalLinSysXxtStaticCondGlobalLinSysXxtStaticCondSharedPtr
 
typedef boost::shared_ptr< GlobalMatrixGlobalMatrixSharedPtr
 Shared pointer to a GlobalMatrix object. More...
 
typedef map< GlobalMatrixKey, GlobalMatrixSharedPtrGlobalMatrixMap
 Mapping from global matrix keys to global matrices. More...
 
typedef boost::shared_ptr< GlobalMatrixMapGlobalMatrixMapShPtr
 Shared pointer to a global matrix map. More...
 
typedef boost::shared_ptr< GlobalMatrixKeyGlobalMatrixKeySharedPtr
 A pointer to a GlobalMatrixKey. More...
 
typedef std::vector< SpatialDomains::BoundaryConditionTypeBndTypesVector
 
typedef std::vector< SpatialDomains::BoundaryConditionType >::iterator BndTypesVectorIter
 
typedef boost::shared_ptr< RobinBCInfoRobinBCInfoSharedPtr
 
typedef struct Nektar::MultiRegions::_PeriodicEntity PeriodicEntity
 
typedef std::map< int, vector< PeriodicEntity > > PeriodicMap
 
typedef boost::shared_ptr< PreconditionerPreconditionerSharedPtr
 
typedef LibUtilities::NekFactory< std::string, Preconditioner, const boost::shared_ptr< GlobalLinSys > &, const boost::shared_ptr< AssemblyMap > & > PreconFactory
 
typedef boost::shared_ptr< PreconditionerBlockPreconditionerBlockSharedPtr
 
typedef boost::shared_ptr< PreconditionerDiagonalPreconditionerDiagonalSharedPtr
 
typedef boost::shared_ptr< PreconditionerNullPreconditionerNullSharedPtr
 
typedef boost::shared_ptr< PreconditionerLinearPreconditionerLinearSharedPtr
 
typedef boost::shared_ptr< PreconditionerLinearWithBlockPreconditionerLinearWithBlockSharedPtr
 
typedef boost::shared_ptr< PreconditionerLinearWithDiagPreconditionerLinearWithDiagSharedPtr
 
typedef boost::shared_ptr< PreconditionerLinearWithLowEnergyPreconditionerLinearWithLowEnergySharedPtr
 
typedef boost::shared_ptr< PreconditionerLowEnergyPreconditionerLowEnergySharedPtr
 
typedef boost::shared_ptr< BottomUpSubStructuredGraphBottomUpSubStructuredGraphSharedPtr
 
typedef boost::shared_ptr< SubGraphSubGraphSharedPtr
 
typedef boost::shared_ptr< MultiLevelBisectedGraphMultiLevelBisectedGraphSharedPtr
 
typedef boost::shared_ptr< PatchMapPatchMapSharedPtr
 

Enumerations

enum  Direction {
  eX, eY, eZ, eS,
  eN
}
 
enum  ExpansionType {
  e0D, e1D, e2D, 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  CoeffState { eNotSet, eLocal, eHybrid, eGlobal }
 
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  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...
 
StdRegions::StdExpansionSharedPtr GetStdExp (StdRegions::StdExpansionSharedPtr exp)
 
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 ()
 
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 map< int, int > NullIntIntMap
 
static const vector< map< int, int > > NullVecIntIntMap
 
MultiRegions::Direction const DirCartesianMap []
 
static ExpList NullExpList
 An empty ExpList object. More...
 
static ExpListSharedPtr NullExpListSharedPtr
 
static const Array< OneD, ExpListSharedPtrNullExpListSharedPtrArray
 
static const Array< OneD, ExpList0DSharedPtrNullExpList0DSharedPtrArray
 Empty ExpList0D object. More...
 
static const Array< OneD, ExpList1DSharedPtrNullExpList1DSharedPtrArray
 Empty ExpList1D object. More...
 
static const Array< OneD, ExpList2DSharedPtrNullExpList2DSharedPtrArray
 Empty ExpList2D object. More...
 
const char *const LocalMatrixStorageStrategyMap []
 
const char *const GlobalSysSolnTypeMap []
 
const char *const PreconditionerTypeMap []
 
const char *const MatrixStorageTypeMap []
 
static PeriodicMap NullPeriodicMap
 
static PreconditionerSharedPtr NullPreconditionerSharedPtr
 

Typedef Documentation

Definition at line 52 of file AssemblyMapCG.h.

Definition at line 49 of file AssemblyMapDG.h.

Definition at line 53 of file AssemblyMap.h.

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

Definition at line 95 of file ExpList.h.

A shared pointer to a BlockMatrixMap.

Definition at line 97 of file ExpList.h.

Definition at line 159 of file MultiRegions.hpp.

Definition at line 160 of file MultiRegions.hpp.

Definition at line 60 of file SubStructuredGraph.h.

Definition at line 235 of file ContField1D.h.

Definition at line 291 of file ContField2D.h.

Definition at line 94 of file ContField3DHomogeneous1D.h.

Definition at line 95 of file ContField3DHomogeneous2D.h.

Definition at line 190 of file ContField3D.h.

Definition at line 273 of file DisContField1D.h.

Definition at line 261 of file DisContField2D.h.

Definition at line 291 of file DisContField3DHomogeneous1D.h.

Definition at line 151 of file DisContField3DHomogeneous2D.h.

Definition at line 249 of file DisContField3D.h.

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

Definition at line 56 of file AssemblyMapCG.h.

Shared pointer to an ExpList0D object.

Definition at line 54 of file ExpList0D.h.

Vector of pointers to ExpList0D objects.

Definition at line 59 of file ExpList0D.h.

Iterator for the vector of ExpList0D pointers.

Definition at line 61 of file ExpList0D.h.

Shared pointer to an ExpList1DHomogeneous2D object.

Definition at line 50 of file ExpList1DHomogeneous2D.h.

Vector of pointers to ExpList1DHomogeneous2D objects.

Definition at line 55 of file ExpList1DHomogeneous2D.h.

Iterator for the vector of ExpList1DHomogeneous2D pointers.

Definition at line 57 of file ExpList1DHomogeneous2D.h.

Shared pointer to an ExpList1D object.

Definition at line 50 of file ExpList1D.h.

Vector of pointers to ExpList1D objects.

Definition at line 55 of file ExpList1D.h.

Iterator for the vector of ExpList1D pointers.

Definition at line 57 of file ExpList1D.h.

Shared pointer to an ExpList2DHomogeneous1D object.

Definition at line 50 of file ExpList2DHomogeneous1D.h.

Vector of pointers to ExpList2DHomogeneous1D objects.

Definition at line 57 of file ExpList2DHomogeneous1D.h.

Iterator for the vector of ExpList2DHomogeneous1D pointers.

Definition at line 60 of file ExpList2DHomogeneous1D.h.

Shared pointer to an ExpList2D object.

Definition at line 49 of file ExpList2D.h.

Vector of pointers to ExpList2D objects.

Definition at line 54 of file ExpList2D.h.

Iterator for the vector of ExpList2D pointers.

Definition at line 56 of file ExpList2D.h.

Shared pointer to an ExpList3DHomogeneous1D object.

Definition at line 50 of file ExpList3DHomogeneous1D.h.

Vector of pointers to ExpList3DHomogeneous1D objects.

Definition at line 55 of file ExpList3DHomogeneous1D.h.

Iterator for the vector of ExpList3DHomogeneous1D pointers.

Definition at line 57 of file ExpList3DHomogeneous1D.h.

Shared pointer to an ExpList3DHomogeneous2D object.

Definition at line 50 of file ExpList3DHomogeneous2D.h.

Vector of pointers to ExpList3DHomogeneous2D objects.

Definition at line 55 of file ExpList3DHomogeneous2D.h.

Iterator for the vector of ExpList3DHomogeneous2D pointers.

Definition at line 57 of file ExpList3DHomogeneous2D.h.

Shared pointer to an ExpList3D object.

Definition at line 110 of file ExpList3D.h.

Vector of pointers to ExpList3D objects.

Definition at line 112 of file ExpList3D.h.

Iterator over an ExpList3DVector.

Definition at line 114 of file ExpList3D.h.

Shared pointer to an ExpList3DHomogeneous1D object.

Definition at line 66 of file ExpListHomogeneous1D.h.

Vector of pointers to ExpList3DHomogeneous1D objects.

Definition at line 71 of file ExpListHomogeneous1D.h.

Iterator for the vector of ExpList3DHomogeneous1D pointers.

Definition at line 73 of file ExpListHomogeneous1D.h.

Shared pointer to an ExpList3DHomogeneous2D object.

Definition at line 70 of file ExpListHomogeneous2D.h.

Vector of pointers to ExpList3DHomogeneous2D objects.

Definition at line 75 of file ExpListHomogeneous2D.h.

Iterator for the vector of ExpList3DHomogeneous2D pointers.

Definition at line 77 of file ExpListHomogeneous2D.h.

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

Shared pointer to an ExpList object.

Definition at line 1340 of file ExpList.h.

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

Definition at line 54 of file AssemblyMapCG.h.

Definition at line 48 of file GlobalLinSysDirectStaticCond.h.

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

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

Definition at line 65 of file GlobalLinSys.h.

Definition at line 50 of file GlobalLinSysIterativeStaticCond.h.

Mapping between GlobalLinSys objects and their associated keys.

Definition at line 56 of file GlobalLinSys.h.

Pointer to a GlobalLinSys/key map.

Definition at line 58 of file GlobalLinSys.h.

Definition at line 49 of file GlobalLinSysPETScStaticCond.h.

Pointer to a GlobalLinSys object.

Definition at line 51 of file GlobalLinSys.h.

Definition at line 49 of file GlobalLinSysStaticCond.h.

Definition at line 51 of file GlobalLinSysXxtStaticCond.h.

A pointer to a GlobalMatrixKey.

Definition at line 113 of file GlobalMatrixKey.h.

Mapping from global matrix keys to global matrices.

Definition at line 91 of file GlobalMatrix.h.

Shared pointer to a global matrix map.

Definition at line 93 of file GlobalMatrix.h.

Shared pointer to a GlobalMatrix object.

Definition at line 89 of file GlobalMatrix.h.

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

Definition at line 61 of file ExpListHomogeneous1D.h.

A shared pointer to a BlockMatrixMap.

Definition at line 63 of file ExpListHomogeneous1D.h.

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

Definition at line 65 of file ExpListHomogeneous2D.h.

A shared pointer to a BlockMatrixMap.

Definition at line 67 of file ExpListHomogeneous2D.h.

Definition at line 67 of file SubStructuredGraph.h.

Definition at line 69 of file SubStructuredGraph.h.

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

Definition at line 201 of file MultiRegions.hpp.

Definition at line 48 of file PreconditionerBlock.h.

Definition at line 47 of file PreconditionerDiagonal.h.

Definition at line 55 of file PreconditionerLinear.h.

Definition at line 46 of file PreconditionerLinearWithBlock.h.

Definition at line 48 of file PreconditionerLinearWithDiag.h.

Definition at line 46 of file PreconditionerLinearWithLowEnergy.h.

Definition at line 50 of file PreconditionerLowEnergy.h.

Definition at line 99 of file PreconditionerDiagonal.h.

Definition at line 56 of file Preconditioner.h.

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

Definition at line 63 of file Preconditioner.h.

Definition at line 181 of file MultiRegions.hpp.

Definition at line 65 of file SubStructuredGraph.h.

Enumeration Type Documentation

Enumerator
eAdjacentEdgeIsForwards 
eAdjacentEdgeIsBackwards 

Definition at line 57 of file MultiRegions.hpp.

Enumerator
eNotSet 

No state set.

eLocal 

Local coefficients.

eHybrid 

Hybrid coefficients.

eGlobal 

Global coefficients.

Definition at line 47 of file MultiRegions.hpp.

48  {
49  eNotSet, ///< No state set
50  eLocal, ///< Local coefficients
51  eHybrid, ///< Hybrid coefficients
52  eGlobal, ///< Global coefficients
53  };
Local coefficients.
Hybrid coefficients.
Global coefficients.
Enumerator
eX 
eY 
eZ 
eS 
eN 

Definition at line 66 of file ExpList.h.

Enumerator
e0D 
e1D 
e2D 
e3DH1D 
e3DH2D 
e3D 
eNoType 

Definition at line 75 of file ExpList.h.

Enumerator
eNoSolnType 

No Solution type specified.

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

Definition at line 77 of file MultiRegions.hpp.

Enumerator
eLinearPreconXxt 
eLinearPreconPETSc 

Definition at line 49 of file PreconditionerLinear.h.

Enumerator
eSmvBSR 

Definition at line 148 of file MultiRegions.hpp.

149  {
150  eSmvBSR
151  };
Enumerator
eNull 

No Solution type specified.

eDiagonal 
eLinearWithDiagonal 
eLinear 
eLowEnergy 
eLinearWithLowEnergy 
eBlock 
eLinearWithBlock 

Definition at line 121 of file MultiRegions.hpp.

Type of Galerkin projection.

Enumerator
eGalerkin 
eDiscontinuous 
eMixed_CG_Discontinuous 

Definition at line 114 of file MultiRegions.hpp.

Function Documentation

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 942 of file ExpList2D.cpp.

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::ExpList2D::v_GetNormals().

947  {
948  // Copy transpose.
949  if (orient == StdRegions::eDir1FwdDir2_Dir2FwdDir1 ||
953  {
954  for (int i = 0; i < nquad2; ++i)
955  {
956  for (int j = 0; j < nquad1; ++j)
957  {
958  out[i*nquad1 + j] = in[j*nquad2 + i];
959  }
960  }
961  }
962  else
963  {
964  for (int i = 0; i < nquad2; ++i)
965  {
966  for (int j = 0; j < nquad1; ++j)
967  {
968  out[i*nquad1 + j] = in[i*nquad1 + j];
969  }
970  }
971  }
972 
973  if (orient == StdRegions::eDir1BwdDir1_Dir2FwdDir2 ||
977  {
978  // Reverse x direction
979  for (int i = 0; i < nquad2; ++i)
980  {
981  for (int j = 0; j < nquad1/2; ++j)
982  {
983  swap(out[i*nquad1 + j],
984  out[i*nquad1 + nquad1-j-1]);
985  }
986  }
987  }
988 
989  if (orient == StdRegions::eDir1FwdDir1_Dir2BwdDir2 ||
993  {
994  // Reverse y direction
995  for (int j = 0; j < nquad1; ++j)
996  {
997  for (int i = 0; i < nquad2/2; ++i)
998  {
999  swap(out[i*nquad1 + j],
1000  out[(nquad2-i-1)*nquad1 + j]);
1001  }
1002  }
1003  }
1004  }
void Nektar::MultiRegions::CuthillMckeeReordering ( const BoostGraph &  graph,
Array< OneD, int > &  perm,
Array< OneD, int > &  iperm 
)

Definition at line 839 of file SubStructuredGraph.cpp.

References ASSERTL1.

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

842  {
843  int nGraphVerts = boost::num_vertices(graph);
844 
845  ASSERTL1(perm. num_elements() >= nGraphVerts &&
846  iperm.num_elements() >= nGraphVerts,
847  "Non-matching dimensions");
848 
849  // Call boost::cuthill_mckee_ordering to reorder the graph-vertices
850  // using the reverse Cuthill-Mckee algorithm
851  std::vector<BoostVertex> reorderedVerts(nGraphVerts);
852  boost::cuthill_mckee_ordering(graph, reorderedVerts.rbegin());
853 
854  //copy the reordering to the Arrays perm and iperm
855  for(int i = 0; i < nGraphVerts; i++)
856  {
857  perm[i] = reorderedVerts[i];
858  iperm[ reorderedVerts[i] ] = i;
859  }
860  }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
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 1766 of file AssemblyMapCG.cpp.

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

1770  {
1771  int minId = periodicEdges[0].id;
1772  int minIdK = 0;
1773  int k;
1774 
1775  for (k = 1; k < periodicEdges.size(); ++k)
1776  {
1777  if (periodicEdges[k].id < minId)
1778  {
1779  minId = min(minId, periodicEdges[k].id);
1780  minIdK = k;
1781  }
1782  }
1783 
1784  minId = min(minId, meshEdgeId);
1785 
1786  if (meshEdgeId != minId)
1787  {
1788  if (periodicEdges[minIdK].orient == StdRegions::eBackwards)
1789  {
1790  // Swap edge orientation
1791  edgeOrient = (edgeOrient == StdRegions::eForwards) ?
1793  }
1794  }
1795 
1796  return make_pair(minId, edgeOrient);
1797  }
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 1814 of file AssemblyMapCG.cpp.

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

1817  {
1818  StdRegions::Orientation returnval = faceOrient;
1819 
1820  if(perFaceOrient != StdRegions::eDir1FwdDir1_Dir2FwdDir2)
1821  {
1822  int tmp1 = (int)faceOrient - 5;
1823  int tmp2 = (int)perFaceOrient - 5;
1824 
1825  int flipDir1Map [8] = {2,3,0,1,6,7,4,5};
1826  int flipDir2Map [8] = {1,0,3,2,5,4,7,6};
1827  int transposeMap[8] = {4,5,6,7,0,2,1,3};
1828 
1829  // Transpose orientation
1830  if (tmp2 > 3)
1831  {
1832  tmp1 = transposeMap[tmp1];
1833  }
1834 
1835  // Reverse orientation in direction 1.
1836  if (tmp2 == 2 || tmp2 == 3 || tmp2 == 6 || tmp2 == 7)
1837  {
1838  tmp1 = flipDir1Map[tmp1];
1839  }
1840 
1841  // Reverse orientation in direction 2
1842  if (tmp2 % 2 == 1)
1843  {
1844  tmp1 = flipDir2Map[tmp1];
1845  }
1846 
1847  returnval = (StdRegions::Orientation)(tmp1+5);
1848  }
1849  return returnval;
1850  }
GlobalLinSysFactory & Nektar::MultiRegions::GetGlobalLinSysFactory ( )

Definition at line 201 of file GlobalLinSys.cpp.

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

202  {
203  typedef Loki::SingletonHolder<GlobalLinSysFactory,
204  Loki::CreateUsingNew,
205  Loki::NoDestroy,
206  Loki::SingleThreaded> Type;
207  return Type::Instance();
208  }
LibUtilities::NekFactory< std::string, GlobalLinSys, const GlobalLinSysKey &, const boost::weak_ptr< ExpList > &, const boost::shared_ptr< AssemblyMap > & > GlobalLinSysFactory
Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class...
Definition: GlobalLinSys.h:65
PreconFactory & Nektar::MultiRegions::GetPreconFactory ( )

Definition at line 88 of file Preconditioner.cpp.

Referenced by Nektar::MultiRegions::GlobalLinSysIterative::DoConjugateGradient(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::PreconditionerLinearWithBlock::v_InitObject(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_InitObject(), Nektar::MultiRegions::PreconditionerLinearWithDiag::v_InitObject(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_InitObject(), and Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_PreSolve().

89  {
90  typedef Loki::SingletonHolder<PreconFactory,
91  Loki::CreateUsingNew,
92  Loki::NoDestroy,
93  Loki::SingleThreaded> Type;
94  return Type::Instance();
95  }
LibUtilities::NekFactory< std::string, Preconditioner, const boost::shared_ptr< GlobalLinSys > &, const boost::shared_ptr< AssemblyMap > & > PreconFactory
StdRegions::StdExpansionSharedPtr Nektar::MultiRegions::GetStdExp ( StdRegions::StdExpansionSharedPtr  exp)

Definition at line 2653 of file ExpList.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::LibUtilities::eHexahedron, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::ePyramid, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, and Nektar::LibUtilities::eTriangle.

2654  {
2655 
2657 
2658  switch(exp->DetShapeType())
2659  {
2662  ::AllocateSharedPtr(exp->GetBasis(0)->GetBasisKey());
2663  break;
2665  {
2667  if((nexp = exp->as<StdRegions::StdNodalTriExp>()))
2668  {
2670  ::AllocateSharedPtr(exp->GetBasis(0)->GetBasisKey(),
2671  exp->GetBasis(1)->GetBasisKey(),
2672  nexp->GetNodalPointsKey().GetPointsType());
2673  }
2674  else
2675  {
2677  ::AllocateSharedPtr(exp->GetBasis(0)->GetBasisKey(),
2678  exp->GetBasis(1)->GetBasisKey());
2679  }
2680  }
2681  break;
2684  ::AllocateSharedPtr(exp->GetBasis(0)->GetBasisKey(),
2685  exp->GetBasis(1)->GetBasisKey());
2686  break;
2689  ::AllocateSharedPtr(exp->GetBasis(0)->GetBasisKey(),
2690  exp->GetBasis(1)->GetBasisKey(),
2691  exp->GetBasis(2)->GetBasisKey());
2692  break;
2695  ::AllocateSharedPtr(exp->GetBasis(0)->GetBasisKey(),
2696  exp->GetBasis(1)->GetBasisKey(),
2697  exp->GetBasis(2)->GetBasisKey());
2698  break;
2699  case LibUtilities::ePrism:
2701  ::AllocateSharedPtr(exp->GetBasis(0)->GetBasisKey(),
2702  exp->GetBasis(1)->GetBasisKey(),
2703  exp->GetBasis(2)->GetBasisKey());
2704  break;
2707  ::AllocateSharedPtr(exp->GetBasis(0)->GetBasisKey(),
2708  exp->GetBasis(1)->GetBasisKey(),
2709  exp->GetBasis(2)->GetBasisKey());
2710  break;
2711  default:
2712  ASSERTL0(false,"Shape type not setup");
2713  break;
2714  }
2715 
2716  return stdExp;
2717  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
boost::shared_ptr< StdNodalTriExp > StdNodalTriExpSharedPtr
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
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 862 of file SubStructuredGraph.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Metis::as_onmetis(), ASSERTL0, ASSERTL1, ErrorUtil::efatal, Nektar::iterator, NEKERROR, and Vmath::Vcopy().

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

869  {
870  int nGraphVerts = boost::num_vertices(graph);
871  int nGraphEdges = boost::num_edges (graph);
872 
873  ASSERTL1(perm. num_elements() >= nGraphVerts &&
874  iperm.num_elements() >= nGraphVerts,
875  "Non-matching dimensions");
876 
877  // We will now use METIS to reorder the graph. For the purpose of
878  // multi-level static condensation, we will use a METIS routine that
879  // partitions the graph recursively using a multi-level bisection
880  // algorithm. The name of this routine is METIS_NodeND and it was
881  // originally designed to reorder the DOFs in a matrix in order to
882  // minimise the fill-in when applying a factorisation technique
883  // (such as Cholesky). However, this reordering of DOFs also seems
884  // to be perfectly suited in the context of multilevel
885  // substructering. Therefore, we will use this metis routine instead
886  // of the more well-known graph-partitioning routines. However, as
887  // the standard metis implementation of METIS_NodeND only gives the
888  // resulting re-ordering as an output, we we will use an modified
889  // version of this routine that also returns information about the
890  // structure of the multi-level bisected partitioning.
891 
892  // This modified implementation has been written by W. GAO and
893  // collaborators and it additionally returns the separator tree
894  // compared to the standard implementation.
895 
896  // The name of this modified routine AS_METIS_NodeND (where AS
897  // stands for automated substructering) More information can be
898  // found in the paper:
899  //
900  // W. Gao, S. Li Xiaoye, C. Yang and Z. Bai
901  // 'An implementation and evaluation of the AMLS method
902  // for sparse eigenvalue problems'
903  // - ACM Trans. Math. Softw. 34, 4, Article 20 (July 2008)
904 
905  if(nGraphEdges)
906  {
907  // Step 1: Convert boost graph to a graph in adjncy-list format
908  // as required by METIS
909  int acnt = 0;
910  int vcnt = 0;
911  int i, cnt;
912  int nPartition = partVerts.size();
913  int nNonPartition = nGraphVerts - partVerts.size();
914  BoostVertexIterator vertit, vertit_end;
915  BoostAdjacencyIterator adjvertit, adjvertit_end;
916  Array<OneD, int> xadj(nNonPartition+1,0);
917  Array<OneD, int> adjncy(2*nGraphEdges);
918  Array<OneD, int> initial_perm(nGraphVerts);
919  Array<OneD, int> iinitial_perm(nGraphVerts);
920  Array<OneD, int> perm_tmp (nNonPartition);
921  Array<OneD, int> iperm_tmp(nNonPartition);
922 
924 
925  // First reorder vertices so that partition nodes are at the
926  // end. This allows METIS to partition the interior nodes.
927  for (i = cnt = 0; i < nGraphVerts; ++i)
928  {
929  if (partVerts.count(i) == 0)
930  {
931  initial_perm [i] = cnt;
932  iinitial_perm[cnt++] = i;
933  }
934  }
935 
936  for (i = 0; i < nGraphVerts; ++i)
937  {
938  if (partVerts.count(i) > 0)
939  {
940  initial_perm [i] = cnt;
941  iinitial_perm[cnt++] = i;
942  }
943  }
944 
945  // Apply this reordering to the graph.
946  boost::property_map<BoostGraph, boost::vertex_index_t>::type
947  index = get(boost::vertex_index, graph);
948 
949  for (boost::tie(vertit, vertit_end) = boost::vertices(graph);
950  vertit != vertit_end; ++vertit)
951  {
952  if (partVerts.count(index[*vertit]) > 0)
953  {
954  continue;
955  }
956 
957  for (boost::tie(adjvertit, adjvertit_end) =
958  boost::adjacent_vertices(*vertit,graph);
959  adjvertit != adjvertit_end;
960  ++adjvertit)
961  {
962  if (partVerts.count(index[*adjvertit]) > 0)
963  {
964  continue;
965  }
966  adjncy[acnt++] = initial_perm[*adjvertit];
967  }
968  xadj[++vcnt] = acnt;
969  }
970 
971  // Step 2: use metis to reorder the dofs. We do not know on
972  // forehand the size of the separator tree that METIS will
973  // return, so we just assume a really big value and try with
974  // that
975  int sizeSeparatorTree = nGraphVerts*10;
976  Array<OneD,int> septreeTmp(sizeSeparatorTree,-1);
977 
978  // The separator tree returned by metis has the following
979  // structure: It is a one dimensional array and information per
980  // level is contained per 5 elements:
981  //
982  // m_septree[i*5 + 0]: the level of recursion (top-level = 1)
983  // m_septree[i*5 + 1]: is this substructure a left or right
984  // branch? 1 = left branch, 2 = right branch
985  // m_septree[i*5 + 2]: the number of 'interior' DOFs in left
986  // branch
987  // m_septree[i*5 + 3]: the number of 'interior' DOFs in right
988  // branch
989  // m_septree[i*5 + 4]: the number of 'boundary' DOFs
990 
991  // Now try to call Call METIS.
992  try
993  {
995  nNonPartition,xadj,adjncy,perm_tmp,iperm_tmp,
996  septreeTmp, mdswitch);
997  }
998  catch(...)
999  {
1001  "Error in calling metis (the size of the separator"
1002  " tree might not be sufficient)");
1003  }
1004 
1005  // Change permutations from METIS to account for initial offset.
1006  for (i = 0; i < nGraphVerts; ++i)
1007  {
1008  if (partVerts.count(i) == 0)
1009  {
1010  iperm[i] = iperm_tmp[initial_perm[i]];
1011  perm[iperm[i]] = i;
1012  }
1013  }
1014 
1015  for (i = nNonPartition, it = partVerts.begin();
1016  it != partVerts.end(); ++it, ++i)
1017  {
1018  perm [i] = *it;
1019  iperm[*it] = i;
1020  }
1021 
1022  for (i = 0; i < nGraphVerts; ++i)
1023  {
1024  ASSERTL0(perm[iperm[i]] == i,
1025  "Perm error " + boost::lexical_cast<std::string>(i));
1026  }
1027 
1028  // Post-process the separator tree
1029  int trueSizeSepTree = 0;
1030  for (i = 0; septreeTmp[i] != -1; i++)
1031  {
1032  trueSizeSepTree++;
1033  }
1034  Array<OneD,int> septree(trueSizeSepTree);
1035  Vmath::Vcopy(trueSizeSepTree,septreeTmp,1,septree,1);
1036 
1037  // Based upon the separator tree, where are going to set up an
1038  // object of the class BottomUpSubStructuredGraph. The
1039  // constructor will read the separatortree and will interprete
1040  // the information from a bottom-up point of view.
1041  substructgraph = MemoryManager<BottomUpSubStructuredGraph>::
1042  AllocateSharedPtr(septree, nPartition);
1043 
1044  // Important, we cannot simply use the ordering given by metis
1045  // as it does not order the different blocks as we would like
1046  // it. Therefore, we use following command to re-order them
1047  // again in the context of the bottom-up substructering. As a
1048  // result, we will now obtain an ordering where the interior
1049  // degrees of freedom of the first (=bottom) level will be
1050  // ordered last (block by block ofcoarse). The interior degrees
1051  // of freedom of the second level will be ordered second to
1052  // last, etc ... As a result, the boundary degrees of freedom of
1053  // the last level (i.e. the dofs that will have to solved
1054  // non-recursively) will be ordered first (after the Dirichlet
1055  // Dofs that is). (this way, we actually follow the same idea
1056  // and convention in the standard (non-multi-level) static
1057  // condensation approach)
1058  substructgraph->UpdateBottomUpReordering(perm,iperm);
1059  }
1060  else
1061  {
1062  // This is the very special case of a graph without any
1063  // connectivity i.e. a collection of vertices without any edges
1064  for(int i = 0; i < nGraphVerts; i++)
1065  {
1066  perm[i] = i;
1067  iperm[i] = i;
1068  }
1069  substructgraph = MemoryManager<BottomUpSubStructuredGraph>::
1070  AllocateSharedPtr(nGraphVerts);
1071  }
1072  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:158
static void as_onmetis(int nVerts, Nektar::Array< Nektar::OneD, int > xadj, Nektar::Array< Nektar::OneD, int > adjncy, Nektar::Array< Nektar::OneD, int > perm, Nektar::Array< Nektar::OneD, int > iperm, Nektar::Array< Nektar::OneD, int > map, int mdswitch=1)
Definition: Metis.hpp:53
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1038
void Nektar::MultiRegions::NoReordering ( const BoostGraph &  graph,
Array< OneD, int > &  perm,
Array< OneD, int > &  iperm 
)

Definition at line 1074 of file SubStructuredGraph.cpp.

References ASSERTL1.

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

1077  {
1078  int nGraphVerts = boost::num_vertices(graph);
1079 
1080  ASSERTL1(perm. num_elements() >= nGraphVerts &&
1081  iperm.num_elements() >= nGraphVerts,
1082  "Non-matching dimensions");
1083 
1084  for (int i = 0; i < nGraphVerts; i++)
1085  {
1086  perm [i] = i;
1087  iperm[i] = i;
1088  }
1089  }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
bool Nektar::MultiRegions::operator< ( const GlobalMatrixKey lhs,
const GlobalMatrixKey rhs 
)

Definition at line 78 of file GlobalMatrixKey.cpp.

References Nektar::MultiRegions::GlobalMatrixKey::m_constFactors, Nektar::MultiRegions::GlobalMatrixKey::m_locToGloMap, Nektar::MultiRegions::GlobalMatrixKey::m_matrixType, Nektar::MultiRegions::GlobalMatrixKey::m_shapeType, and Nektar::MultiRegions::GlobalMatrixKey::m_varCoeffs.

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

References Nektar::MultiRegions::GlobalLinSysKey::m_solnType.

95  {
96  if(lhs.m_solnType < rhs.m_solnType)
97  {
98  return true;
99  }
100 
101  if(lhs.m_solnType > rhs.m_solnType)
102  {
103  return false;
104  }
105 
106  return (*dynamic_cast<const GlobalMatrixKey*>(&lhs)
107  < *dynamic_cast<const GlobalMatrixKey*>(&rhs));
108  }
StandardMatrixTag & lhs
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 117 of file GlobalLinSysKey.cpp.

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::GlobalMatrixKey::GetShapeType(), GlobalSysSolnTypeMap, Nektar::StdRegions::MatrixTypeMap, and Nektar::LibUtilities::ShapeTypeMap.

118  {
119  os << "MatrixType: " << StdRegions::MatrixTypeMap[rhs.GetMatrixType()] << ", ShapeType: "
120  << LibUtilities::ShapeTypeMap[rhs.GetShapeType()]
121  << std::endl;
122  os << "Solution Type: "
123  << GlobalSysSolnTypeMap[rhs.GetGlobalSysSolnType()] << endl;
124  os << "Number of constants: " << rhs.GetNConstFactors() << endl;
125  StdRegions::ConstFactorMap::const_iterator x;
126  for (x = rhs.GetConstFactors().begin(); x != rhs.GetConstFactors().end(); ++x)
127  {
128  os << " Constant " << StdRegions::ConstFactorTypeMap[x->first]
129  << ": " << x->second << endl;
130  }
131  os << "Number of variable coefficients: "
132  << rhs.GetNVarCoeffs() << endl;
133 
134  return os;
135  }
const char *const ConstFactorTypeMap[]
Definition: StdRegions.hpp:239
const char *const ShapeTypeMap[]
Definition: ShapeType.hpp:66
const char *const GlobalSysSolnTypeMap[]
const char *const MatrixTypeMap[]
Definition: StdRegions.hpp:151
std::ostream & Nektar::MultiRegions::operator<< ( std::ostream &  os,
const GlobalMatrixKey rhs 
)

Writes statistics about the matrix key to an output stream.

Definition at line 168 of file GlobalMatrixKey.cpp.

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

169  {
170  os << "MatrixType: " << rhs.GetMatrixType() << endl;
171  os << "Number of constants: " << rhs.GetNConstFactors() << endl;
172  StdRegions::ConstFactorMap::const_iterator x;
173  for(x = rhs.GetConstFactors().begin(); x != rhs.GetConstFactors().end(); ++x)
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  }
const char *const ConstFactorTypeMap[]
Definition: StdRegions.hpp:239
int Nektar::MultiRegions::RoundNekDoubleToInt ( NekDouble  x)

Rounds a double precision number to an integer.

Definition at line 55 of file AssemblyMap.cpp.

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

56  {
57  return int(x > 0.0 ? x + 0.5 : x - 0.5);
58  }
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 61 of file AssemblyMap.cpp.

References ASSERTL1.

62  {
63  int size = inarray.num_elements();
64  ASSERTL1(outarray.num_elements()>=size,"Array sizes not compatible");
65 
66  NekDouble x;
67  for(int i = 0; i < size; i++)
68  {
69  x = inarray[i];
70  outarray[i] = int(x > 0.0 ? x + 0.5 : x - 0.5);
71  }
72  }
double NekDouble
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
bool Nektar::MultiRegions::SubGraphWithoutVerts ( const SubGraphSharedPtr  g)

Definition at line 817 of file SubStructuredGraph.cpp.

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

818  {
819  return g->GetNverts() == 0;
820  }

Variable Documentation

MultiRegions::Direction const Nektar::MultiRegions::DirCartesianMap[]
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 96 of file MultiRegions.hpp.

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

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

Definition at line 63 of file GlobalLinSysIterativeStaticCond.h.

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

Definition at line 153 of file MultiRegions.hpp.

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

AssemblyMapSharedPtr Nektar::MultiRegions::NullAssemblyMapSharedPtr
static
ExpList Nektar::MultiRegions::NullExpList
static

An empty ExpList object.

Definition at line 1342 of file ExpList.h.

const Array<OneD, ExpList0DSharedPtr> Nektar::MultiRegions::NullExpList0DSharedPtrArray
static

Empty ExpList0D object.

Definition at line 107 of file ExpList0D.h.

const Array<OneD, ExpList1DSharedPtr> Nektar::MultiRegions::NullExpList1DSharedPtrArray
static

Empty ExpList1D object.

Definition at line 192 of file ExpList1D.h.

const Array<OneD, ExpList2DSharedPtr> Nektar::MultiRegions::NullExpList2DSharedPtrArray
static

Empty ExpList2D object.

Definition at line 156 of file ExpList2D.h.

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

Definition at line 2086 of file ExpList.h.

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

Definition at line 49 of file AssemblyMapCG.h.

PeriodicMap Nektar::MultiRegions::NullPeriodicMap
static

Definition at line 202 of file MultiRegions.hpp.

PreconditionerSharedPtr Nektar::MultiRegions::NullPreconditionerSharedPtr
static

Definition at line 59 of file Preconditioner.h.

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

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

Definition at line 50 of file AssemblyMapCG.h.

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

Definition at line 133 of file MultiRegions.hpp.

Referenced by Nektar::MultiRegions::GlobalLinSysIterative::DoConjugateGradient(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_InitObject(), and Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_PreSolve().