Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Nektar::MultiRegions::AssemblyMap Class Reference

Base class for constructing local to global mapping of degrees of freedom. More...

#include <AssemblyMap.h>

Inheritance diagram for Nektar::MultiRegions::AssemblyMap:
Inheritance graph
[legend]
Collaboration diagram for Nektar::MultiRegions::AssemblyMap:
Collaboration graph
[legend]

Public Member Functions

 AssemblyMap ()
 Default constructor. More...
 
 AssemblyMap (const LibUtilities::SessionReaderSharedPtr &pSession, 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...
 
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) const
 
void LocalToGlobal (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global) 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
 
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 NekDoubleGetLocalToGlobalBndSign () const
 Retrieve the sign change for all local boundary modes. More...
 
int GetBndCondCoeffsToGlobalCoeffsMap (const int i)
 Retrieves the global index corresponding to a boundary expansion mode. More...
 
const Array< OneD, const int > & GetBndCondCoeffsToGlobalCoeffsMap ()
 Retrieves the global indices corresponding to the boundary expansion modes. More...
 
NekDouble GetBndCondCoeffsToGlobalCoeffsSign (const int i)
 Returns the modal sign associated with a given boundary expansion mode. More...
 
int GetBndCondTraceToGlobalTraceMap (const int i)
 Returns the global index of the boundary trace giving the index on the boundary expansion. More...
 
const Array< OneD, const int > & GetBndCondTraceToGlobalTraceMap ()
 
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 NekVector< NekDouble > &loc, NekVector< NekDouble > &global, int offset) const
 
void LocalBndToGlobal (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global) const
 
void LocalBndToGlobal (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global, int offset) const
 
void LocalBndToGlobal (const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) 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) const
 
const Array< OneD, const int > & GetExtraDirEdges ()
 
