37 #include <boost/core/ignore_unused.hpp> 66 CoupledAssemblyMap::CoupledAssemblyMap(
74 boost::ignore_unused(graph, boundaryConditions);
76 int nVel = fields[0]->GetCoordim(0);
82 "Multi-level static condensation not supported.");
105 const int nLocBndCondDofs = cgMap->
135 = *(fields[0]->GetExp());
137 map<int, int> newGlobalIds;
138 int i, j, n, cnt1, cnt2;
146 for (i = 0; i < locExpVector.size(); ++i)
148 const int nBndCoeffs = locExpVector[i]->NumBndryCoeffs();
150 for (n = 0; n < nVel; ++n)
152 for (j = 0; j < nBndCoeffs; ++j, ++cnt1)
154 const int l2g = cgMap->GetLocalToGlobalBndMap()[cnt2+j];
155 m_localToGlobalBndMap[cnt1] = nVel * l2g + n;
160 cgMap->GetLocalToGlobalBndSign()[cnt2+j];
165 const int l2gnew = m_localToGlobalBndMap[cnt1];
166 if (newGlobalIds.count(l2g))
168 ASSERTL1(newGlobalIds[l2g] == l2gnew,
169 "Consistency error");
171 newGlobalIds[l2g] = l2gnew;
190 for (i = 0; i < locExpVector.size(); ++i)
192 const int nCoeffs = locExpVector[i]->GetNcoeffs();
193 const int nBndCoeffs = locExpVector[i]->NumBndryCoeffs();
195 for (n = 0; n < nVel; ++n)
197 for (j = 0; j < nBndCoeffs; ++j, ++cnt1, ++cnt2)
199 const int l2g = m_localToGlobalBndMap[cnt2];
209 for (n = 0; n < nVel; ++n)
211 for (j = 0; j < nCoeffs - nBndCoeffs; ++j, ++cnt1)
226 for (n = 0; n < nVel; ++n)
228 for (i = 0; i < nLocBndCondDofs/nVel; ++i, ++cnt1)
230 const int l2g = cgMap->GetBndCondCoeffsToGlobalCoeffsMap()[i];
231 int newId = newGlobalIds[l2g];
232 m_bndCondCoeffsToGlobalCoeffsMap[cnt1] = newId + n;
237 cgMap->GetBndCondCoeffsToGlobalCoeffsSign(i);
248 for (i = 0; i < cgMap->GetNumGlobalBndCoeffs(); ++i)
250 for (n = 0; n < nVel; ++n)
252 m_globalToUniversalBndMap[i*nVel + n] =
253 cgMap->GetGlobalToUniversalBndMap()[i]*nVel + n;
255 cgMap->GetGlobalToUniversalBndMap()[i]*nVel + n;
264 tmp[i] = m_globalToUniversalBndMap[i];
273 m_globalToUniversalMapUnique[i] = (tmp[i] >= 0 ? 1 : 0);
277 m_globalToUniversalBndMapUnique[i] = (tmp2[i] >= 0 ? 1 : 0);
#define ASSERTL0(condition, msg)
std::size_t hash_range(Iter first, Iter last)
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
bool m_systemSingular
Flag indicating if the system is singular or not.
bool m_signChange
Flag indicating if modes require sign reversal.
int m_numGlobalBndCoeffs
Total number of global boundary coefficients.
LibUtilities::CommSharedPtr m_comm
Communicator.
std::shared_ptr< AssemblyMapCG > AssemblyMapCGSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
Array< OneD, int > m_globalToUniversalMapUnique
Integer map of unique process coeffs to universal space (signed)
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
Array< OneD, int > m_globalToUniversalMap
Integer map of process coeffs to universal space.
int m_numLocalCoeffs
Total number of local coefficients.
std::map< int, std::vector< ExtraDirDof > > m_extraDirDofs
Map indicating degrees of freedom which are Dirichlet but whose value is stored on another processor...
std::vector< ExpansionSharedPtr > ExpansionVector
Array< OneD, int > m_localToGlobalMap
Integer map of local coeffs to global space.
static gs_data * Init(const Nektar::Array< OneD, long > pId, const LibUtilities::CommSharedPtr &pComm, bool verbose=true)
Initialise Gather-Scatter map.
size_t m_hash
Hash for map.
Array< OneD, unsigned int > m_numLocalBndCoeffsPerPatch
The number of bnd dofs per patch.
GlobalSysSolnType m_solnType
The solution type of the global system.
Array< OneD, NekDouble > m_bndCondCoeffsToGlobalCoeffsSign
Integer map of bnd cond coeffs to global coefficients.
int m_numGlobalDirBndCoeffs
Number of Global Dirichlet Boundary Coefficients.
static void Unique(const Nektar::Array< OneD, long > pId, const LibUtilities::CommSharedPtr &pComm)
Updates pId to negate all-but-one references to each universal ID.
Array< OneD, unsigned int > m_numLocalIntCoeffsPerPatch
The number of int dofs per patch.
int m_lowestStaticCondLevel
Lowest static condensation level.
Array< OneD, int > m_localToGlobalBndMap
Integer map of local boundary coeffs to global space.
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
const Array< OneD, const int > & GetBndCondCoeffsToGlobalCoeffsMap()
Retrieves the global indices corresponding to the boundary expansion modes.
int m_numLocalDirBndCoeffs
Number of Local Dirichlet Boundary Coefficients.
Array< OneD, int > m_bndCondCoeffsToGlobalCoeffsMap
Integer map of bnd cond coeffs to global coefficients.
int m_numLocalBndCoeffs
Number of local boundary coefficients.
int m_staticCondLevel
The level of recursion in the case of multi-level static condensation.
Array< OneD, NekDouble > m_localToGlobalBndSign
Integer sign of local boundary coeffs to global space.
Array< OneD, NekDouble > m_localToGlobalSign
Integer sign of local coeffs to global space.
Array< OneD, int > m_globalToUniversalBndMap
Integer map of process coeffs to universal space.
Array< OneD, int > m_globalToUniversalBndMapUnique
Integer map of unique process coeffs to universal space (signed)
Constructs mappings for the C0 scalar continuous Galerkin formulation.
int m_numGlobalCoeffs
Total number of global coefficients.
void Zero(int n, T *x, const int incx)
Zero vector.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
std::shared_ptr< SessionReader > SessionReaderSharedPtr
int m_numPatches
The number of patches (~elements) in the current level.