Nektar++
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 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...
 
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< AssemblyMapv_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:313
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: AssemblyMap.h:305
int m_successiveRHS
sucessive RHS for iterative solver
Definition: AssemblyMap.h:373
size_t m_hash
Hash for map.
Definition: AssemblyMap.h:308
int m_bndSystemBandWidth
The bandwith of the global bnd system.
Definition: AssemblyMap.h:364
GlobalSysSolnType m_solnType
The solution type of the global system.
Definition: AssemblyMap.h:362
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:317
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:315
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
LibUtilities::SessionReaderSharedPtr m_session
Session object.
Definition: AssemblyMap.h:302
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_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,"SuccessiveRHS"))
147  {
148  m_successiveRHS = boost::lexical_cast<int>(
149  pSession->GetGlobalSysSolnInfo(variable,
150  "SuccessiveRHS").c_str());
151  }
152  else
153  {
154  pSession->LoadParameter("SuccessiveRHS",
155  m_successiveRHS,0);
156  }
157 
158  }
PreconditionerType m_preconType
Type type of preconditioner to use in iterative solver.
Definition: AssemblyMap.h:367
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: AssemblyMap.h:305
static const NekDouble kNekIterativeTol
int m_successiveRHS
sucessive RHS for iterative solver
Definition: AssemblyMap.h:373
size_t m_hash
Hash for map.
Definition: AssemblyMap.h:308
int m_bndSystemBandWidth
The bandwith of the global bnd system.
Definition: AssemblyMap.h:364
NekDouble m_iterativeTolerance
Tolerance for iterative solver.
Definition: AssemblyMap.h:370
GlobalSysSolnType m_solnType
The solution type of the global system.
Definition: AssemblyMap.h:362
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:317
double NekDouble
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:315
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
LibUtilities::SessionReaderSharedPtr m_session
Session object.
Definition: AssemblyMap.h:302
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 164 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.

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

Destructor.

Definition at line 419 of file AssemblyMap.cpp.

420  {
421  }

Member Function Documentation

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

Definition at line 732 of file AssemblyMap.cpp.

References v_Assemble().

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

735  {
736  v_Assemble(loc,global);
737  }
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 739 of file AssemblyMap.cpp.

References v_Assemble().

742  {
743  v_Assemble(loc,global);
744  }
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 1052 of file AssemblyMap.cpp.

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

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

1055  {
1056  AssembleBnd(loc.GetPtr(), global.GetPtr(), offset);
1057  }
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 1060 of file AssemblyMap.cpp.

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

1063  {
1064  AssembleBnd(loc.GetPtr(), global.GetPtr());
1065  }
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 1068 of file AssemblyMap.cpp.

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

1071  {
1072  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local array is not of correct dimension");
1073  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs-offset,"Global array is not of correct dimension");
1075 
1076  if(m_signChange)
1077  {
1079  }
1080  else
1081  {
1082  Vmath::Assmb(m_numLocalBndCoeffs,loc.get(), m_localToGlobalBndMap.get(), tmp.get());
1083  }
1084  UniversalAssembleBnd(tmp);
1085  Vmath::Vcopy(m_numGlobalBndCoeffs-offset, tmp.get() + offset, 1, global.get(), 1);
1086  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:344
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
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:686
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:347
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:349
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:165
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1016
void Nektar::MultiRegions::AssemblyMap::AssembleBnd ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global 
) const

Definition at line 1089 of file AssemblyMap.cpp.

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

1092  {
1093  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
1094  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs,"Global vector is not of correct dimension");
1095 
1096  Vmath::Zero(m_numGlobalBndCoeffs, global.get(), 1);
1097 
1098  if(m_signChange)
1099  {
1101  loc.get(), m_localToGlobalBndMap.get(), global.get());
1102  }
1103  else
1104  {
1105  Vmath::Assmb(m_numLocalBndCoeffs,loc.get(), m_localToGlobalBndMap.get(), global.get());
1106  }
1107  UniversalAssembleBnd(global);
1108  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:344
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
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:686
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:347
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:349
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:165
bool Nektar::MultiRegions::AssemblyMap::AtLastLevel ( ) const

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

Definition at line 1175 of file AssemblyMap.cpp.

References m_nextLevelLocalToGlobalMap.

1176  {
1177  return !( m_nextLevelLocalToGlobalMap.get() );
1178  }
AssemblyMapSharedPtr m_nextLevelLocalToGlobalMap
Map from the patches of the previous level to the patches of the current level.
Definition: AssemblyMap.h:391
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 438 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().