boost::shared_ptr< AssemblyMapLinearSpaceMap (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 PatchMapSharedPtrGetPatchMapFromPrevLevel (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...
 
PreconditionerType GetPreconType () const
 
NekDouble GetIterativeTolerance () const
 
int GetMaxIterations () const
 
int GetSuccessiveRHS () const
 
int GetLowestStaticCondLevel () const
 

Protected Member Functions

void CalculateBndSystemBandWidth ()
 Calculates the bandwidth of the boundary system. More...
 
void GlobalToLocalBndWithoutSign (const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc)
 

Protected Attributes

LibUtilities::SessionReaderSharedPtr m_session
 Session object. More...
 
LibUtilities::CommSharedPtr m_comm
 Communicator. 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 boundary coeffs to global space. More...
 
Array< OneD, NekDoublem_localToGlobalBndSign
 Integer sign of local boundary coeffs to global space. More...
 
Array< OneD, int > m_bndCondCoeffsToGlobalCoeffsMap
 Integer map of bnd cond coeffs to global coefficients. More...
 
Array< OneD, NekDoublem_bndCondCoeffsToGlobalCoeffsSign
 Integer map of bnd cond coeffs to global coefficients. More...
 
Array< OneD, int > m_bndCondTraceToGlobalTraceMap
 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...
 
PreconditionerType m_preconType
 Type type of preconditioner to use in iterative solver. More...
 
int m_maxIterations
 Maximum iterations for iterative solver. More...
 
NekDouble m_iterativeTolerance
 Tolerance for iterative solver. More...
 
int m_successiveRHS
 sucessive RHS for iterative solver More...
 
Gs::gs_datam_gsh
 
Gs::gs_datam_bndGsh
 
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 Member Functions

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) const
 
virtual void v_LocalToGlobal (const NekVector< NekDouble > &loc, NekVector< NekDouble > &global) 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 boost::shared_ptr
< AssemblyMap
v_LinearSpaceMap (const ExpList &locexp, GlobalSysSolnType solnType)
 Generate a linear space mapping from existing mapping. More...
 

Private Attributes

PatchMapSharedPtr m_patchMapFromPrevLevel
 Mapping information for previous level in MultiLevel Solver. More...
 

Detailed Description

Base class for constructing local to global mapping of degrees of freedom.

This class acts as a base class for constructing mappings between local, global and boundary degrees of freedom. It holds the storage for the maps and provides the accessors needed to retrieve them.

There are two derived classes: AssemblyMapCG and AssemblyMapDG. These perform the actual construction of the maps within their specific contexts.

Definition at line 59 of file AssemblyMap.h.

Constructor & Destructor Documentation

Nektar::MultiRegions::AssemblyMap::AssemblyMap ( )

Default constructor.

Initialises an empty mapping.

Definition at line 77 of file AssemblyMap.cpp.

77  :
78  m_session(),
79  m_comm(),
80  m_hash(0),
87  m_successiveRHS(0),
88  m_gsh(0),
89  m_bndGsh(0)
90  {
91  }
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: AssemblyMap.h:306
int m_successiveRHS
sucessive RHS for iterative solver
Definition: AssemblyMap.h:377
size_t m_hash
Hash for map.
Definition: AssemblyMap.h:309
int m_bndSystemBandWidth
The bandwith of the global bnd system.
Definition: AssemblyMap.h:365
GlobalSysSolnType m_solnType
The solution type of the global system.
Definition: AssemblyMap.h:363
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:318
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:316
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
LibUtilities::SessionReaderSharedPtr m_session
Session object.
Definition: AssemblyMap.h:303
No Solution type specified.
Nektar::MultiRegions::AssemblyMap::AssemblyMap ( const LibUtilities::SessionReaderSharedPtr pSession,
const std::string  variable = "DefaultVar" 
)

Constructor with a communicator.

Definition at line 93 of file AssemblyMap.cpp.

References Nektar::NekConstants::kNekIterativeTol, m_iterativeTolerance, m_maxIterations, m_preconType, m_solnType, and m_successiveRHS.

95  :
96  m_session(pSession),
97  m_comm(pSession->GetComm()),
98  m_hash(0),
104  m_successiveRHS(0),
105  m_gsh(0),
106  m_bndGsh(0)
107  {
108  // Default value from Solver Info
109  m_solnType = pSession->GetSolverInfoAsEnum<GlobalSysSolnType>(
110  "GlobalSysSoln");
111  m_preconType = pSession->GetSolverInfoAsEnum<PreconditionerType>(
112  "Preconditioner");
113 
114  // Override values with data from GlobalSysSolnInfo section
115  if(pSession->DefinesGlobalSysSolnInfo(variable, "GlobalSysSoln"))
116  {
117  std::string sysSoln = pSession->GetGlobalSysSolnInfo(variable,
118  "GlobalSysSoln");
119  m_solnType = pSession->GetValueAsEnum<GlobalSysSolnType>(
120  "GlobalSysSoln", sysSoln);
121  }
122 
123  if(pSession->DefinesGlobalSysSolnInfo(variable, "Preconditioner"))
124  {
125  std::string precon = pSession->GetGlobalSysSolnInfo(variable,
126  "Preconditioner");
127  m_preconType = pSession->GetValueAsEnum<PreconditionerType>(
128  "Preconditioner", precon);
129  }
130 
131  if(pSession->DefinesGlobalSysSolnInfo(variable,
132  "IterativeSolverTolerance"))
133  {
134  m_iterativeTolerance = boost::lexical_cast<NekDouble>(
135  pSession->GetGlobalSysSolnInfo(variable,
136  "IterativeSolverTolerance").c_str());
137  }
138  else
139  {
140  pSession->LoadParameter("IterativeSolverTolerance",
143  }
144 
145 
146  if(pSession->DefinesGlobalSysSolnInfo(variable,
147  "MaxIterations"))
148  {
149  m_maxIterations = boost::lexical_cast<int>(
150  pSession->GetGlobalSysSolnInfo(variable,
151  "MaxIterations").c_str());
152  }
153  else
154  {
155  pSession->LoadParameter("MaxIterations",
157  5000);
158  }
159 
160 
161  if(pSession->DefinesGlobalSysSolnInfo(variable,"SuccessiveRHS"))
162  {
163  m_successiveRHS = boost::lexical_cast<int>(
164  pSession->GetGlobalSysSolnInfo(variable,
165  "SuccessiveRHS").c_str());
166  }
167  else
168  {
169  pSession->LoadParameter("SuccessiveRHS",
170  m_successiveRHS,0);
171  }
172 
173  }
PreconditionerType m_preconType
Type type of preconditioner to use in iterative solver.
Definition: AssemblyMap.h:368
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: AssemblyMap.h:306
static const NekDouble kNekIterativeTol
int m_successiveRHS
sucessive RHS for iterative solver
Definition: AssemblyMap.h:377
size_t m_hash
Hash for map.
Definition: AssemblyMap.h:309
int m_bndSystemBandWidth
The bandwith of the global bnd system.
Definition: AssemblyMap.h:365
NekDouble m_iterativeTolerance
Tolerance for iterative solver.
Definition: AssemblyMap.h:374
GlobalSysSolnType m_solnType
The solution type of the global system.
Definition: AssemblyMap.h:363
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:318
double NekDouble
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:316
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
int m_maxIterations
Maximum iterations for iterative solver.
Definition: AssemblyMap.h:371
LibUtilities::SessionReaderSharedPtr m_session
Session object.
Definition: AssemblyMap.h:303
Nektar::MultiRegions::AssemblyMap::AssemblyMap ( AssemblyMap oldLevelMap,
const BottomUpSubStructuredGraphSharedPtr multiLevelGraph 
)

Constructor for next level in multi-level static condensation.

Create a new level of mapping using the information in multiLevelGraph and performing the following steps:

  • STEP 1: setup a mask array to determine to which patch of the new level every patch of the current level belongs. To do so we make four arrays, #gloPatchMask, #globHomPatchMask, #locPatchMask_NekDouble and #locPatchMask. These arrays are then used to check which local dofs of the old level belong to which patch of the new level
  • STEP 2: We calculate how many local bnd dofs of the old level belong to the boundaries of each patch at the new level. We need this information to set up the mapping between different levels.

Definition at line 179 of file AssemblyMap.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, CalculateBndSystemBandWidth(), Nektar::MultiRegions::eDirectMultiLevelStaticCond, Nektar::MultiRegions::eIterativeMultiLevelStaticCond, Nektar::MultiRegions::ePETScMultiLevelStaticCond, Nektar::MultiRegions::eXxtMultiLevelStaticCond, GetGlobalSysSolnType(), GetGlobalToUniversalBndMap(), GetGlobalToUniversalBndMapUnique(), GetLocalToGlobalBndMap(), GetLocalToGlobalBndSign(), GetNumGlobalBndCoeffs(), GetNumGlobalDirBndCoeffs(), GetNumLocalBndCoeffs(), GetNumLocalBndCoeffsPerPatch(), GetNumLocalDirBndCoeffs(), GetNumPatches(), GetSignChange(), GetStaticCondLevel(), GlobalToLocalBndWithoutSign(), m_globalToUniversalBndMap, m_globalToUniversalBndMapUnique, m_localToGlobalBndMap, m_localToGlobalBndSign, m_nextLevelLocalToGlobalMap, m_numGlobalBndCoeffs, m_numGlobalCoeffs, m_numGlobalDirBndCoeffs, m_numLocalBndCoeffs, m_numLocalBndCoeffsPerPatch, m_numLocalDirBndCoeffs, m_numLocalIntCoeffsPerPatch, m_numPatches, m_patchMapFromPrevLevel, m_signChange, m_solnType, m_staticCondLevel, Nektar::MultiRegions::RoundNekDoubleToInt(), and sign.

181  :
182  m_session(oldLevelMap->m_session),
183  m_comm(oldLevelMap->GetComm()),
184  m_hash(0),
185  m_solnType(oldLevelMap->m_solnType),
186  m_preconType(oldLevelMap->m_preconType),
187  m_maxIterations(oldLevelMap->m_maxIterations),
188  m_iterativeTolerance(oldLevelMap->m_iterativeTolerance),
189  m_successiveRHS(oldLevelMap->m_successiveRHS),
190  m_gsh(oldLevelMap->m_gsh),
191  m_bndGsh(oldLevelMap->m_bndGsh),
192  m_lowestStaticCondLevel(oldLevelMap->m_lowestStaticCondLevel)
193  {
194  int i;
195  int j;
196  int cnt;
197 
198  //--------------------------------------------------------------
199  // -- Extract information from the input argument
200  int numGlobalBndCoeffsOld = oldLevelMap->GetNumGlobalBndCoeffs();
201  int numGlobalDirBndCoeffsOld = oldLevelMap->GetNumGlobalDirBndCoeffs();
202  int numLocalBndCoeffsOld = oldLevelMap->GetNumLocalBndCoeffs();
203  int numLocalDirBndCoeffsOld = oldLevelMap->GetNumLocalDirBndCoeffs();
204  bool signChangeOld = oldLevelMap->GetSignChange();
205 
206  int staticCondLevelOld = oldLevelMap->GetStaticCondLevel();
207  int numPatchesOld = oldLevelMap->GetNumPatches();
208  GlobalSysSolnType solnTypeOld = oldLevelMap->GetGlobalSysSolnType();
209  const Array<OneD, const unsigned int>& numLocalBndCoeffsPerPatchOld = oldLevelMap->GetNumLocalBndCoeffsPerPatch();
210  //--------------------------------------------------------------
211 
212  //--------------------------------------------------------------
213  int newLevel = staticCondLevelOld+1;
214  /** - STEP 1: setup a mask array to determine to which patch
215  * of the new level every patch of the current
216  * level belongs. To do so we make four arrays,
217  * #gloPatchMask, #globHomPatchMask,
218  * #locPatchMask_NekDouble and #locPatchMask.
219  * These arrays are then used to check which local
220  * dofs of the old level belong to which patch of
221  * the new level
222  */
223  Array<OneD, NekDouble> globPatchMask (numGlobalBndCoeffsOld,-1.0);
224  Array<OneD, NekDouble> globHomPatchMask (globPatchMask+numGlobalDirBndCoeffsOld);
225  Array<OneD, NekDouble> locPatchMask_NekDouble(numLocalBndCoeffsOld,-3.0);
226  Array<OneD, int> locPatchMask (numLocalBndCoeffsOld);
227 
228  // Fill the array globPatchMask as follows:
229  // - The first part (i.e. the glob bnd dofs) is filled with the
230  // value -1
231  // - The second part (i.e. the glob interior dofs) is numbered
232  // according to the patch it belongs to (i.e. dofs in first block
233  // all are numbered 0, the second block numbered are 1, etc...)
234  multiLevelGraph->MaskPatches(newLevel,globHomPatchMask);
235 
236  // Map from Global Dofs to Local Dofs
237  // As a result, we know for each local dof whether
238  // it is mapped to the boundary of the next level, or to which
239  // patch. Based upon this, we can than later associate every patch
240  // of the current level with a patch in the next level.
241  oldLevelMap->GlobalToLocalBndWithoutSign(globPatchMask,locPatchMask_NekDouble);
242 
243  // Convert the result to an array of integers rather than doubles
244  RoundNekDoubleToInt(locPatchMask_NekDouble,locPatchMask);
245 
246  /** - STEP 2: We calculate how many local bnd dofs of the
247  * old level belong to the boundaries of each patch at
248  * the new level. We need this information to set up the
249  * mapping between different levels.
250  */
251 
252  // Retrieve the number of patches at the next level
253  int numPatchesWithIntNew = multiLevelGraph->GetNpatchesWithInterior(newLevel);
254  int numPatchesNew = numPatchesWithIntNew;
255 
256  // Allocate memory to store the number of local dofs associated to
257  // each of elemental boundaries of these patches
258  map<int, int> numLocalBndCoeffsPerPatchNew;
259  for(int i = 0; i < numPatchesNew; i++)
260  {
261  numLocalBndCoeffsPerPatchNew[i] = 0;
262  }
263 
264  int minval;
265  int maxval;
266  int curPatch;
267  for(i = cnt = 0; i < numPatchesOld; i++)
268  {
269  // For every patch at the current level, the mask array
270  // locPatchMask should be filled with
271  // - the same (positive) number for each entry (which will
272  // correspond to the patch at the next level it belongs to)
273  // - the same (positive) number for each entry, except some
274  // entries that are -1 (the enties correspond to -1, will be
275  // mapped to the local boundary of the next level patch given
276  // by the positive number)
277  // - -1 for all entries. In this case, we will make an
278  // additional patch only consisting of boundaries at the next
279  // level
280  minval = *min_element(&locPatchMask[cnt],
281  &locPatchMask[cnt]+numLocalBndCoeffsPerPatchOld[i]);
282  maxval = *max_element(&locPatchMask[cnt],
283  &locPatchMask[cnt]+numLocalBndCoeffsPerPatchOld[i]);
284  ASSERTL0((minval==maxval)||(minval==-1),"These values should never be the same");
285 
286  if(maxval == -1)
287  {
288  curPatch = numPatchesNew;
289  numLocalBndCoeffsPerPatchNew[curPatch] = 0;
290  numPatchesNew++;
291  }
292  else
293  {
294  curPatch = maxval;
295  }
296 
297  for(j = 0; j < numLocalBndCoeffsPerPatchOld[i]; j++ )
298  {
299  ASSERTL0((locPatchMask[cnt]==maxval)||(locPatchMask[cnt]==minval),
300  "These values should never be the same");
301  if(locPatchMask[cnt] == -1)
302  {
303  ++numLocalBndCoeffsPerPatchNew[curPatch];
304  }
305  cnt++;
306  }
307  }
308 
309  // Count how many local dofs of the old level are mapped
310  // to the local boundary dofs of the new level
312  m_numPatches = numLocalBndCoeffsPerPatchNew.size();
315  for(int i = 0; i < m_numPatches; i++)
316  {
317  m_numLocalBndCoeffsPerPatch[i] = (unsigned int) numLocalBndCoeffsPerPatchNew[i];
318  m_numLocalBndCoeffs += numLocalBndCoeffsPerPatchNew[i];
319  }
320  multiLevelGraph->GetNintDofsPerPatch(newLevel,m_numLocalIntCoeffsPerPatch);
321 
322  // Also initialise some more data members
323  m_solnType = solnTypeOld;
328  "This method should only be called for in "
329  "case of multi-level static condensation.");
330  m_staticCondLevel = newLevel;
331  m_signChange = signChangeOld;
332  m_numLocalDirBndCoeffs = numLocalDirBndCoeffsOld;
333  m_numGlobalDirBndCoeffs = numGlobalDirBndCoeffsOld;
334  m_numGlobalBndCoeffs = multiLevelGraph->GetInteriorOffset(newLevel) +
336  m_numGlobalCoeffs = multiLevelGraph->GetNumGlobalDofs(newLevel) +
339  if(m_signChange)
340  {
342  }
343 
345 
347  m_numGlobalBndCoeffs, oldLevelMap->GetGlobalToUniversalBndMap());
349  m_numGlobalBndCoeffs, oldLevelMap->GetGlobalToUniversalBndMapUnique());
350 
351  // Set up an offset array that denotes the offset of the local
352  // boundary degrees of freedom of the next level
353  Array<OneD, int> numLocalBndCoeffsPerPatchOffset(m_numPatches+1,0);
354  for(int i = 1; i < m_numPatches+1; i++)
355  {
356  numLocalBndCoeffsPerPatchOffset[i] += numLocalBndCoeffsPerPatchOffset[i-1] + numLocalBndCoeffsPerPatchNew[i-1];
357  }
358 
359  int additionalPatchCnt = numPatchesWithIntNew;
360  int newid;
361  int blockid;
362  bool isBndDof;
363  NekDouble sign;
364  Array<OneD, int> bndDofPerPatchCnt(m_numPatches,0);
365  for(i = cnt = 0; i < numPatchesOld; i++)
366  {
367  minval = *min_element(&locPatchMask[cnt],&locPatchMask[cnt]+numLocalBndCoeffsPerPatchOld[i]);
368  maxval = *max_element(&locPatchMask[cnt],&locPatchMask[cnt]+numLocalBndCoeffsPerPatchOld[i]);
369  ASSERTL0((minval==maxval)||(minval==-1),"These values should never be the same");
370 
371  if(maxval == -1)
372  {
373  curPatch = additionalPatchCnt;
374  additionalPatchCnt++;
375  }
376  else
377  {
378  curPatch = maxval;
379  }
380 
381  for(j = 0; j < numLocalBndCoeffsPerPatchOld[i]; j++ )
382  {
383  ASSERTL0((locPatchMask[cnt]==maxval)||(locPatchMask[cnt]==minval),
384  "These values should never be the same");
385 
386  sign = oldLevelMap->GetLocalToGlobalBndSign(cnt);
387 
388  if(locPatchMask[cnt] == -1)
389  {
390  newid = numLocalBndCoeffsPerPatchOffset[curPatch];
391 
392  m_localToGlobalBndMap[newid] = oldLevelMap->GetLocalToGlobalBndMap(cnt);
393  if(m_signChange)
394  {
395  m_localToGlobalBndSign[ newid ] = sign;
396  }
397 
398  blockid = bndDofPerPatchCnt[curPatch];
399  isBndDof = true;
400 
401 
402  numLocalBndCoeffsPerPatchOffset[curPatch]++;
403  bndDofPerPatchCnt[curPatch]++;
404  }
405  else
406  {
407  newid = oldLevelMap->GetLocalToGlobalBndMap(cnt) -
408  m_numGlobalBndCoeffs+m_numLocalBndCoeffs;
409 
410  blockid = oldLevelMap->GetLocalToGlobalBndMap(cnt)-
411  m_numGlobalDirBndCoeffs - multiLevelGraph->GetInteriorOffset(newLevel,curPatch);
412  isBndDof = false;
413  }
414 
415  sign = isBndDof?1.0:sign;
416 
417  m_patchMapFromPrevLevel->SetPatchMap(cnt,curPatch,blockid,isBndDof,sign);
418 
419  cnt++;
420  }
421  }
423 
424  // Postprocess the computed information - Update the old
425  // level with the mapping to new evel
426  // oldLevelMap->SetLocalBndToNextLevelMap(oldLocalBndToNewLevelMap,oldLocalBndToNewLevelSign);
427  // - Construct the next level mapping object
428  if(m_staticCondLevel < (multiLevelGraph->GetNlevels()-1))
429  {
431  }
432  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
PreconditionerType m_preconType
Type type of preconditioner to use in iterative solver.
Definition: AssemblyMap.h:368
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: AssemblyMap.h:306
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:22
PatchMapSharedPtr m_patchMapFromPrevLevel
Mapping information for previous level in MultiLevel Solver.
Definition: AssemblyMap.h:408
AssemblyMapSharedPtr m_nextLevelLocalToGlobalMap
Map from the patches of the previous level to the patches of the current level.
Definition: AssemblyMap.h:395
int m_successiveRHS
sucessive RHS for iterative solver
Definition: AssemblyMap.h:377
size_t m_hash
Hash for map.
Definition: AssemblyMap.h:309
NekDouble m_iterativeTolerance
Tolerance for iterative solver.
Definition: AssemblyMap.h:374
Array< OneD, unsigned int > m_numLocalBndCoeffsPerPatch
The number of bnd dofs per patch.
Definition: AssemblyMap.h:388
GlobalSysSolnType m_solnType
The solution type of the global system.
Definition: AssemblyMap.h:363
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:318
double NekDouble
Array< OneD, unsigned int > m_numLocalIntCoeffsPerPatch
The number of int dofs per patch.
Definition: AssemblyMap.h:390
int m_lowestStaticCondLevel
Lowest static condensation level.
Definition: AssemblyMap.h:397
void CalculateBndSystemBandWidth()
Calculates the bandwidth of the boundary system.
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:316
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
int m_staticCondLevel
The level of recursion in the case of multi-level static condensation.
Definition: AssemblyMap.h:384
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:350
int m_maxIterations
Maximum iterations for iterative solver.
Definition: AssemblyMap.h:371
int RoundNekDoubleToInt(NekDouble x)
Rounds a double precision number to an integer.
Definition: AssemblyMap.cpp:55
LibUtilities::SessionReaderSharedPtr m_session
Session object.
Definition: AssemblyMap.h:303
Array< OneD, int > m_globalToUniversalBndMap
Integer map of process coeffs to universal space.
Definition: AssemblyMap.h:358
Array< OneD, int > m_globalToUniversalBndMapUnique
Integer map of unique process coeffs to universal space (signed)
Definition: AssemblyMap.h:360
int m_numGlobalCoeffs
Total number of global coefficients.
Definition: AssemblyMap.h:342
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
int m_numPatches
The number of patches (~elements) in the current level.
Definition: AssemblyMap.h:386
Nektar::MultiRegions::AssemblyMap::~AssemblyMap ( void  )
virtual

