Nektar++
|
Constructs mappings for the C0 scalar continuous Galerkin formulation. More...
#include <AssemblyMapCG.h>
Public Member Functions | |
AssemblyMapCG (const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &comm, const std::string variable="DefaultVar") | |
Default constructor. More... | |
AssemblyMapCG (const LibUtilities::SessionReaderSharedPtr &pSession, const int numLocalCoeffs, const ExpList &locExp, const BndCondExp &bndCondExp=NullExpListSharedPtrArray, const BndCond &bndConditions=SpatialDomains::NullBoundaryConditionShPtrArray, const bool checkIfSingular=false, const std::string variable="defaultVar", const PeriodicMap &periodicVerts=NullPeriodicMap, const PeriodicMap &periodicEdges=NullPeriodicMap, const PeriodicMap &periodicFaces=NullPeriodicMap) | |
General constructor for expansions of all dimensions without boundary conditions. More... | |
~AssemblyMapCG () override | |
Destructor. More... | |
std::set< ExtraDirDof > & | GetCopyLocalDirDofs () |
std::set< int > & | GetParallelDirBndSign () |
Public Member Functions inherited from Nektar::MultiRegions::AssemblyMap | |
AssemblyMap () | |
Default constructor. More... | |
AssemblyMap (const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &comm, const std::string variable="DefaultVar") | |
Constructor with a communicator. More... | |
AssemblyMap (AssemblyMap *oldLevelMap, const BottomUpSubStructuredGraphSharedPtr &multiLevelGraph) | |
Constructor for next level in multi-level static condensation. More... | |
virtual | ~AssemblyMap () |
Destructor. More... | |
LibUtilities::CommSharedPtr | GetComm () |
Retrieves the communicator. More... | |
std::string | GetVariable () |
Retrieves the variable string. More... | |
size_t | GetHash () const |
Retrieves the hash of this map. More... | |
int | GetLocalToGlobalMap (const int i) const |
int | GetGlobalToUniversalMap (const int i) const |
int | GetGlobalToUniversalMapUnique (const int i) const |
const Array< OneD, const int > & | GetLocalToGlobalMap () |
const Array< OneD, const int > & | GetGlobalToUniversalMap () |
const Array< OneD, const int > & | GetGlobalToUniversalMapUnique () |
NekDouble | GetLocalToGlobalSign (const int i) const |
const Array< OneD, NekDouble > & | GetLocalToGlobalSign () const |
void | LocalToGlobal (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global, bool useComm=true) const |
void | LocalToGlobal (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global, bool useComm=true) const |
void | GlobalToLocal (const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const |
void | GlobalToLocal (const NekVector< NekDouble > &global, NekVector< NekDouble > &loc) const |
void | Assemble (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const |
void | Assemble (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global) const |
void | UniversalAssemble (Array< OneD, NekDouble > &pGlobal) const |
void | UniversalAssemble (NekVector< NekDouble > &pGlobal) const |
void | UniversalAssemble (Array< OneD, NekDouble > &pGlobal, int offset) const |
void | UniversalAbsMaxBnd (Array< OneD, NekDouble > &bndvals) |
int | GetLocalToGlobalBndMap (const int i) const |
Retrieve the global index of a given local boundary mode. More... | |
const Array< OneD, const int > & | GetLocalToGlobalBndMap () |
Retrieve the global indices of the local boundary modes. More... | |
const Array< OneD, const int > & | GetGlobalToUniversalBndMap () |
const Array< OneD, const int > & | GetGlobalToUniversalBndMapUnique () |
bool | GetSignChange () |
Returns true if using a modal expansion requiring a change of sign of some modes. More... | |
NekDouble | GetLocalToGlobalBndSign (const int i) const |
Retrieve the sign change of a given local boundary mode. More... | |
Array< OneD, const NekDouble > | GetLocalToGlobalBndSign () const |
Retrieve the sign change for all local boundary modes. More... | |
const Array< OneD, const int > & | GetBndCondCoeffsToLocalCoeffsMap () |
Retrieves the local indices corresponding to the boundary expansion modes. More... | |
const Array< OneD, NekDouble > & | GetBndCondCoeffsToLocalCoeffsSign () |
Returns the modal sign associated with a given boundary expansion mode. More... | |
const Array< OneD, const int > & | GetBndCondCoeffsToLocalTraceMap () |
Retrieves the local indices corresponding to the boundary expansion modes to global trace. More... | |
int | GetBndCondIDToGlobalTraceID (const int i) |
Returns the global index of the boundary trace giving the index on the boundary expansion. More... | |
const Array< OneD, const int > & | GetBndCondIDToGlobalTraceID () |
int | GetNumGlobalDirBndCoeffs () const |
Returns the number of global Dirichlet boundary coefficients. More... | |
int | GetNumLocalDirBndCoeffs () const |
Returns the number of local Dirichlet boundary coefficients. More... | |
int | GetNumGlobalBndCoeffs () const |
Returns the total number of global boundary coefficients. More... | |
int | GetNumLocalBndCoeffs () const |
Returns the total number of local boundary coefficients. More... | |
int | GetNumLocalCoeffs () const |
Returns the total number of local coefficients. More... | |
int | GetNumGlobalCoeffs () const |
Returns the total number of global coefficients. More... | |
bool | GetSingularSystem () const |
Retrieves if the system is singular (true) or not (false) More... | |
void | GlobalToLocalBnd (const NekVector< NekDouble > &global, NekVector< NekDouble > &loc, int offset) const |
void | GlobalToLocalBnd (const NekVector< NekDouble > &global, NekVector< NekDouble > &loc) const |
void | GlobalToLocalBnd (const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc, int offset) const |
void | GlobalToLocalBnd (const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const |
void | LocalBndToGlobal (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global, int offset, bool UseComm=true) const |
void | LocalBndToGlobal (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global, bool UseComm=true) const |
void | LocalToLocalBnd (const Array< OneD, const NekDouble > &local, Array< OneD, NekDouble > &locbnd) const |
void | LocalToLocalInt (const Array< OneD, const NekDouble > &local, Array< OneD, NekDouble > &locint) const |
void | LocalBndToLocal (const Array< OneD, const NekDouble > &locbnd, Array< OneD, NekDouble > &local) const |
void | LocalIntToLocal (const Array< OneD, const NekDouble > &locbnd, Array< OneD, NekDouble > &local) const |
void | AssembleBnd (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global, int offset) const |
void | AssembleBnd (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global) const |
void | AssembleBnd (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global, int offset) const |
void | AssembleBnd (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const |
void | UniversalAssembleBnd (Array< OneD, NekDouble > &pGlobal) const |
void | UniversalAssembleBnd (NekVector< NekDouble > &pGlobal) const |
void | UniversalAssembleBnd (Array< OneD, NekDouble > &pGlobal, int offset) const |
int | GetFullSystemBandWidth () const |
int | GetNumNonDirVertexModes () const |
int | GetNumNonDirEdgeModes () const |
int | GetNumNonDirFaceModes () const |
int | GetNumDirEdges () const |
int | GetNumDirFaces () const |
int | GetNumNonDirEdges () const |
int | GetNumNonDirFaces () const |
void | PrintStats (std::ostream &out, std::string variable, bool printHeader=true) const |
const Array< OneD, const int > & | GetExtraDirEdges () |
std::shared_ptr< AssemblyMap > | LinearSpaceMap (const ExpList &locexp, GlobalSysSolnType solnType) |
int | GetBndSystemBandWidth () const |
Returns the bandwidth of the boundary system. More... | |
int | GetStaticCondLevel () const |
Returns the level of static condensation for this map. More... | |
int | GetNumPatches () const |
Returns the number of patches in this static condensation level. More... | |
const Array< OneD, const unsigned int > & | GetNumLocalBndCoeffsPerPatch () |
Returns the number of local boundary coefficients in each patch. More... | |
const Array< OneD, const unsigned int > & | GetNumLocalIntCoeffsPerPatch () |
Returns the number of local interior coefficients in each patch. More... | |
const AssemblyMapSharedPtr | GetNextLevelLocalToGlobalMap () const |
Returns the local to global mapping for the next level in the multi-level static condensation. More... | |
void | SetNextLevelLocalToGlobalMap (AssemblyMapSharedPtr pNextLevelLocalToGlobalMap) |
const PatchMapSharedPtr & | GetPatchMapFromPrevLevel (void) const |
Returns the patch map from the previous level of the multi-level static condensation. More... | |
bool | AtLastLevel () const |
Returns true if this is the last level in the multi-level static condensation. More... | |
GlobalSysSolnType | GetGlobalSysSolnType () const |
Returns the method of solving global systems. More... | |
std::string | GetPreconType () const |
bool | IsAbsoluteTolerance () const |
int | GetSuccessiveRHS () const |
std::string | GetLinSysIterSolver () const |
int | GetLowestStaticCondLevel () const |
void | PatchLocalToGlobal (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const |
void | PatchGlobalToLocal (const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const |
void | PatchAssemble (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const |
Protected Member Functions | |
int | CreateGraph (const ExpList &locExp, const BndCondExp &bndCondExp, const Array< OneD, const BndCond > &bndConditions, const bool checkIfSystemSingular, const PeriodicMap &periodicVerts, const PeriodicMap &periodicEdges, const PeriodicMap &periodicFaces, DofGraph &graph, BottomUpSubStructuredGraphSharedPtr &bottomUpGraph, std::set< int > &extraDirVerts, std::set< int > &extraDirEdges, int &firstNonDirGraphVertId, int &nExtraDirichlet, int mdswitch=1) |
void | SetUpUniversalC0ContMap (const ExpList &locExp, const PeriodicMap &perVerts=NullPeriodicMap, const PeriodicMap &perEdges=NullPeriodicMap, const PeriodicMap &perFaces=NullPeriodicMap) |
void | CalculateFullSystemBandWidth () |
Calculate the bandwith of the full matrix system. More... | |
int | v_GetLocalToGlobalMap (const int i) const override |
int | v_GetGlobalToUniversalMap (const int i) const override |
int | v_GetGlobalToUniversalMapUnique (const int i) const override |
const Array< OneD, const int > & | v_GetLocalToGlobalMap () override |
const Array< OneD, const int > & | v_GetGlobalToUniversalMap () override |
const Array< OneD, const int > & | v_GetGlobalToUniversalMapUnique () override |
NekDouble | v_GetLocalToGlobalSign (const int i) const override |
const Array< OneD, NekDouble > & | v_GetLocalToGlobalSign () const override |
void | v_LocalToGlobal (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global, bool useComm) const override |
void | v_LocalToGlobal (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global, bool useComm) const override |
void | v_GlobalToLocal (const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const override |
void | v_GlobalToLocal (const NekVector< NekDouble > &global, NekVector< NekDouble > &loc) const override |
void | v_Assemble (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const override |
void | v_Assemble (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global) const override |
void | v_UniversalAssemble (Array< OneD, NekDouble > &pGlobal) const override |
void | v_UniversalAssemble (NekVector< NekDouble > &pGlobal) const override |
void | v_UniversalAssemble (Array< OneD, NekDouble > &pGlobal, int offset) const override |
int | v_GetFullSystemBandWidth () const override |
int | v_GetNumNonDirVertexModes () const override |
int | v_GetNumNonDirEdgeModes () const override |
int | v_GetNumNonDirFaceModes () const override |
int | v_GetNumDirEdges () const override |
int | v_GetNumDirFaces () const override |
int | v_GetNumNonDirEdges () const override |
int | v_GetNumNonDirFaces () const override |
const Array< OneD, const int > & | v_GetExtraDirEdges () override |
AssemblyMapSharedPtr | v_LinearSpaceMap (const ExpList &locexp, GlobalSysSolnType solnType) override |
Construct an AssemblyMapCG object which corresponds to the linear space of the current object. More... | |
Protected Member Functions inherited from Nektar::MultiRegions::AssemblyMap | |
void | CalculateBndSystemBandWidth () |
Calculates the bandwidth of the boundary system. More... | |
void | GlobalToLocalBndWithoutSign (const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) |
virtual int | v_GetLocalToGlobalMap (const int i) const |
virtual int | v_GetGlobalToUniversalMap (const int i) const |
virtual int | v_GetGlobalToUniversalMapUnique (const int i) const |
virtual const Array< OneD, const int > & | v_GetLocalToGlobalMap () |
virtual const Array< OneD, const int > & | v_GetGlobalToUniversalMap () |
virtual const Array< OneD, const int > & | v_GetGlobalToUniversalMapUnique () |
virtual NekDouble | v_GetLocalToGlobalSign (const int i) const |
virtual const Array< OneD, NekDouble > & | v_GetLocalToGlobalSign () const |
virtual void | v_LocalToGlobal (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global, bool useComm) const |
virtual void | v_LocalToGlobal (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global, bool useComm) const |
virtual void | v_GlobalToLocal (const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const |
virtual void | v_GlobalToLocal (const NekVector< NekDouble > &global, NekVector< NekDouble > &loc) const |
virtual void | v_Assemble (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const |
virtual void | v_Assemble (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global) const |
virtual void | v_UniversalAssemble (Array< OneD, NekDouble > &pGlobal) const |
virtual void | v_UniversalAssemble (NekVector< NekDouble > &pGlobal) const |
virtual void | v_UniversalAssemble (Array< OneD, NekDouble > &pGlobal, int offset) const |
virtual int | v_GetFullSystemBandWidth () const |
virtual int | v_GetNumNonDirVertexModes () const |
virtual int | v_GetNumNonDirEdgeModes () const |
virtual int | v_GetNumNonDirFaceModes () const |
virtual int | v_GetNumDirEdges () const |
virtual int | v_GetNumDirFaces () const |
virtual int | v_GetNumNonDirEdges () const |
virtual int | v_GetNumNonDirFaces () const |
virtual const Array< OneD, const int > & | v_GetExtraDirEdges () |
virtual std::shared_ptr< AssemblyMap > | v_LinearSpaceMap (const ExpList &locexp, GlobalSysSolnType solnType) |
Generate a linear space mapping from existing mapping. More... | |
Protected Attributes | |
Array< OneD, int > | m_localToGlobalMap |
Integer map of local coeffs to global space. More... | |
Array< OneD, NekDouble > | m_localToGlobalSign |
Integer sign of local coeffs to global space. More... | |
int | m_fullSystemBandWidth |
Bandwith of the full matrix system (no static condensation). More... | |
Array< OneD, int > | m_globalToUniversalMap |
Integer map of process coeffs to universal space. More... | |
Array< OneD, int > | m_globalToUniversalMapUnique |
Integer map of unique process coeffs to universal space (signed) More... | |
int | m_numNonDirVertexModes |
Number of non Dirichlet vertex modes. More... | |
int | m_numNonDirEdgeModes |
Number of non Dirichlet edge modes. More... | |
int | m_numNonDirFaceModes |
Number of non Dirichlet face modes. More... | |
int | m_numDirEdges |
Number of Dirichlet edges. More... | |
int | m_numDirFaces |
Number of Dirichlet faces. More... | |
int | m_numNonDirEdges |
Number of Dirichlet edges. More... | |
int | m_numNonDirFaces |
Number of Dirichlet faces. More... | |
int | m_numLocalBndCondCoeffs |
Number of local boundary condition coefficients. More... | |
Array< OneD, int > | m_extraDirEdges |
Extra dirichlet edges in parallel. More... | |
int | m_numLocDirBndCondDofs |
Number of local boundary condition degrees of freedom. More... | |
int | m_maxStaticCondLevel |
Maximum static condensation level. More... | |
std::set< ExtraDirDof > | m_copyLocalDirDofs |
Set indicating degrees of freedom which are Dirichlet but whose value is stored on another processor. More... | |
std::set< int > | m_parallelDirBndSign |
Set indicating the local coeffs just touching parallel dirichlet boundary that have a sign change. More... | |
Protected Attributes inherited from Nektar::MultiRegions::AssemblyMap | |
LibUtilities::SessionReaderSharedPtr | m_session |
Session object. More... | |
LibUtilities::CommSharedPtr | m_comm |
Communicator. More... | |
std::string | m_variable |
Variable string identifier. More... | |
size_t | m_hash |
Hash for map. More... | |
int | m_numLocalBndCoeffs |
Number of local boundary coefficients. More... | |
int | m_numGlobalBndCoeffs |
Total number of global boundary coefficients. More... | |
int | m_numLocalDirBndCoeffs |
Number of Local Dirichlet Boundary Coefficients. More... | |
int | m_numGlobalDirBndCoeffs |
Number of Global Dirichlet Boundary Coefficients. More... | |
bool | m_systemSingular |
Flag indicating if the system is singular or not. More... | |
int | m_numLocalCoeffs |
Total number of local coefficients. More... | |
int | m_numGlobalCoeffs |
Total number of global coefficients. More... | |
bool | m_signChange |
Flag indicating if modes require sign reversal. More... | |
Array< OneD, int > | m_localToGlobalBndMap |
Integer map of local coeffs to global Boundary Dofs. More... | |
Array< OneD, NekDouble > | m_localToGlobalBndSign |
Integer sign of local boundary coeffs to global space. More... | |
Array< OneD, int > | m_localToLocalBndMap |
Integer map of local boundary coeffs to local boundary system numbering. More... | |
Array< OneD, int > | m_localToLocalIntMap |
Integer map of local boundary coeffs to local interior system numbering. More... | |
Array< OneD, int > | m_bndCondCoeffsToLocalCoeffsMap |
Integer map of bnd cond coeffs to local coefficients. More... | |
Array< OneD, NekDouble > | m_bndCondCoeffsToLocalCoeffsSign |
Integer map of sign of bnd cond coeffs to local coefficients. More... | |
Array< OneD, int > | m_bndCondCoeffsToLocalTraceMap |
Integer map of bnd cond coeff to local trace coeff. More... | |
Array< OneD, int > | m_bndCondIDToGlobalTraceID |
Integer map of bnd cond trace number to global trace number. More... | |
Array< OneD, int > | m_globalToUniversalBndMap |
Integer map of process coeffs to universal space. More... | |
Array< OneD, int > | m_globalToUniversalBndMapUnique |
Integer map of unique process coeffs to universal space (signed) More... | |
GlobalSysSolnType | m_solnType |
The solution type of the global system. More... | |
int | m_bndSystemBandWidth |
The bandwith of the global bnd system. More... | |
std::string | m_preconType |
Type type of preconditioner to use in iterative solver. More... | |
NekDouble | m_iterativeTolerance |
Tolerance for iterative solver. More... | |
bool | m_isAbsoluteTolerance |
int | m_successiveRHS |
sucessive RHS for iterative solver More... | |
std::string | m_linSysIterSolver |
Iterative solver: Conjugate Gradient, GMRES. More... | |
Gs::gs_data * | m_gsh |
Gs::gs_data * | m_bndGsh |
Gs::gs_data * | m_dirBndGsh |
gs gather communication to impose Dirhichlet BCs. More... | |
int | m_staticCondLevel |
The level of recursion in the case of multi-level static condensation. More... | |
int | m_numPatches |
The number of patches (~elements) in the current level. More... | |
Array< OneD, unsigned int > | m_numLocalBndCoeffsPerPatch |
The number of bnd dofs per patch. More... | |
Array< OneD, unsigned int > | m_numLocalIntCoeffsPerPatch |
The number of int dofs per patch. More... | |
AssemblyMapSharedPtr | m_nextLevelLocalToGlobalMap |
Map from the patches of the previous level to the patches of the current level. More... | |
int | m_lowestStaticCondLevel |
Lowest static condensation level. More... | |
Private Types | |
typedef Array< OneD, const ExpListSharedPtr > | BndCondExp |
typedef Array< OneD, const SpatialDomains::BoundaryConditionShPtr > | BndCond |
Constructs mappings for the C0 scalar continuous Galerkin formulation.
Mappings are created for three possible global solution types:
These mappings are used by GlobalLinSys to generate the global system.
Definition at line 65 of file AssemblyMapCG.h.
|
private |
Definition at line 68 of file AssemblyMapCG.h.
|
private |
Definition at line 67 of file AssemblyMapCG.h.
Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG | ( | const LibUtilities::SessionReaderSharedPtr & | pSession, |
const LibUtilities::CommSharedPtr & | comm, | ||
const std::string | variable = "DefaultVar" |
||
) |
Default constructor.
Definition at line 69 of file AssemblyMapCG.cpp.
References m_maxStaticCondLevel.
Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG | ( | const LibUtilities::SessionReaderSharedPtr & | pSession, |
const int | numLocalCoeffs, | ||
const ExpList & | locExp, | ||
const BndCondExp & | bndCondExp = NullExpListSharedPtrArray , |
||
const BndCond & | bndConditions = SpatialDomains::NullBoundaryConditionShPtrArray , |
||
const bool | checkIfSingular = false , |
||
const std::string | variable = "defaultVar" , |
||
const PeriodicMap & | periodicVerts = NullPeriodicMap , |
||
const PeriodicMap & | periodicEdges = NullPeriodicMap , |
||
const PeriodicMap & | periodicFaces = NullPeriodicMap |
||
) |
General constructor for expansions of all dimensions without boundary conditions.
STEP 6: Now, all ingredients are ready to set up the actual local to global mapping.
The remainder of the map consists of the element-interior degrees of freedom. This leads to the block-diagonal submatrix as each element-interior mode is globally orthogonal to modes in all other elements.
Definition at line 1319 of file AssemblyMapCG.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, Nektar::MultiRegions::AssemblyMap::CalculateBndSystemBandWidth(), CalculateFullSystemBandWidth(), CreateGraph(), Nektar::MultiRegions::DeterminePeriodicEdgeOrientId(), Nektar::MultiRegions::DeterminePeriodicFaceOrient(), Nektar::MultiRegions::eDirectMultiLevelStaticCond, Nektar::SpatialDomains::eDirichlet, Nektar::MultiRegions::eIterativeMultiLevelStaticCond, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eModified_B, Nektar::LibUtilities::eModified_C, Nektar::LibUtilities::eModifiedPyr_C, Nektar::MultiRegions::ePETScMultiLevelStaticCond, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eTriangle, Nektar::MultiRegions::eXxtMultiLevelStaticCond, Gs::Finalise(), Gs::Gather(), Nektar::MultiRegions::ExpList::GetCoeff_Offset(), Nektar::MultiRegions::ExpList::GetExp(), Nektar::LibUtilities::StdTriData::getNumberOfBndCoefficients(), Nektar::LibUtilities::StdQuadData::getNumberOfBndCoefficients(), Nektar::LibUtilities::StdTriData::getNumberOfCoefficients(), Nektar::LibUtilities::StdQuadData::getNumberOfCoefficients(), Nektar::StdRegions::StdExpansion::GetTraceNcoeffs(), Gs::gs_max, Gs::gs_min, Nektar::hash_range(), Gs::Init(), Nektar::MultiRegions::AssemblyMap::m_bndCondCoeffsToLocalCoeffsMap, Nektar::MultiRegions::AssemblyMap::m_bndCondCoeffsToLocalCoeffsSign, Nektar::MultiRegions::AssemblyMap::m_bndGsh, Nektar::MultiRegions::AssemblyMap::m_comm, m_copyLocalDirDofs, Nektar::MultiRegions::AssemblyMap::m_dirBndGsh, m_globalToUniversalMap, Nektar::MultiRegions::AssemblyMap::m_hash, Nektar::MultiRegions::AssemblyMap::m_localToGlobalBndMap, Nektar::MultiRegions::AssemblyMap::m_localToGlobalBndSign, m_localToGlobalMap, m_localToGlobalSign, Nektar::MultiRegions::AssemblyMap::m_localToLocalBndMap, Nektar::MultiRegions::AssemblyMap::m_localToLocalIntMap, Nektar::MultiRegions::AssemblyMap::m_nextLevelLocalToGlobalMap, Nektar::MultiRegions::AssemblyMap::m_numGlobalBndCoeffs, Nektar::MultiRegions::AssemblyMap::m_numGlobalCoeffs, Nektar::MultiRegions::AssemblyMap::m_numGlobalDirBndCoeffs, Nektar::MultiRegions::AssemblyMap::m_numLocalBndCoeffs, Nektar::MultiRegions::AssemblyMap::m_numLocalBndCoeffsPerPatch, m_numLocalBndCondCoeffs, Nektar::MultiRegions::AssemblyMap::m_numLocalCoeffs, Nektar::MultiRegions::AssemblyMap::m_numLocalIntCoeffsPerPatch, Nektar::MultiRegions::AssemblyMap::m_numPatches, m_parallelDirBndSign, Nektar::MultiRegions::AssemblyMap::m_session, Nektar::MultiRegions::AssemblyMap::m_signChange, Nektar::MultiRegions::AssemblyMap::m_solnType, Nektar::MultiRegions::AssemblyMap::m_staticCondLevel, Nektar::LibUtilities::P, CellMLToNektar.cellml_metadata::p, Nektar::UnitTests::q(), Nektar::LibUtilities::ReduceSum, SetUpUniversalC0ContMap(), sign, and Vmath::Vmax().
|
override |
Destructor.
Definition at line 2196 of file AssemblyMapCG.cpp.
References Gs::Finalise(), Nektar::MultiRegions::AssemblyMap::m_bndGsh, and Nektar::MultiRegions::AssemblyMap::m_gsh.
|
protected |
Calculate the bandwith of the full matrix system.
The bandwidth calculated here corresponds to what is referred to as half-bandwidth. If the elements of the matrix are designated as a_ij, it corresponds to the maximum value of |i-j| for non-zero a_ij. As a result, the value also corresponds to the number of sub- or super-diagonals.
The bandwith can be calculated elementally as it corresponds to the maximal elemental bandwith (i.e. the maximal difference in global DOF index for every element).
We caluclate here the bandwith of the full global system.
Definition at line 2705 of file AssemblyMapCG.cpp.
References m_fullSystemBandWidth, m_localToGlobalMap, Nektar::MultiRegions::AssemblyMap::m_numGlobalDirBndCoeffs, Nektar::MultiRegions::AssemblyMap::m_numLocalBndCoeffsPerPatch, Nektar::MultiRegions::AssemblyMap::m_numLocalCoeffs, Nektar::MultiRegions::AssemblyMap::m_numLocalIntCoeffsPerPatch, and Nektar::MultiRegions::AssemblyMap::m_numPatches.
Referenced by AssemblyMapCG().
|
protected |
STEP 4: Fill the #graph[0] and #graph[1] with the optimal ordering from boost.
Definition at line 77 of file AssemblyMapCG.cpp.
References ASSERTL0, ASSERTL1, Nektar::MultiRegions::CuthillMckeeReordering(), Nektar::MultiRegions::eDirectFullMatrix, Nektar::MultiRegions::eDirectMultiLevelStaticCond, Nektar::MultiRegions::eDirectStaticCond, Nektar::SpatialDomains::eDirichlet, Nektar::MultiRegions::eIterativeFull, Nektar::MultiRegions::eIterativeMultiLevelStaticCond, Nektar::MultiRegions::eIterativeStaticCond, Nektar::SpatialDomains::eNeumann, Nektar::SpatialDomains::ePeriodic, Nektar::MultiRegions::ePETScFullMatrix, Nektar::MultiRegions::ePETScMultiLevelStaticCond, Nektar::MultiRegions::ePETScStaticCond, Nektar::MultiRegions::eXxtFullMatrix, Nektar::MultiRegions::eXxtMultiLevelStaticCond, Nektar::MultiRegions::eXxtStaticCond, Gs::Finalise(), Gs::Gather(), Nektar::MultiRegions::ExpList::GetExp(), Nektar::LocalRegions::Expansion::GetGeom(), Nektar::StdRegions::StdExpansion::GetTraceNcoeffs(), Nektar::MultiRegions::GlobalSysSolnTypeMap, Gs::gs_add, Vmath::Imax(), Gs::Init(), Nektar::MultiRegions::AssemblyMap::m_comm, m_extraDirEdges, Nektar::MultiRegions::AssemblyMap::m_lowestStaticCondLevel, m_numDirEdges, m_numDirFaces, Nektar::MultiRegions::AssemblyMap::m_numLocalBndCoeffs, m_numLocalBndCondCoeffs, Nektar::MultiRegions::AssemblyMap::m_numLocalDirBndCoeffs, m_numNonDirEdgeModes, m_numNonDirEdges, m_numNonDirFaceModes, m_numNonDirFaces, m_numNonDirVertexModes, Nektar::MultiRegions::AssemblyMap::m_session, Nektar::MultiRegions::AssemblyMap::m_solnType, Nektar::MultiRegions::AssemblyMap::m_systemSingular, Nektar::MultiRegions::MultiLevelBisectionReordering(), Nektar::MultiRegions::NoReordering(), CellMLToNektar.cellml_metadata::p, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceMin, Nektar::LibUtilities::ReduceSum, and Vmath::Vsum().
Referenced by AssemblyMapCG(), and Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap().
|
inline |
Definition at line 94 of file AssemblyMapCG.h.
References m_copyLocalDirDofs.
|
inline |
Definition at line 99 of file AssemblyMapCG.h.
References m_parallelDirBndSign.
|
protected |
Sets up the global to universal mapping of degrees of freedom across processors.
Definition at line 2310 of file AssemblyMapCG.cpp.
References Nektar::MultiRegions::DeterminePeriodicEdgeOrientId(), Nektar::MultiRegions::DeterminePeriodicFaceOrient(), Nektar::MultiRegions::ExpList::GetCoeff_Offset(), Nektar::MultiRegions::ExpList::GetExp(), Nektar::MultiRegions::ExpList::GetSession(), Nektar::StdRegions::StdExpansion::GetTraceInteriorToElementMap(), Nektar::StdRegions::StdExpansion::GetTraceNcoeffs(), Gs::Init(), Nektar::MultiRegions::AssemblyMap::m_bndGsh, Nektar::MultiRegions::AssemblyMap::m_comm, Nektar::MultiRegions::AssemblyMap::m_globalToUniversalBndMap, Nektar::MultiRegions::AssemblyMap::m_globalToUniversalBndMapUnique, m_globalToUniversalMap, m_globalToUniversalMapUnique, Nektar::MultiRegions::AssemblyMap::m_gsh, m_localToGlobalMap, m_localToGlobalSign, Nektar::MultiRegions::AssemblyMap::m_numGlobalBndCoeffs, Nektar::MultiRegions::AssemblyMap::m_numGlobalCoeffs, Nektar::MultiRegions::AssemblyMap::m_signChange, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceSum, Gs::Unique(), and Vmath::Zero().
Referenced by AssemblyMapCG().
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2860 of file AssemblyMapCG.cpp.
References Vmath::Assmb(), CG_Iterations::loc, m_localToGlobalMap, m_localToGlobalSign, Nektar::MultiRegions::AssemblyMap::m_numGlobalCoeffs, Nektar::MultiRegions::AssemblyMap::m_numLocalCoeffs, Nektar::MultiRegions::AssemblyMap::m_signChange, Nektar::MultiRegions::AssemblyMap::UniversalAssemble(), and Vmath::Zero().
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2888 of file AssemblyMapCG.cpp.
References Nektar::MultiRegions::AssemblyMap::Assemble(), Nektar::NekVector< DataType >::GetPtr(), and CG_Iterations::loc.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2953 of file AssemblyMapCG.cpp.
References m_extraDirEdges.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2913 of file AssemblyMapCG.cpp.
References m_fullSystemBandWidth.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2762 of file AssemblyMapCG.cpp.
References m_globalToUniversalMap.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2747 of file AssemblyMapCG.cpp.
References m_globalToUniversalMap.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2767 of file AssemblyMapCG.cpp.
References m_globalToUniversalMapUnique.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2752 of file AssemblyMapCG.cpp.
References m_globalToUniversalMapUnique.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2757 of file AssemblyMapCG.cpp.
References m_localToGlobalMap.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2742 of file AssemblyMapCG.cpp.
References m_localToGlobalMap.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2785 of file AssemblyMapCG.cpp.
References m_localToGlobalSign.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2773 of file AssemblyMapCG.cpp.
References m_localToGlobalSign, and Nektar::MultiRegions::AssemblyMap::m_signChange.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2933 of file AssemblyMapCG.cpp.
References m_numDirEdges.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2938 of file AssemblyMapCG.cpp.
References m_numDirFaces.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2923 of file AssemblyMapCG.cpp.
References m_numNonDirEdgeModes.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2943 of file AssemblyMapCG.cpp.
References m_numNonDirEdges.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2928 of file AssemblyMapCG.cpp.
References m_numNonDirFaceModes.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2948 of file AssemblyMapCG.cpp.
References m_numNonDirFaces.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2918 of file AssemblyMapCG.cpp.
References m_numNonDirVertexModes.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2829 of file AssemblyMapCG.cpp.
References Vmath::Gathr(), CG_Iterations::loc, m_localToGlobalMap, m_localToGlobalSign, Nektar::MultiRegions::AssemblyMap::m_numGlobalCoeffs, Nektar::MultiRegions::AssemblyMap::m_numLocalCoeffs, and Nektar::MultiRegions::AssemblyMap::m_signChange.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2854 of file AssemblyMapCG.cpp.
References Nektar::NekVector< DataType >::GetPtr(), Nektar::MultiRegions::AssemblyMap::GlobalToLocal(), and CG_Iterations::loc.
|
overrideprotectedvirtual |
Construct an AssemblyMapCG object which corresponds to the linear space of the current object.
This function is used to create a linear-space assembly map, which is then used in the linear space preconditioner in the conjugate gradient solve.
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2570 of file AssemblyMapCG.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::MultiRegions::ExpList::GetComm(), Nektar::MultiRegions::ExpList::GetExp(), Nektar::MultiRegions::ExpList::GetSession(), Gs::Init(), Nektar::MultiRegions::AssemblyMap::m_comm, m_globalToUniversalMap, m_localToGlobalMap, Nektar::MultiRegions::AssemblyMap::m_numGlobalCoeffs, Nektar::MultiRegions::AssemblyMap::m_numGlobalDirBndCoeffs, Nektar::MultiRegions::AssemblyMap::m_session, Gs::Unique(), and Vmath::Zero().
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2790 of file AssemblyMapCG.cpp.
References Gs::Gather(), Gs::gs_max, CG_Iterations::loc, Nektar::MultiRegions::AssemblyMap::m_gsh, m_localToGlobalMap, m_localToGlobalSign, Nektar::MultiRegions::AssemblyMap::m_numLocalCoeffs, Nektar::MultiRegions::AssemblyMap::m_signChange, and Vmath::Scatr().
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2822 of file AssemblyMapCG.cpp.
References Nektar::NekVector< DataType >::GetPtr(), CG_Iterations::loc, and Nektar::MultiRegions::AssemblyMap::LocalToGlobal().
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2894 of file AssemblyMapCG.cpp.
References Gs::Gather(), Gs::gs_add, and Nektar::MultiRegions::AssemblyMap::m_gsh.
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2904 of file AssemblyMapCG.cpp.
References Nektar::MultiRegions::AssemblyMap::UniversalAssemble(), and Vmath::Vcopy().
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::AssemblyMap.
Definition at line 2899 of file AssemblyMapCG.cpp.
References Nektar::NekVector< DataType >::GetPtr(), and Nektar::MultiRegions::AssemblyMap::UniversalAssemble().
|
protected |
Set indicating degrees of freedom which are Dirichlet but whose value is stored on another processor.
Definition at line 139 of file AssemblyMapCG.h.
Referenced by AssemblyMapCG(), and GetCopyLocalDirDofs().
Extra dirichlet edges in parallel.
Definition at line 132 of file AssemblyMapCG.h.
Referenced by CreateGraph(), and v_GetExtraDirEdges().
|
protected |
Bandwith of the full matrix system (no static condensation).
Definition at line 110 of file AssemblyMapCG.h.
Referenced by CalculateFullSystemBandWidth(), and v_GetFullSystemBandWidth().
Integer map of process coeffs to universal space.
Definition at line 112 of file AssemblyMapCG.h.
Referenced by AssemblyMapCG(), Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), SetUpUniversalC0ContMap(), v_GetGlobalToUniversalMap(), and v_LinearSpaceMap().
Integer map of unique process coeffs to universal space (signed)
Definition at line 114 of file AssemblyMapCG.h.
Referenced by Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), SetUpUniversalC0ContMap(), and v_GetGlobalToUniversalMapUnique().
Integer map of local coeffs to global space.
Definition at line 106 of file AssemblyMapCG.h.
Referenced by AssemblyMapCG(), CalculateFullSystemBandWidth(), Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), SetUpUniversalC0ContMap(), v_Assemble(), v_GetLocalToGlobalMap(), v_GlobalToLocal(), v_LinearSpaceMap(), and v_LocalToGlobal().
Integer sign of local coeffs to global space.
Definition at line 108 of file AssemblyMapCG.h.
Referenced by AssemblyMapCG(), Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), SetUpUniversalC0ContMap(), v_Assemble(), v_GetLocalToGlobalSign(), v_GlobalToLocal(), and v_LocalToGlobal().
|
protected |
Maximum static condensation level.
Definition at line 136 of file AssemblyMapCG.h.
Referenced by AssemblyMapCG().
|
protected |
Number of Dirichlet edges.
Definition at line 122 of file AssemblyMapCG.h.
Referenced by CreateGraph(), and v_GetNumDirEdges().
|
protected |
Number of Dirichlet faces.
Definition at line 124 of file AssemblyMapCG.h.
Referenced by CreateGraph(), and v_GetNumDirFaces().
|
protected |
Number of local boundary condition coefficients.
Definition at line 130 of file AssemblyMapCG.h.
Referenced by AssemblyMapCG(), and CreateGraph().
|
protected |
Number of local boundary condition degrees of freedom.
Definition at line 134 of file AssemblyMapCG.h.
|
protected |
Number of non Dirichlet edge modes.
Definition at line 118 of file AssemblyMapCG.h.
Referenced by CreateGraph(), and v_GetNumNonDirEdgeModes().
|
protected |
Number of Dirichlet edges.
Definition at line 126 of file AssemblyMapCG.h.
Referenced by CreateGraph(), and v_GetNumNonDirEdges().
|
protected |
Number of non Dirichlet face modes.
Definition at line 120 of file AssemblyMapCG.h.
Referenced by CreateGraph(), and v_GetNumNonDirFaceModes().
|
protected |
Number of Dirichlet faces.
Definition at line 128 of file AssemblyMapCG.h.
Referenced by CreateGraph(), and v_GetNumNonDirFaces().
|
protected |
Number of non Dirichlet vertex modes.
Definition at line 116 of file AssemblyMapCG.h.
Referenced by CreateGraph(), and v_GetNumNonDirVertexModes().
|
protected |
Set indicating the local coeffs just touching parallel dirichlet boundary that have a sign change.
Definition at line 142 of file AssemblyMapCG.h.
Referenced by AssemblyMapCG(), and GetParallelDirBndSign().