439  {
440  int i,j;
441  int cnt = 0;
442  int locSize;
443  int maxId;
444  int minId;
445  int bwidth = -1;
446  for(i = 0; i < m_numPatches; ++i)
447  {
448  locSize = m_numLocalBndCoeffsPerPatch[i];
449  maxId = -1;
450  minId = m_numLocalBndCoeffs+1;
451  for(j = 0; j < locSize; j++)
452  {
454  {
455  if(m_localToGlobalBndMap[cnt+j] > maxId)
456  {
457  maxId = m_localToGlobalBndMap[cnt+j];
458  }
459 
460  if(m_localToGlobalBndMap[cnt+j] < minId)
461  {
462  minId = m_localToGlobalBndMap[cnt+j];
463  }
464  }
465  }
466  bwidth = (bwidth>(maxId-minId))?bwidth:(maxId-minId);
467 
468  cnt+=locSize;
469  }
470 
471  m_bndSystemBandWidth = bwidth;
472  }
int m_bndSystemBandWidth
The bandwith of the global bnd system.
Definition: AssemblyMap.h:364
Array< OneD, unsigned int > m_numLocalBndCoeffsPerPatch
The number of bnd dofs per patch.
Definition: AssemblyMap.h:384
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:317
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:347
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
int m_numPatches
The number of patches (~elements) in the current level.
Definition: AssemblyMap.h:382
int Nektar::MultiRegions::AssemblyMap::GetBndCondCoeffsToGlobalCoeffsMap ( const int  i)

Retrieves the global index corresponding to a boundary expansion mode.

Definition at line 861 of file AssemblyMap.cpp.

References m_bndCondCoeffsToGlobalCoeffsMap.

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

Retrieves the global indices corresponding to the boundary expansion modes.

Definition at line 895 of file AssemblyMap.cpp.

References m_bndCondCoeffsToGlobalCoeffsMap.

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

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

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

Definition at line 882 of file AssemblyMap.cpp.

References m_bndCondCoeffsToGlobalCoeffsSign, and m_signChange.