Destructor.

Definition at line 435 of file AssemblyMap.cpp.

436  {
437  }

Member Function Documentation

void Nektar::MultiRegions::AssemblyMap::Assemble ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global 
) const

Definition at line 748 of file AssemblyMap.cpp.

References v_Assemble().

Referenced by Nektar::MultiRegions::AssemblyMapCG::v_Assemble().

751  {
752  v_Assemble(loc,global);
753  }
virtual void v_Assemble(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const
void Nektar::MultiRegions::AssemblyMap::Assemble ( const NekVector< NekDouble > &  loc,
NekVector< NekDouble > &  global 
) const

Definition at line 755 of file AssemblyMap.cpp.

References v_Assemble().

758  {
759  v_Assemble(loc,global);
760  }
virtual void v_Assemble(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const
void Nektar::MultiRegions::AssemblyMap::AssembleBnd ( const NekVector< NekDouble > &  loc,
NekVector< NekDouble > &  global,
int  offset 
) const

Definition at line 1068 of file AssemblyMap.cpp.

References Nektar::NekVector< DataType >::GetPtr().

Referenced by AssembleBnd(), Nektar::MultiRegions::AssemblyMapDG::v_Assemble(), and Nektar::MultiRegions::AssemblyMapDG::v_LocalToGlobal().

1071  {
1072  AssembleBnd(loc.GetPtr(), global.GetPtr(), offset);
1073  }
void AssembleBnd(const NekVector< NekDouble > &loc, NekVector< NekDouble > &global, int offset) const
Array< OneD, DataType > & GetPtr()
Definition: NekVector.cpp:230
void Nektar::MultiRegions::AssemblyMap::AssembleBnd ( const NekVector< NekDouble > &  loc,
NekVector< NekDouble > &  global 
) const

Definition at line 1076 of file AssemblyMap.cpp.

References AssembleBnd(), and Nektar::NekVector< DataType >::GetPtr().

1079  {
1080  AssembleBnd(loc.GetPtr(), global.GetPtr());
1081  }
void AssembleBnd(const NekVector< NekDouble > &loc, NekVector< NekDouble > &global, int offset) const
Array< OneD, DataType > & GetPtr()
Definition: NekVector.cpp:230
void Nektar::MultiRegions::AssemblyMap::AssembleBnd ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global,
int  offset 
) const

Definition at line 1084 of file AssemblyMap.cpp.

References ASSERTL1, Vmath::Assmb(), m_localToGlobalBndMap, m_localToGlobalBndSign, m_numGlobalBndCoeffs, m_numLocalBndCoeffs, m_signChange, UniversalAssembleBnd(), and Vmath::Vcopy().

1087  {
1088  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local array is not of correct dimension");
1089  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs-offset,"Global array is not of correct dimension");
1091 
1092  if(m_signChange)
1093  {
1095  }
1096  else
1097  {
1098  Vmath::Assmb(m_numLocalBndCoeffs,loc.get(), m_localToGlobalBndMap.get(), tmp.get());
1099  }
1100  UniversalAssembleBnd(tmp);
1101  Vmath::Vcopy(m_numGlobalBndCoeffs-offset, tmp.get() + offset, 1, global.get(), 1);
1102  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
void Assmb(int n, const T *x, const int *y, T *z)
Assemble z[y[i]] += x[i]; z should be zero'd first.
Definition: Vmath.cpp:695
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:350
void UniversalAssembleBnd(Array< OneD, NekDouble > &pGlobal) const
#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:1047
void Nektar::MultiRegions::AssemblyMap::AssembleBnd ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global 
) const

Definition at line 1105 of file AssemblyMap.cpp.

References ASSERTL1, Vmath::Assmb(), m_localToGlobalBndMap, m_localToGlobalBndSign, m_numGlobalBndCoeffs, m_numLocalBndCoeffs, m_signChange, UniversalAssembleBnd(), and Vmath::Zero().

1108  {
1109  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
1110  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs,"Global vector is not of correct dimension");
1111 
1112  Vmath::Zero(m_numGlobalBndCoeffs, global.get(), 1);
1113 
1114  if(m_signChange)
1115  {
1117  loc.get(), m_localToGlobalBndMap.get(), global.get());
1118  }
1119  else
1120  {
1121  Vmath::Assmb(m_numLocalBndCoeffs,loc.get(), m_localToGlobalBndMap.get(), global.get());
1122  }
1123  UniversalAssembleBnd(global);
1124  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
void Assmb(int n, const T *x, const int *y, T *z)
Assemble z[y[i]] += x[i]; z should be zero'd first.
Definition: Vmath.cpp:695
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:350
void UniversalAssembleBnd(Array< OneD, NekDouble > &pGlobal) const
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:359
#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::AssemblyMap::AtLastLevel ( ) const

Returns true if this is the last level in the multi-level static condensation.

Definition at line 1191 of file AssemblyMap.cpp.

References m_nextLevelLocalToGlobalMap.

1192  {
1193  return !( m_nextLevelLocalToGlobalMap.get() );
1194  }
AssemblyMapSharedPtr m_nextLevelLocalToGlobalMap
Map from the patches of the previous level to the patches of the current level.
Definition: AssemblyMap.h:395
void Nektar::MultiRegions::AssemblyMap::CalculateBndSystemBandWidth ( )
protected

Calculates the bandwidth of the boundary system.

The bandwidth calculated 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 here calculate the bandwith of the global boundary system (as used for static condensation).

Definition at line 454 of file AssemblyMap.cpp.

References m_bndSystemBandWidth, m_localToGlobalBndMap, m_numGlobalDirBndCoeffs, m_numLocalBndCoeffs, m_numLocalBndCoeffsPerPatch, and m_numPatches.

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

455  {
456  int i,j;
457  int cnt = 0;
458  int locSize;
459  int maxId;
460  int minId;
461  int bwidth = -1;
462  for(i = 0; i < m_numPatches; ++i)
463  {
464  locSize = m_numLocalBndCoeffsPerPatch[i];
465  maxId = -1;
466  minId = m_numLocalBndCoeffs+1;
467  for(j = 0; j < locSize; j++)
468  {
470  {
471  if(m_localToGlobalBndMap[cnt+j] > maxId)
472  {
473  maxId = m_localToGlobalBndMap[cnt+j];
474  }
475 
476  if(m_localToGlobalBndMap[cnt+j] < minId)
477  {
478  minId = m_localToGlobalBndMap[cnt+j];
479  }
480  }
481  }
482  bwidth = (bwidth>(maxId-minId))?bwidth:(maxId-minId);
483 
484  cnt+=locSize;
485  }
486 
487  m_bndSystemBandWidth = bwidth;
488  }
int m_bndSystemBandWidth
The bandwith of the global bnd system.
Definition: AssemblyMap.h:365
Array< OneD, unsigned int > m_numLocalBndCoeffsPerPatch
The number of bnd dofs per patch.
Definition: AssemblyMap.h:388
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:318
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
int m_numPatches
The number of patches (~elements) in the current level.
Definition: AssemblyMap.h:386
int Nektar::MultiRegions::AssemblyMap::GetBndCondCoeffsToGlobalCoeffsMap ( const int  i)

