68 AssemblyMapCG(pSession)
70 int nVel = fields[0]->GetCoordim(0);
76 "Multi-level static condensation not supported.");
99 const int nLocBndCondDofs = cgMap->
129 = *(fields[0]->GetExp());
131 map<int, int> newGlobalIds;
132 int i, j, n, cnt1, cnt2;
140 for (i = 0; i < locExpVector.size(); ++i)
142 const int nBndCoeffs = locExpVector[i]->NumBndryCoeffs();
144 for (n = 0; n < nVel; ++n)
146 for (j = 0; j < nBndCoeffs; ++j, ++cnt1)
148 const int l2g = cgMap->GetLocalToGlobalBndMap()[cnt2+j];
149 m_localToGlobalBndMap[cnt1] = nVel * l2g + n;
154 cgMap->GetLocalToGlobalBndSign()[cnt2+j];
159 const int l2gnew = m_localToGlobalBndMap[cnt1];
160 if (newGlobalIds.count(l2g))
162 ASSERTL1(newGlobalIds[l2g] == l2gnew,
163 "Consistency error");
165 newGlobalIds[l2g] = l2gnew;
184 for (i = 0; i < locExpVector.size(); ++i)
186 const int nCoeffs = locExpVector[i]->GetNcoeffs();
187 const int nBndCoeffs = locExpVector[i]->NumBndryCoeffs();
189 for (n = 0; n < nVel; ++n)
191 for (j = 0; j < nBndCoeffs; ++j, ++cnt1, ++cnt2)
193 const int l2g = m_localToGlobalBndMap[cnt2];
203 for (n = 0; n < nVel; ++n)
205 for (j = 0; j < nCoeffs - nBndCoeffs; ++j, ++cnt1)
220 for (n = 0; n < nVel; ++n)
222 for (i = 0; i < nLocBndCondDofs/nVel; ++i, ++cnt1)
224 const int l2g = cgMap->GetBndCondCoeffsToGlobalCoeffsMap()[i];
225 int newId = newGlobalIds[l2g];
226 m_bndCondCoeffsToGlobalCoeffsMap[cnt1] = newId + n;
231 cgMap->GetBndCondCoeffsToGlobalCoeffsSign(i);
242 for (i = 0; i < cgMap->GetNumGlobalBndCoeffs(); ++i)
244 for (n = 0; n < nVel; ++n)
246 m_globalToUniversalBndMap[i*nVel + n] =
247 cgMap->GetGlobalToUniversalBndMap()[i]*nVel + n;
249 cgMap->GetGlobalToUniversalBndMap()[i]*nVel + n;
258 tmp[i] = m_globalToUniversalBndMap[i];
267 m_globalToUniversalMapUnique[i] = (tmp[i] >= 0 ? 1 : 0);
271 m_globalToUniversalBndMapUnique[i] = (tmp2[i] >= 0 ? 1 : 0);
274 m_hash = boost::hash_range(
#define ASSERTL0(condition, msg)
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.
static Array< OneD, NekDouble > NullNekDouble1DArray
Array< OneD, int > m_globalToUniversalMapUnique
Integer map of unique process coeffs to universal space (signed)
static gs_data * Init(const Nektar::Array< OneD, long > pId, const LibUtilities::CommSharedPtr &pComm)
Initialise Gather-Scatter map.
Array< OneD, int > m_globalToUniversalMap
Integer map of process coeffs to universal space.
int m_numLocalCoeffs
Total number of local coefficients.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< ExpansionSharedPtr > ExpansionVector
Array< OneD, int > m_localToGlobalMap
Integer map of local coeffs to global space.
size_t m_hash
Hash for map.
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
map< int, vector< ExtraDirDof > > m_extraDirDofs
Map indicating degrees of freedom which are Dirichlet but whose value is stored on another processor...
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.
CoupledAssemblyMap(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &graph, const MultiRegions::AssemblyMapCGSharedPtr &cgMap, const Array< OneD, const BoundaryCondShPtr > &boundaryConditions, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields)
Take an existing assembly map and create a coupled version suitable for use in the linear elasticity ...
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.
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)
int m_numGlobalCoeffs
Total number of global coefficients.
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
void Zero(int n, T *x, const int incx)
Zero vector.
boost::shared_ptr< AssemblyMapCG > AssemblyMapCGSharedPtr
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
int m_numPatches
The number of patches (~elements) in the current level.