883  {
884  if(m_signChange)
885  {
887  }
888  else
889  {
890  return 1.0;
891  }
892  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:344
Array< OneD, NekDouble > m_bndCondCoeffsToGlobalCoeffsSign
Integer map of bnd cond coeffs to global coefficients.
Definition: AssemblyMap.h:353
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 868 of file AssemblyMap.cpp.

References ASSERTL1, and m_bndCondTraceToGlobalTraceMap.

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

Definition at line 877 of file AssemblyMap.cpp.

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

Returns the bandwidth of the boundary system.

Definition at line 1134 of file AssemblyMap.cpp.

References m_bndSystemBandWidth.

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

1135  {
1136  return m_bndSystemBandWidth;
1137  }
int m_bndSystemBandWidth
The bandwith of the global bnd system.
Definition: AssemblyMap.h:364
LibUtilities::CommSharedPtr Nektar::MultiRegions::AssemblyMap::GetComm ( )

Retrieves the communicator.

Definition at line 654 of file AssemblyMap.cpp.

References m_comm.

655  {
656  return m_comm;
657  }
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: AssemblyMap.h:305
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetExtraDirEdges ( )

Definition at line 805 of file AssemblyMap.cpp.

References v_GetExtraDirEdges().

806  {
807  return v_GetExtraDirEdges();
808  }
virtual const Array< OneD, const int > & v_GetExtraDirEdges()
int Nektar::MultiRegions::AssemblyMap::GetFullSystemBandWidth ( ) const

Definition at line 765 of file AssemblyMap.cpp.

References v_GetFullSystemBandWidth().

766  {
767  return v_GetFullSystemBandWidth();
768  }
virtual int v_GetFullSystemBandWidth() const
GlobalSysSolnType Nektar::MultiRegions::AssemblyMap::GetGlobalSysSolnType ( ) const

Returns the method of solving global systems.

Definition at line 1181 of file AssemblyMap.cpp.

References m_solnType.

Referenced by AssemblyMap().

1182  {
1183  return m_solnType;
1184  }
GlobalSysSolnType m_solnType
The solution type of the global system.
Definition: AssemblyMap.h:362
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetGlobalToUniversalBndMap ( )

Definition at line 838 of file AssemblyMap.cpp.

References m_globalToUniversalBndMap.

Referenced by AssemblyMap().

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

Definition at line 843 of file AssemblyMap.cpp.

References m_globalToUniversalBndMapUnique.

Referenced by AssemblyMap().

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

Definition at line 669 of file AssemblyMap.cpp.

References v_GetGlobalToUniversalMap().

670  {
671  return v_GetGlobalToUniversalMap(i);
672  }
virtual const Array< OneD, const int > & v_GetGlobalToUniversalMap()
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetGlobalToUniversalMap ( )

Definition at line 684 of file AssemblyMap.cpp.

References v_GetGlobalToUniversalMap().

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

Definition at line 674 of file AssemblyMap.cpp.

References v_GetGlobalToUniversalMapUnique().

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

Definition at line 689 of file AssemblyMap.cpp.

References v_GetGlobalToUniversalMapUnique().

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

Retrieves the hash of this map.

Definition at line 659 of file AssemblyMap.cpp.

References m_hash.

660  {
661  return m_hash;
662  }
size_t m_hash
Hash for map.
Definition: AssemblyMap.h:308
NekDouble Nektar::MultiRegions::AssemblyMap::GetIterativeTolerance ( ) const

Definition at line 1191 of file AssemblyMap.cpp.

References m_iterativeTolerance.

1192  {
1193  return m_iterativeTolerance;
1194  }
NekDouble m_iterativeTolerance
Tolerance for iterative solver.
Definition: AssemblyMap.h:370
int Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalBndMap ( const int  i) const

Retrieve the global index of a given local boundary mode.

Definition at line 815 of file AssemblyMap.cpp.

References m_localToGlobalBndMap.

Referenced by AssemblyMap().

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

Retrieve the global indices of the local boundary modes.

Definition at line 821 of file AssemblyMap.cpp.

References m_localToGlobalBndMap.

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

Retrieve the sign change of a given local boundary mode.

Definition at line 848 of file AssemblyMap.cpp.

References m_localToGlobalBndSign, and m_signChange.

Referenced by AssemblyMap().

849  {
850  if(m_signChange)
851  {
852  return m_localToGlobalBndSign[i];
853  }
854  else
855  {
856  return 1.0;
857  }
858  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:344
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:349
Array< OneD, const NekDouble > Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalBndSign ( void  ) const

Retrieve the sign change for all local boundary modes.

Definition at line 833 of file AssemblyMap.cpp.

References m_localToGlobalBndSign.

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

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

Definition at line 664 of file AssemblyMap.cpp.

References v_GetLocalToGlobalMap().

665  {
666  return v_GetLocalToGlobalMap(i);
667  }
virtual const Array< OneD, const int > & v_GetLocalToGlobalMap()
const Array< OneD, const int > & Nektar::MultiRegions::AssemblyMap::GetLocalToGlobalMap ( )

Definition at line 679 of file AssemblyMap.cpp.

References v_GetLocalToGlobalMap().

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

Definition at line 694 of file AssemblyMap.cpp.

References v_GetLocalToGlobalSign().

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

Definition at line 699 of file AssemblyMap.cpp.

References v_GetLocalToGlobalSign().

700  {
701  return v_GetLocalToGlobalSign();
702  }
virtual const Array< OneD, NekDouble > & v_GetLocalToGlobalSign() const
int Nektar::MultiRegions::AssemblyMap::GetLowestStaticCondLevel ( ) const
inline

Definition at line 295 of file AssemblyMap.h.

References m_lowestStaticCondLevel.

296  {
298  }
int m_lowestStaticCondLevel
Lowest static condensation level.
Definition: AssemblyMap.h:393
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 1163 of file AssemblyMap.cpp.

References m_nextLevelLocalToGlobalMap.

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

Definition at line 785 of file AssemblyMap.cpp.

References v_GetNumDirEdges().

786  {
787  return v_GetNumDirEdges();
788  }
virtual int v_GetNumDirEdges() const
int Nektar::MultiRegions::AssemblyMap::GetNumDirFaces ( ) const

Definition at line 790 of file AssemblyMap.cpp.

References v_GetNumDirFaces().

791  {
792  return v_GetNumDirFaces();
793  }
virtual int v_GetNumDirFaces() const
int Nektar::MultiRegions::AssemblyMap::GetNumGlobalBndCoeffs ( ) const

Returns the total number of global boundary coefficients.

Definition at line 917 of file AssemblyMap.cpp.

References m_numGlobalBndCoeffs.

Referenced by AssemblyMap().

918  {
919  return m_numGlobalBndCoeffs;
920  }
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
int Nektar::MultiRegions::AssemblyMap::GetNumGlobalCoeffs ( ) const

Returns the total number of global coefficients.

Definition at line 927 of file AssemblyMap.cpp.

References m_numGlobalCoeffs.

928  {
929  return m_numGlobalCoeffs;
930  }
int m_numGlobalCoeffs
Total number of global coefficients.
Definition: AssemblyMap.h:341
int Nektar::MultiRegions::AssemblyMap::GetNumGlobalDirBndCoeffs ( ) const

Returns the number of global Dirichlet boundary coefficients.

Definition at line 901 of file AssemblyMap.cpp.

References m_numGlobalDirBndCoeffs.

Referenced by AssemblyMap().

902  {
904  }
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:317
int Nektar::MultiRegions::AssemblyMap::GetNumLocalBndCoeffs ( ) const

Returns the total number of local boundary coefficients.

Definition at line 912 of file AssemblyMap.cpp.

References m_numLocalBndCoeffs.

Referenced by AssemblyMap().

913  {
914  return m_numLocalBndCoeffs;
915  }
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
const Array< OneD, const unsigned int > & Nektar::MultiRegions::AssemblyMap::GetNumLocalBndCoeffsPerPatch ( )

Returns the number of local boundary coefficients in each patch.

Definition at line 1150 of file AssemblyMap.cpp.

References m_numLocalBndCoeffsPerPatch.

Referenced by AssemblyMap().

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

Returns the total number of local coefficients.

Definition at line 922 of file AssemblyMap.cpp.

References m_numLocalCoeffs.

923  {
924  return m_numLocalCoeffs;
925  }
int m_numLocalCoeffs
Total number of local coefficients.
Definition: AssemblyMap.h:330
int Nektar::MultiRegions::AssemblyMap::GetNumLocalDirBndCoeffs ( ) const

Returns the number of local Dirichlet boundary coefficients.

Definition at line 907 of file AssemblyMap.cpp.

References m_numLocalDirBndCoeffs.

Referenced by AssemblyMap().

908  {
909  return m_numLocalDirBndCoeffs;
910  }
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:315
const Array< OneD, const unsigned int > & Nektar::MultiRegions::AssemblyMap::GetNumLocalIntCoeffsPerPatch ( )

Returns the number of local interior coefficients in each patch.

Definition at line 1157 of file AssemblyMap.cpp.

References m_numLocalIntCoeffsPerPatch.

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

Definition at line 775 of file AssemblyMap.cpp.

References v_GetNumNonDirEdgeModes().

776  {
777  return v_GetNumNonDirEdgeModes();
778  }
virtual int v_GetNumNonDirEdgeModes() const
int Nektar::MultiRegions::AssemblyMap::GetNumNonDirEdges ( ) const

Definition at line 795 of file AssemblyMap.cpp.

References v_GetNumNonDirEdges().

796  {
797  return v_GetNumNonDirEdges();
798  }
virtual int v_GetNumNonDirEdges() const
int Nektar::MultiRegions::AssemblyMap::GetNumNonDirFaceModes ( ) const

Definition at line 780 of file AssemblyMap.cpp.

References v_GetNumNonDirFaceModes().

781  {
782  return v_GetNumNonDirFaceModes();
783  }
virtual int v_GetNumNonDirFaceModes() const
int Nektar::MultiRegions::AssemblyMap::GetNumNonDirFaces ( ) const

Definition at line 800 of file AssemblyMap.cpp.

References v_GetNumNonDirFaces().

801  {
802  return v_GetNumNonDirFaces();
803  }
virtual int v_GetNumNonDirFaces() const
int Nektar::MultiRegions::AssemblyMap::GetNumNonDirVertexModes ( ) const

Definition at line 770 of file AssemblyMap.cpp.

References v_GetNumNonDirVertexModes().

771  {
772  return v_GetNumNonDirVertexModes();
773  }
virtual int v_GetNumNonDirVertexModes() const
int Nektar::MultiRegions::AssemblyMap::GetNumPatches ( ) const

Returns the number of patches in this static condensation level.

Definition at line 1144 of file AssemblyMap.cpp.

References m_numPatches.

Referenced by AssemblyMap().

1145  {
1146  return m_numPatches;
1147  }
int m_numPatches
The number of patches (~elements) in the current level.
Definition: AssemblyMap.h:382
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 1169 of file AssemblyMap.cpp.

References m_patchMapFromPrevLevel.

1171  {
1172  return m_patchMapFromPrevLevel;
1173  }
PatchMapSharedPtr m_patchMapFromPrevLevel
Mapping information for previous level in MultiLevel Solver.
Definition: AssemblyMap.h:404
PreconditionerType Nektar::MultiRegions::AssemblyMap::GetPreconType ( ) const

Definition at line 1186 of file AssemblyMap.cpp.

References m_preconType.

1187  {
1188  return m_preconType;
1189  }
PreconditionerType m_preconType
Type type of preconditioner to use in iterative solver.
Definition: AssemblyMap.h:367
bool Nektar::MultiRegions::AssemblyMap::GetSignChange ( )

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

Definition at line 826 of file AssemblyMap.cpp.

References m_signChange.

Referenced by AssemblyMap().

827  {
828  return m_signChange;
829  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:344
bool Nektar::MultiRegions::AssemblyMap::GetSingularSystem ( ) const

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

Definition at line 932 of file AssemblyMap.cpp.

References m_systemSingular.

933  {
934  return m_systemSingular;
935  }
bool m_systemSingular
Flag indicating if the system is singular or not.
Definition: AssemblyMap.h:319
int Nektar::MultiRegions::AssemblyMap::GetStaticCondLevel ( ) const

Returns the level of static condensation for this map.

Definition at line 1139 of file AssemblyMap.cpp.

References m_staticCondLevel.

Referenced by AssemblyMap().

1140  {
1141  return m_staticCondLevel;
1142  }
int m_staticCondLevel
The level of recursion in the case of multi-level static condensation.
Definition: AssemblyMap.h:380
int Nektar::MultiRegions::AssemblyMap::GetSuccessiveRHS ( ) const

Definition at line 1196 of file AssemblyMap.cpp.

References m_successiveRHS.

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

Definition at line 718 of file AssemblyMap.cpp.

References v_GlobalToLocal().

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

721  {
722  v_GlobalToLocal(global,loc);
723  }
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 725 of file AssemblyMap.cpp.

References v_GlobalToLocal().

728  {
729  v_GlobalToLocal(global,loc);
730  }
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 937 of file AssemblyMap.cpp.

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

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

941  {
942  GlobalToLocalBnd(global.GetPtr(), loc.GetPtr(), offset);
943  }
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 946 of file AssemblyMap.cpp.

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

949  {
950  GlobalToLocalBnd(global.GetPtr(), loc.GetPtr());
951  }
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 954 of file AssemblyMap.cpp.

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

957  {
958  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
959  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs-offset,"Global vector is not of correct dimension");
960 
961  // offset input data by length "offset" for Dirichlet boundary conditions.
963  Vmath::Vcopy(m_numGlobalBndCoeffs-offset, global.get(), 1, tmp.get() + offset, 1);
964 
965  if(m_signChange)
966  {
968  }
969  else
970  {
971  Vmath::Gathr(m_numLocalBndCoeffs, tmp.get(), m_localToGlobalBndMap.get(), loc.get());
972  }
973  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:344
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
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:347
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:349
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:165
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1016
void Nektar::MultiRegions::AssemblyMap::GlobalToLocalBnd ( const Array< OneD, const NekDouble > &  global,
Array< OneD, NekDouble > &  loc 
) const

Definition at line 976 of file AssemblyMap.cpp.

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

979  {
980  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
981  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs,"Global vector is not of correct dimension");
982 
983  if(m_signChange)
984  {
985  Vmath::Gathr(m_numLocalBndCoeffs, m_localToGlobalBndSign.get(), global.get(), m_localToGlobalBndMap.get(), loc.get());
986  }
987  else
988  {
989  Vmath::Gathr(m_numLocalBndCoeffs, global.get(), m_localToGlobalBndMap.get(), loc.get());
990  }
991  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:344
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
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:347
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:349
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:165
void Nektar::MultiRegions::AssemblyMap::GlobalToLocalBndWithoutSign ( const Array< OneD, const NekDouble > &  global,
Array< OneD, NekDouble > &  loc 
)
protected

Definition at line 1201 of file AssemblyMap.cpp.

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

Referenced by AssemblyMap().

1204  {
1205  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
1206  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs,"Global vector is not of correct dimension");
1207 
1208  Vmath::Gathr(m_numLocalBndCoeffs, global.get(), m_localToGlobalBndMap.get(), loc.get());
1209  }
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
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:347
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:165
boost::shared_ptr< AssemblyMap > Nektar::MultiRegions::AssemblyMap::LinearSpaceMap ( const ExpList locexp,
GlobalSysSolnType  solnType 
)

Definition at line 810 of file AssemblyMap.cpp.

References v_LinearSpaceMap().

811  {
812  return v_LinearSpaceMap(locexp, solnType);
813  }
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 993 of file AssemblyMap.cpp.

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

Referenced by LocalBndToGlobal().

997  {
998  LocalBndToGlobal(loc.GetPtr(), global.GetPtr(), offset);
999  }
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 1026 of file AssemblyMap.cpp.

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

1029  {
1030  LocalBndToGlobal(loc.GetPtr(), global.GetPtr());
1031  }
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 1002 of file AssemblyMap.cpp.

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

1006  {
1007  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
1008  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs-offset,"Global vector is not of correct dimension");
1009 
1010  // offset input data by length "offset" for Dirichlet boundary conditions.
1012 
1013  if(m_signChange)
1014  {
1016  }
1017  else
1018  {
1019  Vmath::Scatr(m_numLocalBndCoeffs, loc.get(), m_localToGlobalBndMap.get(), tmp.get());
1020  }
1021 
1022  UniversalAssembleBnd(tmp);
1023  Vmath::Vcopy(m_numGlobalBndCoeffs-offset, tmp.get()+offset, 1, global.get(), 1);
1024  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:344
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
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:347
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:349
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:165
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1016
void Nektar::MultiRegions::AssemblyMap::LocalBndToGlobal ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global 
) const

Definition at line 1034 of file AssemblyMap.cpp.

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

1037  {
1038  ASSERTL1(loc.num_elements() >= m_numLocalBndCoeffs,"Local vector is not of correct dimension");
1039  ASSERTL1(global.num_elements() >= m_numGlobalBndCoeffs,"Global vector is not of correct dimension");
1040 
1041  if(m_signChange)
1042  {
1043  Vmath::Scatr(m_numLocalBndCoeffs, m_localToGlobalBndSign.get(), loc.get(), m_localToGlobalBndMap.get(), global.get());
1044  }
1045  else
1046  {
1047  Vmath::Scatr(m_numLocalBndCoeffs, loc.get(), m_localToGlobalBndMap.get(), global.get());
1048  }
1049  }
bool m_signChange
Flag indicating if modes require sign reversal.
Definition: AssemblyMap.h:344
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
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:347
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Definition: AssemblyMap.h:349
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:165
void Nektar::MultiRegions::AssemblyMap::LocalToGlobal ( const Array< OneD, const NekDouble > &  loc,
Array< OneD, NekDouble > &  global 
) const

Definition at line 704 of file AssemblyMap.cpp.

References v_LocalToGlobal().

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

707  {
708  v_LocalToGlobal(loc,global);
709  }
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 711 of file AssemblyMap.cpp.

References v_LocalToGlobal().

714  {
715  v_LocalToGlobal(loc,global);
716  }
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 1211 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().

1213  {
1215  = m_session->GetComm()->GetRowComm();
1216  bool isRoot = vRowComm->GetRank() == 0;
1217  int n = vRowComm->GetSize();
1218  int i;
1219 
1220  // Determine number of global degrees of freedom.
1221  int globBndCnt = 0, globDirCnt = 0;
1222 
1223  for (i = 0; i < m_numGlobalBndCoeffs; ++i)
1224  {
1226  {
1227  globBndCnt++;
1228 
1229  if (i < m_numGlobalDirBndCoeffs)
1230  {
1231  globDirCnt++;
1232  }
1233  }
1234  }
1235 
1236  int globCnt = m_numGlobalCoeffs - m_numGlobalBndCoeffs + globBndCnt;
1237 
1238  // Calculate maximum valency
1240  Array<OneD, NekDouble> tmpGlob(m_numGlobalBndCoeffs, 0.0);
1241 
1242  Vmath::Assmb(m_numLocalBndCoeffs, tmpLoc.get(), m_localToGlobalBndMap.get(), tmpGlob.get());
1243  UniversalAssembleBnd(tmpGlob);
1244 
1245  int totGlobDof = globCnt;
1246  int totGlobBndDof = globBndCnt;
1247  int totGlobDirDof = globDirCnt;
1248  int totLocalDof = m_numLocalCoeffs;
1249  int totLocalBndDof = m_numLocalBndCoeffs;
1250  int totLocalDirDof = m_numLocalDirBndCoeffs;
1251 
1252  int meanValence = 0;
1253  int maxValence = 0;
1254  int minValence = 10000000;
1255  for (int i = 0; i < m_numGlobalBndCoeffs; ++i)
1256  {
1258  {
1259  continue;
1260  }
1261 
1262  if (tmpGlob[i] > maxValence)
1263  {
1264  maxValence = tmpGlob[i];
1265  }
1266  if (tmpGlob[i] < minValence)
1267  {
1268  minValence = tmpGlob[i];
1269  }
1270  meanValence += tmpGlob[i];
1271  }
1272 
1273  vRowComm->AllReduce(maxValence, LibUtilities::ReduceMax);
1274  vRowComm->AllReduce(minValence, LibUtilities::ReduceMin);
1275  vRowComm->AllReduce(meanValence, LibUtilities::ReduceSum);
1276  vRowComm->AllReduce(totGlobDof, LibUtilities::ReduceSum);
1277  vRowComm->AllReduce(totGlobBndDof, LibUtilities::ReduceSum);
1278  vRowComm->AllReduce(totGlobDirDof, LibUtilities::ReduceSum);
1279  vRowComm->AllReduce(totLocalDof, LibUtilities::ReduceSum);
1280  vRowComm->AllReduce(totLocalBndDof, LibUtilities::ReduceSum);
1281  vRowComm->AllReduce(totLocalDirDof, LibUtilities::ReduceSum);
1282 
1283  meanValence /= totGlobBndDof;
1284 
1285  if (isRoot)
1286  {
1287  out << "Assembly map statistics for field " << variable << ":"
1288  << endl;
1289  out << " - Number of local/global dof : "
1290  << totLocalDof << " " << totGlobDof << endl;
1291  out << " - Number of local/global boundary dof : "
1292  << totLocalBndDof << " " << totGlobBndDof << endl;
1293  out << " - Number of local/global Dirichlet dof : "
1294  << totLocalDirDof << " " << totGlobDirDof << endl;
1295  out << " - dof valency (min/max/mean) : "
1296  << minValence << " " << maxValence << " " << meanValence
1297  << endl;
1298 
1299  if (n > 1)
1300  {
1301  NekDouble mean = m_numLocalCoeffs, mean2 = mean * mean;
1302  NekDouble minval = mean, maxval = mean;
1303  Array<OneD, NekDouble> tmp(1);
1304 
1305  for (i = 1; i < n; ++i)
1306  {
1307  vRowComm->Recv(i, tmp);
1308  mean += tmp[0];
1309  mean2 += tmp[0]*tmp[0];
1310 
1311  if (tmp[0] > maxval)
1312  {
1313  maxval = tmp[0];
1314  }
1315  if (tmp[0] < minval)
1316  {
1317  minval = tmp[0];
1318  }
1319  }
1320 
1321  out << " - Local dof dist. (min/max/mean/dev) : "
1322  << minval << " " << maxval << " " << (mean / n) << " "
1323  << sqrt(mean2/n - mean*mean/n/n) << endl;
1324 
1325  vRowComm->Block();
1326 
1327  mean = minval = maxval = m_numLocalBndCoeffs;
1328  mean2 = mean * mean;
1329 
1330  for (i = 1; i < n; ++i)
1331  {
1332  vRowComm->Recv(i, tmp);
1333  mean += tmp[0];
1334  mean2 += tmp[0]*tmp[0];
1335 
1336  if (tmp[0] > maxval)
1337  {
1338  maxval = tmp[0];
1339  }
1340  if (tmp[0] < minval)
1341  {
1342  minval = tmp[0];
1343  }
1344  }
1345 
1346  out << " - Local bnd dof dist. (min/max/mean/dev) : "
1347  << minval << " " << maxval << " " << (mean / n) << " "
1348  << sqrt(mean2/n - mean*mean/n/n) << endl;
1349  }
1350  }
1351  else
1352  {
1353  Array<OneD, NekDouble> tmp(1);
1354  tmp[0] = m_numLocalCoeffs;
1355  vRowComm->Send(0, tmp);
1356  vRowComm->Block();
1357  tmp[0] = m_numLocalBndCoeffs;
1358  vRowComm->Send(0, tmp);
1359  }
1360  }
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
int m_numLocalCoeffs
Total number of local coefficients.
Definition: AssemblyMap.h:330
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:317
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:686
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
Definition: AssemblyMap.h:347
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Definition: AssemblyMap.h:315
int m_numLocalBndCoeffs
Number of local boundary coefficients.
Definition: AssemblyMap.h:311
LibUtilities::SessionReaderSharedPtr m_session
Session object.
Definition: AssemblyMap.h:302
Array< OneD, int > m_globalToUniversalBndMapUnique
Integer map of unique process coeffs to universal space (signed)
Definition: AssemblyMap.h:359
void UniversalAssembleBnd(Array< OneD, NekDouble > &pGlobal) const
int m_numGlobalCoeffs
Total number of global coefficients.
Definition: AssemblyMap.h:341
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 752 of file AssemblyMap.cpp.

References v_UniversalAssemble().

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

Definition at line 758 of file AssemblyMap.cpp.

References v_UniversalAssemble().

761  {
762  v_UniversalAssemble(pGlobal, offset);
763  }
virtual void v_UniversalAssemble(Array< OneD, NekDouble > &pGlobal) const
void Nektar::MultiRegions::AssemblyMap::UniversalAssembleBnd ( Array< OneD, NekDouble > &  pGlobal) const

Definition at line 1110 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().

1112  {
1113  ASSERTL1(pGlobal.num_elements() == m_numGlobalBndCoeffs,
1114  "Wrong size.");
1115  Gs::Gather(pGlobal, Gs::gs_add, m_bndGsh);
1116  }
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
Definition: AssemblyMap.h:313
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:218
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:165
void Nektar::MultiRegions::AssemblyMap::UniversalAssembleBnd ( NekVector< NekDouble > &  pGlobal) const

Definition at line 1118 of file AssemblyMap.cpp.

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

1120  {
1121  UniversalAssembleBnd(pGlobal.GetPtr());
1122  }
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 1124 of file AssemblyMap.cpp.

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

1127  {
1128  Array<OneD, NekDouble> tmp(offset);
1129  if (offset > 0) Vmath::Vcopy(offset, pGlobal, 1, tmp, 1);
1130  UniversalAssembleBnd(pGlobal);
1131  if (offset > 0) Vmath::Vcopy(offset, tmp, 1, pGlobal, 1);
1132  }
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:1016
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 555 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by Assemble().

558  {
559  ASSERTL0(false, "Not defined for this type of mapping.");
560  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
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 562 of file AssemblyMap.cpp.

References ASSERTL0.

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

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 639 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetExtraDirEdges().

640  {
641  ASSERTL0(false, "Not defined for this type of mapping.");
642  static Array<OneD, const int> result;
643  return result;
644  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
int Nektar::MultiRegions::AssemblyMap::v_GetFullSystemBandWidth ( ) const
privatevirtual

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

Definition at line 591 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetFullSystemBandWidth().

592  {
593  ASSERTL0(false, "Not defined for this type of mapping.");
594  return 0;
595  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
int Nektar::MultiRegions::AssemblyMap::v_GetGlobalToUniversalMap ( const int  i) const
privatevirtual

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

Definition at line 481 of file AssemblyMap.cpp.

References ASSERTL0.

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

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

Definition at line 500 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetGlobalToUniversalMap().

501  {
502  ASSERTL0(false, "Not defined for this type of mapping.");
503  static Array<OneD, const int> result;
504  return result;
505  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
int Nektar::MultiRegions::AssemblyMap::v_GetGlobalToUniversalMapUnique ( const int  i) const
privatevirtual

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

Definition at line 487 of file AssemblyMap.cpp.

References ASSERTL0.

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

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

Definition at line 507 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetGlobalToUniversalMapUnique().

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

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

Definition at line 475 of file AssemblyMap.cpp.

References ASSERTL0.

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

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

Definition at line 493 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetLocalToGlobalMap().

494  {
495  ASSERTL0(false, "Not defined for this type of mapping.");
496  static Array<OneD,const int> result;
497  return result;
498  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
NekDouble Nektar::MultiRegions::AssemblyMap::v_GetLocalToGlobalSign ( const int  i) const
privatevirtual

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

Definition at line 514 of file AssemblyMap.cpp.

References ASSERTL0.

515  {
516  ASSERTL0(false, "Not defined for this type of mapping.");
517  return 0.0;
518  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
const Array< OneD, NekDouble > & Nektar::MultiRegions::AssemblyMap::v_GetLocalToGlobalSign ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 520 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetLocalToGlobalSign().

521  {
522  ASSERTL0(false, "Not defined for this type of mapping.");
523  static Array<OneD, NekDouble> result;
524  return result;
525  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
int Nektar::MultiRegions::AssemblyMap::v_GetNumDirEdges ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 615 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumDirEdges().

616  {
617  ASSERTL0(false, "Not defined for this type of mapping.");
618  return 0;
619  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
int Nektar::MultiRegions::AssemblyMap::v_GetNumDirFaces ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 621 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumDirFaces().

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

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 603 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirEdgeModes().

604  {
605  ASSERTL0(false, "Not defined for this type of mapping.");
606  return 0;
607  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
int Nektar::MultiRegions::AssemblyMap::v_GetNumNonDirEdges ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 627 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirEdges().

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

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 609 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirFaceModes().

610  {
611  ASSERTL0(false, "Not defined for this type of mapping.");
612  return 0;
613  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
int Nektar::MultiRegions::AssemblyMap::v_GetNumNonDirFaces ( ) const
privatevirtual

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 633 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirFaces().

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

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 597 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GetNumNonDirVertexModes().

598  {
599  ASSERTL0(false, "Not defined for this type of mapping.");
600  return 0;
601  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
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 541 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by GlobalToLocal().

544  {
545  ASSERTL0(false, "Not defined for this type of mapping.");
546  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
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 548 of file AssemblyMap.cpp.

References ASSERTL0.

551  {
552  ASSERTL0(false, "Not defined for this type of mapping.");
553  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
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 646 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by LinearSpaceMap().

648  {
649  ASSERTL0(false, "Not defined for this sub class");
650  static boost::shared_ptr<AssemblyMap> result;
651  return result;
652  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
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 527 of file AssemblyMap.cpp.

References ASSERTL0.

Referenced by LocalToGlobal().

530  {
531  ASSERTL0(false, "Not defined for this type of mapping.");
532  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:135
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 534 of file AssemblyMap.cpp.

References ASSERTL0.

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

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

Definition at line 569 of file AssemblyMap.cpp.

Referenced by UniversalAssemble().

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

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

Definition at line 576 of file AssemblyMap.cpp.

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

Reimplemented in Nektar::MultiRegions::AssemblyMapCG.

Definition at line 583 of file AssemblyMap.cpp.

586  {
587  // Do nothing here since multi-level static condensation uses a
588  // AssemblyMap and thus will call this routine in serial.
589  }

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 353 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 355 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 364 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 370 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
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 391 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 341 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 330 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 404 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 367 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 373 of file AssemblyMap.h.

Referenced by AssemblyMap(), and GetSuccessiveRHS().

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