Retrieves the global index corresponding to a boundary expansion mode.

Definition at line 877 of file AssemblyMap.cpp.

References m_bndCondCoeffsToGlobalCoeffsMap.

879  {
881  }
Array< OneD, int > m_bndCondCoeffsToGlobalCoeffsMap
Integer map of bnd cond coeffs to global coefficients.
Definition: AssemblyMap.h:352
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetBndCondCoeffsToGlobalCoeffsMap ( )

Retrieves the global indices corresponding to the boundary expansion modes.

Definition at line 911 of file AssemblyMap.cpp.

References m_bndCondCoeffsToGlobalCoeffsMap.

Referenced by Nektar::CoupledAssemblyMap::CoupledAssemblyMap().

912  {
914  }
Array< OneD, int > m_bndCondCoeffsToGlobalCoeffsMap
Integer map of bnd cond coeffs to global coefficients.
Definition: AssemblyMap.h:352
NekDouble Nektar::MultiRegions::AssemblyMap::GetBndCondCoeffsToGlobalCoeffsSign ( const int  i)

Returns the modal sign associated with a given boundary expansion mode.

Definition at line 898 of file AssemblyMap.cpp.

References m_bndCondCoeffsToGlobalCoeffsSign, and m_signChange.

899  {
900  if(m_signChange)
901  {
903  }
904  else
905  {
906  return 1.0;
907  }
908  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
Array< OneD, NekDouble > m_bndCondCoeffsToGlobalCoeffsSign
Integer map of bnd cond coeffs to global coefficients.
Definition: AssemblyMap.h:354
int Nektar::MultiRegions::AssemblyMap::GetBndCondTraceToGlobalTraceMap ( const int  i)

Returns the global index of the boundary trace giving the index on the boundary expansion.

Definition at line 884 of file AssemblyMap.cpp.

References ASSERTL1, and m_bndCondTraceToGlobalTraceMap.

886  {
887  ASSERTL1(i < m_bndCondTraceToGlobalTraceMap.num_elements(),
888  "Index out of range.");
890  }
Array< OneD, int > m_bndCondTraceToGlobalTraceMap
Integer map of bnd cond trace number to global trace number.
Definition: AssemblyMap.h:356
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetBndCondTraceToGlobalTraceMap ( )

Definition at line 893 of file AssemblyMap.cpp.

894  {
896  }
Array< OneD, int > m_bndCondTraceToGlobalTraceMap
Integer map of bnd cond trace number to global trace number.
Definition: AssemblyMap.h:356
int Nektar::MultiRegions::AssemblyMap::GetBndSystemBandWidth ( ) const

Returns the bandwidth of the boundary system.

Definition at line 1150 of file AssemblyMap.cpp.

References m_bndSystemBandWidth.

Referenced by Nektar::MultiRegions::AssemblyMapDG::v_GetFullSystemBandWidth().

1151  {
1152  return m_bndSystemBandWidth;
1153  }
int m_bndSystemBandWidth
The bandwith of the global bnd system.
Definition: AssemblyMap.h:365
LibUtilities::CommSharedPtr Nektar::MultiRegions::AssemblyMap::GetComm ( )

Retrieves the communicator.

Definition at line 670 of file AssemblyMap.cpp.

References m_comm.

671  {
672  return m_comm;
673  }
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: AssemblyMap.h:306
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetExtraDirEdges ( )

Definition at line 821 of file AssemblyMap.cpp.

References v_GetExtraDirEdges().

822  {
823  return v_GetExtraDirEdges();
824  }
virtual const Array< OneD, const int > & v_GetExtraDirEdges()
int Nektar::MultiRegions::AssemblyMap::GetFullSystemBandWidth ( ) const

Definition at line 781 of file AssemblyMap.cpp.

References v_GetFullSystemBandWidth().

782  {
783  return v_GetFullSystemBandWidth();
784  }
virtual int v_GetFullSystemBandWidth() const
GlobalSysSolnType Nektar::MultiRegions::AssemblyMap::GetGlobalSysSolnType ( ) const

Returns the method of solving global systems.

Definition at line 1197 of file AssemblyMap.cpp.

References m_solnType.

Referenced by AssemblyMap().

1198  {
1199  return m_solnType;
1200  }
GlobalSysSolnType m_solnType
The solution type of the global system.
Definition: AssemblyMap.h:363
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetGlobalToUniversalBndMap ( )

Definition at line 854 of file AssemblyMap.cpp.

References m_globalToUniversalBndMap.

Referenced by AssemblyMap().

855  {
857  }
Array< OneD, int > m_globalToUniversalBndMap
Integer map of process coeffs to universal space.
Definition: AssemblyMap.h:358
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetGlobalToUniversalBndMapUnique ( )

Definition at line 859 of file AssemblyMap.cpp.

References m_globalToUniversalBndMapUnique.

Referenced by AssemblyMap().

860  {
862  }
Array< OneD, int > m_globalToUniversalBndMapUnique
Integer map of unique process coeffs to universal space (signed)
Definition: AssemblyMap.h:360
int Nektar::MultiRegions::AssemblyMap::GetGlobalToUniversalMap ( const int  i) const

Definition at line 685 of file AssemblyMap.cpp.

References v_GetGlobalToUniversalMap().

686  {
687  return v_GetGlobalToUniversalMap(i);
688  }
virtual const Array< OneD, const int > & v_GetGlobalToUniversalMap()
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetGlobalToUniversalMap ( )

Definition at line 700 of file AssemblyMap.cpp.

References v_GetGlobalToUniversalMap().

701  {
702  return v_GetGlobalToUniversalMap();
703  }
virtual const Array< OneD, const int > & v_GetGlobalToUniversalMap()
int Nektar::MultiRegions::AssemblyMap::GetGlobalToUniversalMapUnique ( const int  i) const

Definition at line 690 of file AssemblyMap.cpp.

References v_GetGlobalToUniversalMapUnique().

691  {
693  }
virtual const Array< OneD, const int > & v_GetGlobalToUniversalMapUnique()
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetGlobalToUniversalMapUnique ( )

Definition at line 705 of file AssemblyMap.cpp.

References v_GetGlobalToUniversalMapUnique().

706  {
708  }
virtual const Array< OneD, const int > & v_GetGlobalToUniversalMapUnique()
size_t Nektar::MultiRegions::AssemblyMap::GetHash ( ) const

Retrieves the hash of this map.

Definition at line 675 of file AssemblyMap.cpp.

References m_hash.

676  {
677  return m_hash;
678  }
size_t m_hash
Hash for map.
Definition: AssemblyMap.h:309
NekDouble Nektar::MultiRegions::AssemblyMap::GetIterativeTolerance ( ) const

Definition at line 1207 of file AssemblyMap.cpp.

References m_iterativeTolerance.

1208  {
1209  return m_iterativeTolerance;
1210  }
NekDouble m_iterativeTolerance
Tolerance for iterative solver.
Definition: AssemblyMap.h:374
int Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalBndMap ( const int  i) const

Retrieve the global index of a given local boundary mode.

Definition at line 831 of file AssemblyMap.cpp.

References m_localToGlobalBndMap.

Referenced by AssemblyMap().

832  {
833  return m_localToGlobalBndMap[i];
834  }
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalBndMap ( void  )

Retrieve the global indices of the local boundary modes.

Definition at line 837 of file AssemblyMap.cpp.

References m_localToGlobalBndMap.

838  {
839  return m_localToGlobalBndMap;
840  }
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
NekDouble Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalBndSign ( const int  i) const

Retrieve the sign change of a given local boundary mode.

Definition at line 864 of file AssemblyMap.cpp.

References m_localToGlobalBndSign, and m_signChange.

Referenced by AssemblyMap().

865  {
866  if(m_signChange)
867  {
868  return m_localToGlobalBndSign[i];
869  }
870  else
871  {
872  return 1.0;
873  }
874  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:350
Array< OneD, const NekDouble > Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalBndSign ( void  ) const

Retrieve the sign change for all local boundary modes.

Definition at line 849 of file AssemblyMap.cpp.

References m_localToGlobalBndSign.

Referenced by Nektar::MultiRegions::AssemblyMapDG::v_GetLocalToGlobalSign().

850  {
851  return m_localToGlobalBndSign;
852  }
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:350
int Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalMap ( const int  i) const

Definition at line 680 of file AssemblyMap.cpp.

References v_GetLocalToGlobalMap().

681  {
682  return v_GetLocalToGlobalMap(i);
683  }
virtual const Array< OneD, const int > & v_GetLocalToGlobalMap()
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalMap ( )

Definition at line 695 of file AssemblyMap.cpp.

References v_GetLocalToGlobalMap().

696  {
697  return v_GetLocalToGlobalMap();
698  }
virtual const Array< OneD, const int > & v_GetLocalToGlobalMap()
NekDouble Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalSign ( const int  i) const

Definition at line 710 of file AssemblyMap.cpp.

References v_GetLocalToGlobalSign().

711  {
712  return v_GetLocalToGlobalSign(i);
713  }
virtual const Array< OneD, NekDouble > & v_GetLocalToGlobalSign() const
const Array< OneD, NekDouble > & Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalSign ( ) const

Definition at line 715 of file AssemblyMap.cpp.

References v_GetLocalToGlobalSign().

716  {
717  return v_GetLocalToGlobalSign();
718  }
virtual const Array< OneD, NekDouble > & v_GetLocalToGlobalSign() const
int Nektar::MultiRegions::AssemblyMap::GetLowestStaticCondLevel ( ) const
inline

Definition at line 296 of file AssemblyMap.h.

References m_lowestStaticCondLevel.

297  {
299  }
int m_lowestStaticCondLevel
Lowest static condensation level.
Definition: AssemblyMap.h:397
int Nektar::MultiRegions::AssemblyMap::GetMaxIterations ( ) const

Definition at line 1212 of file AssemblyMap.cpp.

References m_maxIterations.

1213  {
1214  return m_maxIterations;
1215  }
int m_maxIterations
Maximum iterations for iterative solver.
Definition: AssemblyMap.h:371
const AssemblyMapSharedPtr Nektar::MultiRegions::AssemblyMap::GetNextLevelLocalToGlobalMap ( ) const

Returns the local to global mapping for the next level in the multi-level static condensation.

Definition at line 1179 of file AssemblyMap.cpp.

References m_nextLevelLocalToGlobalMap.

1180  {
1182  }
AssemblyMapSharedPtr m_nextLevelLocalToGlobalMap
Map from the patches of the previous level to the patches of the current level.
Definition: AssemblyMap.h:395
int Nektar::MultiRegions::AssemblyMap::GetNumDirEdges ( ) const

Definition at line 801 of file AssemblyMap.cpp.

References v_GetNumDirEdges().

802  {
803  return v_GetNumDirEdges();
804  }
virtual int v_GetNumDirEdges() const
int Nektar::MultiRegions::AssemblyMap::GetNumDirFaces ( ) const

Definition at line 806 of file AssemblyMap.cpp.

References v_GetNumDirFaces().

807  {
808  return v_GetNumDirFaces();
809  }
virtual int v_GetNumDirFaces() const
int Nektar::MultiRegions::AssemblyMap::GetNumGlobalBndCoeffs ( ) const

Returns the total number of global boundary coefficients.

Definition at line 933 of file AssemblyMap.cpp.

References m_numGlobalBndCoeffs.

Referenced by AssemblyMap().

934  {
935  return m_numGlobalBndCoeffs;
936  }
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
int Nektar::MultiRegions::AssemblyMap::GetNumGlobalCoeffs ( ) const

Returns the total number of global coefficients.

Definition at line 943 of file AssemblyMap.cpp.

References m_numGlobalCoeffs.

944  {
945  return m_numGlobalCoeffs;
946  }
int m_numGlobalCoeffs
Total number of global coefficients.
Definition: AssemblyMap.h:342
int Nektar::MultiRegions::AssemblyMap::GetNumGlobalDirBndCoeffs ( ) const

Returns the number of global Dirichlet boundary coefficients.

Definition at line 917 of file AssemblyMap.cpp.

References m_numGlobalDirBndCoeffs.

Referenced by AssemblyMap().

918  {
920  }
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:318
int Nektar::MultiRegions::AssemblyMap::GetNumLocalBndCoeffs ( ) const

Returns the total number of local boundary coefficients.

Definition at line 928 of file AssemblyMap.cpp.

References m_numLocalBndCoeffs.

Referenced by AssemblyMap().

929  {
930  return m_numLocalBndCoeffs;
931  }
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
const Array< OneD, const unsigned int > & Nektar::MultiRegions::AssemblyMap::GetNumLocalBndCoeffsPerPatch ( )

Returns the number of local boundary coefficients in each patch.

Definition at line 1166 of file AssemblyMap.cpp.

References m_numLocalBndCoeffsPerPatch.

Referenced by AssemblyMap().

1167  {
1169  }
Array< OneD, unsigned int > m_numLocalBndCoeffsPerPatch
The number of bnd dofs per patch.
Definition: AssemblyMap.h:388
int Nektar::MultiRegions::AssemblyMap::GetNumLocalCoeffs ( ) const

Returns the total number of local coefficients.

Definition at line 938 of file AssemblyMap.cpp.

References m_numLocalCoeffs.

939  {
940  return m_numLocalCoeffs;
941  }
int m_numLocalCoeffs
Total number of local coefficients.
Definition: AssemblyMap.h:331
int Nektar::MultiRegions::AssemblyMap::GetNumLocalDirBndCoeffs ( ) const

Returns the number of local Dirichlet boundary coefficients.

Definition at line 923 of file AssemblyMap.cpp.

References m_numLocalDirBndCoeffs.

Referenced by AssemblyMap().

924  {
925  return m_numLocalDirBndCoeffs;
926  }
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:316
const Array< OneD, const unsigned int > & Nektar::MultiRegions::AssemblyMap::GetNumLocalIntCoeffsPerPatch ( )

Returns the number of local interior coefficients in each patch.

Definition at line 1173 of file AssemblyMap.cpp.

References m_numLocalIntCoeffsPerPatch.

1174  {
1176  }
Array< OneD, unsigned int > m_numLocalIntCoeffsPerPatch
The number of int dofs per patch.
Definition: AssemblyMap.h:390
int Nektar::MultiRegions::AssemblyMap::GetNumNonDirEdgeModes ( ) const

Definition at line 791 of file AssemblyMap.cpp.

References v_GetNumNonDirEdgeModes().

792  {
793  return v_GetNumNonDirEdgeModes();
794  }
virtual int v_GetNumNonDirEdgeModes() const
int Nektar::MultiRegions::AssemblyMap::GetNumNonDirEdges ( ) const

Definition at line 811 of file AssemblyMap.cpp.

References v_GetNumNonDirEdges().

812  {
813  return v_GetNumNonDirEdges();
814  }
virtual int v_GetNumNonDirEdges() const
int Nektar::MultiRegions::AssemblyMap::GetNumNonDirFaceModes ( ) const

Definition at line 796 of file AssemblyMap.cpp.

References v_GetNumNonDirFaceModes().

797  {
798  return v_GetNumNonDirFaceModes();
799  }
virtual int v_GetNumNonDirFaceModes() const
int Nektar::MultiRegions::AssemblyMap::GetNumNonDirFaces ( ) const

Definition at line 816 of file AssemblyMap.cpp.

References v_GetNumNonDirFaces().

817  {
818  return v_GetNumNonDirFaces();
819  }
virtual int v_GetNumNonDirFaces() const
int Nektar::MultiRegions::AssemblyMap::GetNumNonDirVertexModes ( ) const

Definition at line 786 of file AssemblyMap.cpp.

References v_GetNumNonDirVertexModes().

787  {
788  return v_GetNumNonDirVertexModes();
789  }
virtual int v_GetNumNonDirVertexModes() const
int Nektar::MultiRegions::AssemblyMap::GetNumPatches ( ) const

Returns the number of patches in this static condensation level.

Definition at line 1160 of file AssemblyMap.cpp.

References m_numPatches.

Referenced by AssemblyMap().

1161  {
1162  return m_numPatches;
1163  }
int m_numPatches
The number of patches (~elements) in the current level.
Definition: AssemblyMap.h:386
const PatchMapSharedPtr & Nektar::MultiRegions::AssemblyMap::GetPatchMapFromPrevLevel ( void  ) const

Returns the patch map from the previous level of the multi-level static condensation.

Definition at line 1185 of file AssemblyMap.cpp.

References m_patchMapFromPrevLevel.

1187  {
1188  return m_patchMapFromPrevLevel;
1189  }
PatchMapSharedPtr m_patchMapFromPrevLevel
Mapping information for previous level in MultiLevel Solver.
Definition: AssemblyMap.h:408
PreconditionerType Nektar::MultiRegions::AssemblyMap::GetPreconType ( ) const

Definition at line 1202 of file AssemblyMap.cpp.

References m_preconType.

1203  {
1204  return m_preconType;
1205  }
PreconditionerType m_preconType
Type type of preconditioner to use in iterative solver.
Definition: AssemblyMap.h:368
bool Nektar::MultiRegions::AssemblyMap::GetSignChange ( )

Returns true if using a modal expansion requiring a change of sign of some modes.

Definition at line 842 of file AssemblyMap.cpp.

References m_signChange.

Referenced by AssemblyMap().

843  {
844  return m_signChange;
845  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
bool Nektar::MultiRegions::AssemblyMap::GetSingularSystem ( ) const

Retrieves if the system is singular (true) or not (false)

Definition at line 948 of file AssemblyMap.cpp.

References m_systemSingular.

949  {
950  return m_systemSingular;
951  }
bool m_systemSingular
Flag indicating if the system is singular or not.
Definition: AssemblyMap.h:320
int Nektar::MultiRegions::AssemblyMap::GetStaticCondLevel ( ) const

Returns the level of static condensation for this map.

Definition at line 1155 of file AssemblyMap.cpp.

References m_staticCondLevel.

Referenced by AssemblyMap().

1156  {
1157  return m_staticCondLevel;
1158  }
int m_staticCondLevel
The level of recursion in the case of multi-level static condensation.
Definition: AssemblyMap.h:384
int Nektar::MultiRegions::AssemblyMap::GetSuccessiveRHS ( ) const

Definition at line 1217 of file AssemblyMap.cpp.

References m_successiveRHS.

1218  {
1219  return m_successiveRHS;
1220  }
int m_successiveRHS
sucessive RHS for iterative solver
Definition: AssemblyMap.h:377
void Nektar::MultiRegions::AssemblyMap::GlobalToLocal ( const Array< OneD, const NekDouble > &  global,
Array< OneD, NekDouble > &  loc 
) const

Definition at line 734 of file AssemblyMap.cpp.

References v_GlobalToLocal().

Referenced by Nektar::MultiRegions::AssemblyMapCG::v_GlobalToLocal().

737  {
738  v_GlobalToLocal(global,loc);
739  }
virtual void v_GlobalToLocal(const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const
void Nektar::MultiRegions::AssemblyMap::GlobalToLocal ( const NekVector< NekDouble > &  global,
NekVector< NekDouble > &  loc 
) const

Definition at line 741 of file AssemblyMap.cpp.

References v_GlobalToLocal().

744  {
745  v_GlobalToLocal(global,loc);
746  }
virtual void v_GlobalToLocal(const Array< OneD, const NekDouble > &global, Array< OneD, NekDouble > &loc) const
void Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd ( const NekVector< NekDouble > &  global,
NekVector< NekDouble > &  loc,
int  offset 
) const

Definition at line 953 of file AssemblyMap.cpp.

References Nektar::NekVector< DataType >::GetPtr().

Referenced by GlobalToLocalBnd(), and Nektar::MultiRegions::AssemblyMapDG::v_GlobalToLocal().

957  {
958  GlobalToLocalBnd(global.GetPtr(), loc.GetPtr(), offset);
959  }
void GlobalToLocalBnd(const NekVector< NekDouble > &global, NekVector< NekDouble > &loc, int offset) const
Array< OneD, DataType > & GetPtr()
Definition: NekVector.cpp:230
void Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd ( const NekVector< NekDouble > &  global,
NekVector< NekDouble > &  loc 
) const

Definition at line 962 of file AssemblyMap.cpp.

References Nektar::NekVector< DataType >::GetPtr(), and GlobalToLocalBnd().

965  {
966  GlobalToLocalBnd(global.GetPtr(), loc.GetPtr());
967  }
void GlobalToLocalBnd(const NekVector< NekDouble > &global, NekVector< NekDouble > &loc, int offset) const
Array< OneD, DataType > & GetPtr()
Definition: NekVector.cpp:230
void Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd ( const Array< OneD, const NekDouble > &  global,
Array< OneD, NekDouble > &  loc,
int  offset 
) const

Definition at line 970 of file AssemblyMap.cpp.

References ASSERTL1, Vmath::Gathr(), m_localToGlobalBndMap, m_localToGlobalBndSign, m_numGlobalBndCoeffs, m_numLocalBndCoeffs, m_signChange, and Vmath::Vcopy().

973  {
974  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
975  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs-offset,"Global vector is not of correct dimension");
976 
977  // offset input data by length "offset" for Dirichlet boundary conditions.
979  Vmath::Vcopy(m_numGlobalBndCoeffs-offset, global.get(), 1, tmp.get() + offset, 1);
980 
981  if(m_signChange)
982  {
984  }
985  else
986  {
987  Vmath::Gathr(m_numLocalBndCoeffs, tmp.get(), m_localToGlobalBndMap.get(), loc.get());
988  }
989  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
void Gathr(int n, const T *x, const int *y, T *z)
Gather vector z[i] = x[y[i]].
Definition: Vmath.cpp:630
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:350
#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:1047
void Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd ( const Array< OneD, const NekDouble > &  global,
Array< OneD, NekDouble > &  loc 
) const

Definition at line 992 of file AssemblyMap.cpp.

References ASSERTL1, Vmath::Gathr(), m_localToGlobalBndMap, m_localToGlobalBndSign, m_numGlobalBndCoeffs, m_numLocalBndCoeffs, and m_signChange.

995  {
996  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
997  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs,"Global vector is not of correct dimension");
998 
999  if(m_signChange)
1000  {
1001  Vmath::Gathr(m_numLocalBndCoeffs, m_localToGlobalBndSign.get(), global.get(), m_localToGlobalBndMap.get(), loc.get());
1002  }
1003  else
1004  {
1005  Vmath::Gathr(m_numLocalBndCoeffs, global.get(), m_localToGlobalBndMap.get(), loc.get());
1006  }
1007  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
void Gathr(int n, const T *x, const int *y, T *z)
Gather vector z[i] = x[y[i]].
Definition: Vmath.cpp:630
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:350
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
void Nektar::MultiRegions::AssemblyMap::GlobalToLocalBndWithoutSign ( const Array< OneD, const NekDouble > &  global,
Array< OneD, NekDouble > &  loc 
)
protected

Definition at line 1222 of file AssemblyMap.cpp.

References ASSERTL1, Vmath::Gathr(), m_localToGlobalBndMap, m_numGlobalBndCoeffs, and m_numLocalBndCoeffs.

Referenced by AssemblyMap().

1225  {
1226  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
1227  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs,"Global vector is not of correct dimension");
1228 
1229  Vmath::Gathr(m_numLocalBndCoeffs, global.get(), m_localToGlobalBndMap.get(), loc.get());
1230  }
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
void Gathr(int n, const T *x, const int *y, T *z)
Gather vector z[i] = x[y[i]].
Definition: Vmath.cpp:630
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
boost::shared_ptr< AssemblyMap > Nektar::MultiRegions::AssemblyMap::LinearSpaceMap ( const ExpList locexp,
GlobalSysSolnType  solnType 
)

Definition at line 826 of file AssemblyMap.cpp.

References v_LinearSpaceMap().

827  {
828  return v_LinearSpaceMap(locexp, solnType);
829  }
virtual boost::shared_ptr< AssemblyMap > v_LinearSpaceMap(const ExpList &locexp, GlobalSysSolnType solnType)
Generate a linear space mapping from existing mapping.
void Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal ( const NekVector< NekDouble > &  loc,
NekVector< NekDouble > &  global,
int  offset 
) const

Definition at line 1009 of file AssemblyMap.cpp.

References Nektar::NekVector< DataType >::GetPtr().

Referenced by LocalBndToGlobal().

1013  {
1014  LocalBndToGlobal(loc.GetPtr(), global.GetPtr(), offset);
1015  }
void LocalBndToGlobal(const NekVector< NekDouble > &loc, NekVector< NekDouble > &global, int offset) const
Array< OneD, DataType > & GetPtr()
Definition: NekVector.cpp:230
void Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal ( const NekVector< NekDouble > &  loc,
NekVector< NekDouble > &  global 
) const

Definition at line 1042 of file AssemblyMap.cpp.

References Nektar::NekVector< DataType >::GetPtr(), and LocalBndToGlobal().

1045  {
1046  LocalBndToGlobal(loc.GetPtr(), global.GetPtr());
1047  }
void LocalBndToGlobal(const NekVector< NekDouble > &loc, NekVector< NekDouble > &global, int offset) const
Array< OneD, DataType > & GetPtr()
Definition: NekVector.cpp:230
void Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global,
int  offset 
) const

Definition at line 1018 of file AssemblyMap.cpp.

References ASSERTL1, m_localToGlobalBndMap, m_localToGlobalBndSign, m_numGlobalBndCoeffs, m_numLocalBndCoeffs, m_signChange, Vmath::Scatr(), UniversalAssembleBnd(), and Vmath::Vcopy().

1022  {
1023  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
1024  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs-offset,"Global vector is not of correct dimension");
1025 
1026  // offset input data by length "offset" for Dirichlet boundary conditions.
1028 
1029  if(m_signChange)
1030  {
1032  }
1033  else
1034  {
1035  Vmath::Scatr(m_numLocalBndCoeffs, loc.get(), m_localToGlobalBndMap.get(), tmp.get());
1036  }
1037 
1038  UniversalAssembleBnd(tmp);
1039  Vmath::Vcopy(m_numGlobalBndCoeffs-offset, tmp.get()+offset, 1, global.get(), 1);
1040  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
void Scatr(int n, const T *x, const int *y, T *z)
Scatter vector z[y[i]] = x[i].
Definition: Vmath.cpp:659
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:350
void UniversalAssembleBnd(Array< OneD, NekDouble > &pGlobal) const
#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:1047
void Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global 
) const

Definition at line 1050 of file AssemblyMap.cpp.

References ASSERTL1, m_localToGlobalBndMap, m_localToGlobalBndSign, m_numGlobalBndCoeffs, m_numLocalBndCoeffs, m_signChange, and Vmath::Scatr().

1053  {
1054  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
1055  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs,"Global vector is not of correct dimension");
1056 
1057  if(m_signChange)
1058  {
1059  Vmath::Scatr(m_numLocalBndCoeffs, m_localToGlobalBndSign.get(), loc.get(), m_localToGlobalBndMap.get(), global.get());
1060  }
1061  else
1062  {
1063  Vmath::Scatr(m_numLocalBndCoeffs, loc.get(), m_localToGlobalBndMap.get(), global.get());
1064  }
1065  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:345
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
void Scatr(int n, const T *x, const int *y, T *z)
Scatter vector z[y[i]] = x[i].
Definition: Vmath.cpp:659
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:350
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
void Nektar::MultiRegions::AssemblyMap::LocalToGlobal ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global 
) const

Definition at line 720 of file AssemblyMap.cpp.

References v_LocalToGlobal().

Referenced by Nektar::MultiRegions::AssemblyMapCG::v_LocalToGlobal().

723  {
724  v_LocalToGlobal(loc,global);
725  }
virtual void v_LocalToGlobal(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const
void Nektar::MultiRegions::AssemblyMap::LocalToGlobal ( const NekVector< NekDouble > &  loc,
NekVector< NekDouble > &  global 
) const

Definition at line 727 of file AssemblyMap.cpp.

References v_LocalToGlobal().

730  {
731  v_LocalToGlobal(loc,global);
732  }
virtual void v_LocalToGlobal(const Array< OneD, const NekDouble > &loc, Array< OneD, NekDouble > &global) const
void Nektar::MultiRegions::AssemblyMap::PrintStats ( std::ostream &  out,
std::string  variable 
) const

Definition at line 1232 of file AssemblyMap.cpp.

References Vmath::Assmb(), m_globalToUniversalBndMapUnique, m_localToGlobalBndMap, m_numGlobalBndCoeffs, m_numGlobalCoeffs, m_numGlobalDirBndCoeffs, m_numLocalBndCoeffs, m_numLocalCoeffs, m_numLocalDirBndCoeffs, m_session, Nektar::LibUtilities::ReduceMax, Nektar::LibUtilities::ReduceMin, Nektar::LibUtilities::ReduceSum, and UniversalAssembleBnd().

1234  {
1236  = m_session->GetComm()->GetRowComm();
1237  bool isRoot = vRowComm->GetRank() == 0;
1238  int n = vRowComm->GetSize();
1239  int i;
1240 
1241  // Determine number of global degrees of freedom.
1242  int globBndCnt = 0, globDirCnt = 0;
1243 
1244  for (i = 0; i < m_numGlobalBndCoeffs; ++i)
1245  {
1247  {
1248  globBndCnt++;
1249 
1250  if (i < m_numGlobalDirBndCoeffs)
1251  {
1252  globDirCnt++;
1253  }
1254  }
1255  }
1256 
1257  int globCnt = m_numGlobalCoeffs - m_numGlobalBndCoeffs + globBndCnt;
1258 
1259  // Calculate maximum valency
1261  Array<OneD, NekDouble> tmpGlob(m_numGlobalBndCoeffs, 0.0);
1262 
1263  Vmath::Assmb(m_numLocalBndCoeffs, tmpLoc.get(), m_localToGlobalBndMap.get(), tmpGlob.get());
1264  UniversalAssembleBnd(tmpGlob);
1265 
1266  int totGlobDof = globCnt;
1267  int totGlobBndDof = globBndCnt;
1268  int totGlobDirDof = globDirCnt;
1269  int totLocalDof = m_numLocalCoeffs;
1270  int totLocalBndDof = m_numLocalBndCoeffs;
1271  int totLocalDirDof = m_numLocalDirBndCoeffs;
1272 
1273  int meanValence = 0;
1274  int maxValence = 0;
1275  int minValence = 10000000;
1276  for (int i = 0; i < m_numGlobalBndCoeffs; ++i)
1277  {
1279  {
1280  continue;
1281  }
1282 
1283  if (tmpGlob[i] > maxValence)
1284  {
1285  maxValence = tmpGlob[i];
1286  }
1287  if (tmpGlob[i] < minValence)
1288  {
1289  minValence = tmpGlob[i];
1290  }
1291  meanValence += tmpGlob[i];
1292  }
1293 
1294  vRowComm->AllReduce(maxValence, LibUtilities::ReduceMax);
1295  vRowComm->AllReduce(minValence, LibUtilities::ReduceMin);
1296  vRowComm->AllReduce(meanValence, LibUtilities::ReduceSum);
1297  vRowComm->AllReduce(totGlobDof, LibUtilities::ReduceSum);
1298  vRowComm->AllReduce(totGlobBndDof, LibUtilities::ReduceSum);
1299  vRowComm->AllReduce(totGlobDirDof, LibUtilities::ReduceSum);
1300  vRowComm->AllReduce(totLocalDof, LibUtilities::ReduceSum);
1301  vRowComm->AllReduce(totLocalBndDof, LibUtilities::ReduceSum);
1302  vRowComm->AllReduce(totLocalDirDof, LibUtilities::ReduceSum);
1303 
1304  meanValence /= totGlobBndDof;
1305 
1306  if (isRoot)
1307  {
1308  out << "Assembly map statistics for field " << variable << ":"
1309  << endl;
1310  out << " - Number of local/global dof : "
1311  << totLocalDof << " " << totGlobDof << endl;
1312  out << " - Number of local/global boundary dof : "
1313  << totLocalBndDof << " " << totGlobBndDof << endl;
1314  out << " - Number of local/global Dirichlet dof : "
1315  << totLocalDirDof << " " << totGlobDirDof << endl;
1316  out << " - dof valency (min/max/mean) : "
1317  << minValence << " " << maxValence << " " << meanValence
1318  << endl;
1319 
1320  if (n > 1)
1321  {
1322  NekDouble mean = m_numLocalCoeffs, mean2 = mean * mean;
1323  NekDouble minval = mean, maxval = mean;
1324  Array<OneD, NekDouble> tmp(1);
1325 
1326  for (i = 1; i < n; ++i)
1327  {
1328  vRowComm->Recv(i, tmp);
1329  mean += tmp[0];
1330  mean2 += tmp[0]*tmp[0];
1331 
1332  if (tmp[0] > maxval)
1333  {
1334  maxval = tmp[0];
1335  }
1336  if (tmp[0] < minval)
1337  {
1338  minval = tmp[0];
1339  }
1340  }
1341 
1342  out << " - Local dof dist. (min/max/mean/dev) : "
1343  << minval << " " << maxval << " " << (mean / n) << " "
1344  << sqrt(mean2/n - mean*mean/n/n) << endl;
1345 
1346  vRowComm->Block();
1347 
1348  mean = minval = maxval = m_numLocalBndCoeffs;
1349  mean2 = mean * mean;
1350 
1351  for (i = 1; i < n; ++i)
1352  {
1353  vRowComm->Recv(i, tmp);
1354  mean += tmp[0];
1355  mean2 += tmp[0]*tmp[0];
1356 
1357  if (tmp[0] > maxval)
1358  {
1359  maxval = tmp[0];
1360  }
1361  if (tmp[0] < minval)
1362  {
1363  minval = tmp[0];
1364  }
1365  }
1366 
1367  out << " - Local bnd dof dist. (min/max/mean/dev) : "
1368  << minval << " " << maxval << " " << (mean / n) << " "
1369  << sqrt(mean2/n - mean*mean/n/n) << endl;
1370  }
1371  }
1372  else
1373  {
1374  Array<OneD, NekDouble> tmp(1);
1375  tmp[0] = m_numLocalCoeffs;
1376  vRowComm->Send(0, tmp);
1377  vRowComm->Block();
1378  tmp[0] = m_numLocalBndCoeffs;
1379  vRowComm->Send(0, tmp);
1380  }
1381  }
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
int m_numLocalCoeffs
Total number of local coefficients.
Definition: AssemblyMap.h:331
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
Definition: Comm.h:53
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:318
double NekDouble
void Assmb(int n, const T *x, const int *y, T *z)
Assemble z[y[i]] += x[i]; z should be zero'd first.
Definition: Vmath.cpp:695
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:348
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:316
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:312
LibUtilities::SessionReaderSharedPtr m_session
Session object.
Definition: AssemblyMap.h:303
Array< OneD, int > m_globalToUniversalBndMapUnique
Integer map of unique process coeffs to universal space (signed)
Definition: AssemblyMap.h:360
void UniversalAssembleBnd(Array< OneD, NekDouble > &pGlobal) const
int m_numGlobalCoeffs
Total number of global coefficients.
Definition: AssemblyMap.h:342
void Nektar::MultiRegions::AssemblyMap::SetNextLevelLocalToGlobalMap ( AssemblyMapSharedPtr  pNextLevelLocalToGlobalMap)
void Nektar::MultiRegions::AssemblyMap::UniversalAssemble ( Array< OneD, NekDouble > &  pGlobal) const
void Nektar::MultiRegions::AssemblyMap::UniversalAssemble ( NekVector< NekDouble > &  pGlobal) const

Definition at line 768 of file AssemblyMap.cpp.

References v_UniversalAssemble().

770  {
771  v_UniversalAssemble(pGlobal);
772  }
virtual void v_UniversalAssemble(Array< OneD, NekDouble > &pGlobal) const
void Nektar::MultiRegions::AssemblyMap::UniversalAssemble ( Array< OneD, NekDouble > &  pGlobal,
int  offset 
) const

Definition at line 774 of file AssemblyMap.cpp.

References v_UniversalAssemble().

777  {
778  v_UniversalAssemble(pGlobal, offset);
779  }
virtual void v_UniversalAssemble(Array< OneD, NekDouble > &pGlobal) const
void Nektar::MultiRegions::AssemblyMap::UniversalAssembleBnd ( Array< OneD, NekDouble > &  pGlobal) const

Definition at line 1126 of file AssemblyMap.cpp.

References ASSERTL1, Gs::Gather(), Gs::gs_add, m_bndGsh, and m_numGlobalBndCoeffs.

Referenced by AssembleBnd(), Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), LocalBndToGlobal(), PrintStats(), and UniversalAssembleBnd().

1128  {
1129  ASSERTL1(pGlobal.num_elements() == m_numGlobalBndCoeffs,
1130  "Wrong size.");
1131  Gs::Gather(pGlobal, Gs::gs_add, m_bndGsh);
1132  }
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:314
static void Gather(Nektar::Array< OneD, NekDouble > pU, gs_op pOp, gs_data *pGsh, Nektar::Array< OneD, NekDouble > pBuffer=NullNekDouble1DArray)
Performs a gather-scatter operation of the provided values.
Definition: GsLib.hpp:223
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
void Nektar::MultiRegions::AssemblyMap::UniversalAssembleBnd ( NekVector< NekDouble > &  pGlobal) const

Definition at line 1134 of file AssemblyMap.cpp.

References Nektar::NekVector< DataType >::GetPtr(), and UniversalAssembleBnd().

1136  {
1137  UniversalAssembleBnd(pGlobal.GetPtr());
1138  }
void UniversalAssembleBnd(Array< OneD, NekDouble > &pGlobal) const
Array< OneD, DataType > & GetPtr()
Definition: NekVector.cpp:230
void Nektar::MultiRegions::AssemblyMap::UniversalAssembleBnd ( Array< OneD, NekDouble > &  pGlobal,
int  offset 
) const

Definition at line 1140 of file AssemblyMap.cpp.

References UniversalAssembleBnd(), and Vmath::Vcopy().

1143  {
1144  Array<OneD, NekDouble> tmp(offset);
1145  if (offset > 0) Vmath::Vcopy(offset, pGlobal, 1, tmp, 1);
1146  UniversalAssembleBnd(pGlobal);
1147  if (offset > 0) Vmath::Vcopy(offset, tmp, 1, pGlobal, 1);
1148  }
void UniversalAssembleBnd(Array< OneD, NekDouble > &pGlobal) const
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
void Nektar::MultiRegions::AssemblyMap::v_Assemble ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global 
) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 571 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by Assemble().

574  {
575  ASSERTL0(false, "Not defined for this type of mapping.");
576  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::AssemblyMap::v_Assemble ( const NekVector< NekDouble > &  loc,
NekVector< NekDouble > &  global 
) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 578 of file AssemblyMap.cpp.

References ASSERTL0.

581  {
582  ASSERTL0(false, "Not defined for this type of mapping.");
583  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::v_GetExtraDirEdges ( )
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 655 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetExtraDirEdges().

656  {
657  ASSERTL0(false, "Not defined for this type of mapping.");
658  static Array<OneD, const int> result;
659  return result;
660  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetFullSystemBandWidth ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 607 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetFullSystemBandWidth().

608  {
609  ASSERTL0(false, "Not defined for this type of mapping.");
610  return 0;
611  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetGlobalToUniversalMap ( const int  i) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 497 of file AssemblyMap.cpp.

References ASSERTL0.

498  {
499  ASSERTL0(false, "Not defined for this type of mapping.");
500  return 0;
501  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::v_GetGlobalToUniversalMap ( void  )
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 516 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetGlobalToUniversalMap().

517  {
518  ASSERTL0(false, "Not defined for this type of mapping.");
519  static Array<OneD, const int> result;
520  return result;
521  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetGlobalToUniversalMapUnique ( const int  i) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 503 of file AssemblyMap.cpp.

References ASSERTL0.

504  {
505  ASSERTL0(false, "Not defined for this type of mapping.");
506  return 0;
507  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::v_GetGlobalToUniversalMapUnique ( void  )
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 523 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetGlobalToUniversalMapUnique().

524  {
525  ASSERTL0(false, "Not defined for this type of mapping.");
526  static Array<OneD, const int> result;
527  return result;
528  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetLocalToGlobalMap ( const int  i) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 491 of file AssemblyMap.cpp.

References ASSERTL0.

492  {
493  ASSERTL0(false, "Not defined for this type of mapping.");
494  return 0;
495  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::v_GetLocalToGlobalMap ( void  )
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 509 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetLocalToGlobalMap().

510  {
511  ASSERTL0(false, "Not defined for this type of mapping.");
512  static Array<OneD,const int> result;
513  return result;
514  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
NekDouble Nektar::MultiRegions::AssemblyMap::v_GetLocalToGlobalSign ( const int  i) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 530 of file AssemblyMap.cpp.

References ASSERTL0.

531  {
532  ASSERTL0(false, "Not defined for this type of mapping.");
533  return 0.0;
534  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
const Array< OneD, NekDouble > & Nektar::MultiRegions::AssemblyMap::v_GetLocalToGlobalSign ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 536 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetLocalToGlobalSign().

537  {
538  ASSERTL0(false, "Not defined for this type of mapping.");
539  static Array<OneD, NekDouble> result;
540  return result;
541  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetNumDirEdges ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 631 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumDirEdges().

632  {
633  ASSERTL0(false, "Not defined for this type of mapping.");
634  return 0;
635  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetNumDirFaces ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 637 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumDirFaces().

638  {
639  ASSERTL0(false, "Not defined for this type of mapping.");
640  return 0;
641  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetNumNonDirEdgeModes ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 619 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirEdgeModes().

620  {
621  ASSERTL0(false, "Not defined for this type of mapping.");
622  return 0;
623  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetNumNonDirEdges ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 643 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirEdges().

644  {
645  ASSERTL0(false, "Not defined for this type of mapping.");
646  return 0;
647  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetNumNonDirFaceModes ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 625 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirFaceModes().

626  {
627  ASSERTL0(false, "Not defined for this type of mapping.");
628  return 0;
629  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetNumNonDirFaces ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 649 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirFaces().

650  {
651  ASSERTL0(false, "Not defined for this type of mapping.");
652  return 0;
653  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int Nektar::MultiRegions::AssemblyMap::v_GetNumNonDirVertexModes ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 613 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirVertexModes().

614  {
615  ASSERTL0(false, "Not defined for this type of mapping.");
616  return 0;
617  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::AssemblyMap::v_GlobalToLocal ( const Array< OneD, const NekDouble > &  global,
Array< OneD, NekDouble > &  loc 
) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 557 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GlobalToLocal().

560  {
561  ASSERTL0(false, "Not defined for this type of mapping.");
562  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::AssemblyMap::v_GlobalToLocal ( const NekVector< NekDouble > &  global,
NekVector< NekDouble > &  loc 
) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 564 of file AssemblyMap.cpp.

References ASSERTL0.

567  {
568  ASSERTL0(false, "Not defined for this type of mapping.");
569  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
boost::shared_ptr< AssemblyMap > Nektar::MultiRegions::AssemblyMap::v_LinearSpaceMap ( const ExpList locexp,
GlobalSysSolnType  solnType 
)
privatevirtual

Generate a linear space mapping from existing mapping.

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 662 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by LinearSpaceMap().

664  {
665  ASSERTL0(false, "Not defined for this sub class");
666  static boost::shared_ptr<AssemblyMap> result;
667  return result;
668  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::AssemblyMap::v_LocalToGlobal ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global 
) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 543 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by LocalToGlobal().

546  {
547  ASSERTL0(false, "Not defined for this type of mapping.");
548  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::AssemblyMap::v_LocalToGlobal ( const NekVector< NekDouble > &  loc,
NekVector< NekDouble > &  global 
) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 550 of file AssemblyMap.cpp.

References ASSERTL0.

553  {
554  ASSERTL0(false, "Not defined for this type of mapping.");
555  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::AssemblyMap::v_UniversalAssemble ( Array< OneD, NekDouble > &  pGlobal) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 585 of file AssemblyMap.cpp.

Referenced by UniversalAssemble().

587  {
588  // Do nothing here since multi-level static condensation uses a
589  // AssemblyMap and thus will call this routine in serial.
590  }
void Nektar::MultiRegions::AssemblyMap::v_UniversalAssemble ( NekVector< NekDouble > &  pGlobal) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG, and Nektar::MultiRegions::AssemblyMapDG.

Definition at line 592 of file AssemblyMap.cpp.

594  {
595  // Do nothing here since multi-level static condensation uses a
596  // AssemblyMap and thus will call this routine in serial.
597  }
void Nektar::MultiRegions::AssemblyMap::v_UniversalAssemble ( Array< OneD, NekDouble > &  pGlobal,
int  offset 
) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 599 of file AssemblyMap.cpp.

602  {
603  // Do nothing here since multi-level static condensation uses a
604  // AssemblyMap and thus will call this routine in serial.
605  }

Member Data Documentation

Array<OneD,int> Nektar::MultiRegions::AssemblyMap::m_bndCondCoeffsToGlobalCoeffsMap
protected
Array<OneD,NekDouble> Nektar::MultiRegions::AssemblyMap::m_bndCondCoeffsToGlobalCoeffsSign
protected

Integer map of bnd cond coeffs to global coefficients.

Definition at line 354 of file AssemblyMap.h.

Referenced by Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), and GetBndCondCoeffsToGlobalCoeffsSign().

Array<OneD,int> Nektar::MultiRegions::AssemblyMap::m_bndCondTraceToGlobalTraceMap
protected

Integer map of bnd cond trace number to global trace number.

Definition at line 356 of file AssemblyMap.h.

Referenced by Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), and GetBndCondTraceToGlobalTraceMap().

Gs::gs_data* Nektar::MultiRegions::AssemblyMap::m_bndGsh
protected
int Nektar::MultiRegions::AssemblyMap::m_bndSystemBandWidth
protected

The bandwith of the global bnd system.

Definition at line 365 of file AssemblyMap.h.

Referenced by CalculateBndSystemBandWidth(), and GetBndSystemBandWidth().

LibUtilities::CommSharedPtr Nektar::MultiRegions::AssemblyMap::m_comm
protected
Array<OneD,int> Nektar::MultiRegions::AssemblyMap::m_globalToUniversalBndMap
protected
Array<OneD,int> Nektar::MultiRegions::AssemblyMap::m_globalToUniversalBndMapUnique
protected
Gs::gs_data* Nektar::MultiRegions::AssemblyMap::m_gsh
protected
size_t Nektar::MultiRegions::AssemblyMap::m_hash
protected
NekDouble Nektar::MultiRegions::AssemblyMap::m_iterativeTolerance
protected

Tolerance for iterative solver.

Definition at line 374 of file AssemblyMap.h.

Referenced by AssemblyMap(), and GetIterativeTolerance().

Array<OneD,int> Nektar::MultiRegions::AssemblyMap::m_localToGlobalBndMap
protected
Array<OneD,NekDouble> Nektar::MultiRegions::AssemblyMap::m_localToGlobalBndSign
protected
int Nektar::MultiRegions::AssemblyMap::m_lowestStaticCondLevel
protected
int Nektar::MultiRegions::AssemblyMap::m_maxIterations
protected

Maximum iterations for iterative solver.

Definition at line 371 of file AssemblyMap.h.

Referenced by AssemblyMap(), and GetMaxIterations().

AssemblyMapSharedPtr Nektar::MultiRegions::AssemblyMap::m_nextLevelLocalToGlobalMap
protected

Map from the patches of the previous level to the patches of the current level.

The local to global mapping of the next level of recursion

Definition at line 395 of file AssemblyMap.h.

Referenced by AssemblyMap(), Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), AtLastLevel(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), and GetNextLevelLocalToGlobalMap().

int Nektar::MultiRegions::AssemblyMap::m_numGlobalBndCoeffs
protected
int Nektar::MultiRegions::AssemblyMap::m_numGlobalCoeffs
protected

Total number of global coefficients.

This corresponds to the number of total number of coefficients

  • For CG this corresponds to the total of bnd + int DOFs.
  • For DG this corresponds to the number of bnd DOFs. This means that m_numGlobalCoeffs = m_numGlobalBndCoeffs This way, we can consider the trace-system solve as a statically condensed solve without interior DOFs. This allows us to use the same global system solver for both cases.

Definition at line 342 of file AssemblyMap.h.

Referenced by AssemblyMap(), Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), GetNumGlobalCoeffs(), PrintStats(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::MultiRegions::AssemblyMapCG::v_Assemble(), and Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap().

int Nektar::MultiRegions::AssemblyMap::m_numGlobalDirBndCoeffs
protected
int Nektar::MultiRegions::AssemblyMap::m_numLocalBndCoeffs
protected
Array<OneD, unsigned int> Nektar::MultiRegions::AssemblyMap::m_numLocalBndCoeffsPerPatch
protected
int Nektar::MultiRegions::AssemblyMap::m_numLocalCoeffs
protected

Total number of local coefficients.

This corresponds to the number of total number of coefficients

  • For CG this corresponds to the total of bnd + int DOFs
  • For DG this corresponds to the number of bnd DOFs. This means that m_numLocalCoeffs = m_numLocalBndCoeffs This way, we can consider the trace-system solve as a statically condensed solve without interior DOFs. This allows us to use the same global system solver for both cases.

Definition at line 331 of file AssemblyMap.h.

Referenced by Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), Nektar::MultiRegions::AssemblyMapCG::CalculateFullSystemBandWidth(), Nektar::CoupledAssemblyMap::CoupledAssemblyMap(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), GetNumLocalCoeffs(), PrintStats(), Nektar::MultiRegions::AssemblyMapCG::v_Assemble(), Nektar::MultiRegions::AssemblyMapCG::v_GlobalToLocal(), and Nektar::MultiRegions::AssemblyMapCG::v_LocalToGlobal().

int Nektar::MultiRegions::AssemblyMap::m_numLocalDirBndCoeffs
protected
Array<OneD, unsigned int> Nektar::MultiRegions::AssemblyMap::m_numLocalIntCoeffsPerPatch
protected
int Nektar::MultiRegions::AssemblyMap::m_numPatches
protected
PatchMapSharedPtr Nektar::MultiRegions::AssemblyMap::m_patchMapFromPrevLevel
private

Mapping information for previous level in MultiLevel Solver.

Definition at line 408 of file AssemblyMap.h.

Referenced by AssemblyMap(), and GetPatchMapFromPrevLevel().

PreconditionerType Nektar::MultiRegions::AssemblyMap::m_preconType
protected

Type type of preconditioner to use in iterative solver.

Definition at line 368 of file AssemblyMap.h.

Referenced by AssemblyMap(), and GetPreconType().

LibUtilities::SessionReaderSharedPtr Nektar::MultiRegions::AssemblyMap::m_session
protected
bool Nektar::MultiRegions::AssemblyMap::m_signChange
protected
GlobalSysSolnType Nektar::MultiRegions::AssemblyMap::m_solnType
protected
int Nektar::MultiRegions::AssemblyMap::m_staticCondLevel
protected
int Nektar::MultiRegions::AssemblyMap::m_successiveRHS
protected

sucessive RHS for iterative solver

Definition at line 377 of file AssemblyMap.h.

Referenced by AssemblyMap(), and GetSuccessiveRHS().

bool Nektar::MultiRegions::AssemblyMap::m_systemSingular
protected