Commit 37868ad3 authored by Thomas Witkowski's avatar Thomas Witkowski

WUA, IT COMPILES....

parent 0c1e2d14
......@@ -132,23 +132,35 @@ namespace AMDiS {
return mesh;
}
#if 0
/// Returns an FE space from \ref feSpaces.
inline const FiniteElemSpace* getFeSpace(unsigned int i = 0)
{
FUNCNAME("MeshDistributor::getFeSpace()");
TEST_EXIT_DBG(i < feSpaces.size())("Should not happen!\n");
TEST_EXIT_DBG(i < uniqueFeSpaces.size())("Should not happen!\n");
return feSpaces[i];
return uniqueFeSpaces[i];
}
/// Returns all FE spaces, thus \ref feSpaces.
inline vector<const FiniteElemSpace*>& getFeSpaces()
{
return feSpaces;
return uniqueFeSpaces;
}
inline const FiniteElemSpace* getComponentFeSpace(unsigned int i = 0)
{
FUNCNAME("MeshDistributor::getFeSpace()");
TEST_EXIT_DBG(i < componentSpaces.size())("Should not happen!\n");
return componentSpaces[i];
}
inline vector<const FiniteElemSpace*>& getComponentFeSpaces()
{
return componentSpaces;
}
#endif
/// Returns the DOF mapping object, \ref dofMap.
inline ParallelDofMapping& getDofMap()
......@@ -488,8 +500,8 @@ namespace AMDiS {
string name;
/// Finite element spaces of the problem.
//vector<const FiniteElemSpace*> feSpaces;
vector<const FiniteElemSpace*> componentSpaces;
vector<const FiniteElemSpace*> uniqueFeSpaces;
......
......@@ -191,7 +191,7 @@ namespace AMDiS {
TEST_EXIT_DBG(levelData)("No mesh level data object defined!\n");
for (ComponentIterator &it = data->getIteratorData(); !it.end(); it.next())
data->clear();
it->clear();
nRankDofs = -1;
nLocalDofs = -1;
......@@ -322,6 +322,8 @@ namespace AMDiS {
// === Create the matrix indices for all component FE spaces. ===
vector<const FiniteElemSpace*> &feSpaces = data->getFeSpaces();
for (unsigned int i = 0; i < feSpaces.size(); i++) {
// Traverse all DOFs of the FE space and create for all rank owned DOFs
......@@ -462,12 +464,6 @@ namespace AMDiS {
{
FUNCNAME("ParallelDofMapping::createIndexSet()");
TEST_EXIT_DBG(firstComponent + nComponents <= feSpaces.size())
("Should not happen!\n");
TEST_EXIT_DBG(data.count(feSpaces[firstComponent]))
("No data for FE space at address %p!\n", feSpaces[firstComponent]);
int firstRankDof = -1;
ComponentDofMap &compMap = (*data)[firstComponent];
DofMap &dofMap = compMap.getMap();
......
......@@ -295,6 +295,8 @@ namespace AMDiS {
public:
virtual ComponentDofMap& operator*() = 0;
virtual ComponentDofMap* operator->() = 0;
virtual bool end() = 0;
virtual void next() = 0;
......@@ -319,6 +321,11 @@ namespace AMDiS {
vector<const FiniteElemSpace*> &f1,
bool isNonLocal) = 0;
vector<const FiniteElemSpace*>& getFeSpaces()
{
return feSpaces;
}
protected:
/// The FE spaces for all components.
vector<const FiniteElemSpace*> feSpaces;
......@@ -398,6 +405,10 @@ namespace AMDiS {
{
}
ComponentDofMap* operator->()
{
}
bool end()
{
}
......@@ -416,6 +427,11 @@ namespace AMDiS {
ComponentDofMap& operator*()
{
}
ComponentDofMap* operator->()
{
}
bool end()
{
......@@ -478,6 +494,11 @@ namespace AMDiS {
{
}
ComponentDofMap* operator->()
{
}
bool end()
{
}
......@@ -496,6 +517,11 @@ namespace AMDiS {
ComponentDofMap& operator*()
{
}
ComponentDofMap* operator->()
{
}
bool end()
{
......@@ -618,11 +644,10 @@ namespace AMDiS {
}
/// Returns the number of solution components the mapping is defined on.
// inline int getNumberOfComponents() const
// {
// ERROR_EXIT("WRITE SOMETHING MEANINGFUL!\n");
// // return static_cast<int>(feSpaces.size());
// }
inline int getNumberOfComponents() const
{
return static_cast<int>(data->getFeSpaces().size());
}
/// Returns \ref nRankDofs, thus the number of DOFs owned by the rank.
inline int getRankDofs()
......
This diff is collapsed.
......@@ -109,23 +109,29 @@ namespace AMDiS {
/// Defines which boundary nodes are primal. Creates global index of
/// the primal variables.
void createPrimals(const FiniteElemSpace *feSpace);
void createPrimals(int component,
const FiniteElemSpace *feSpace);
/// Defines the set of dual variables and creates the global index of
/// dual variables.
void createDuals(const FiniteElemSpace *feSpace);
void createDuals(int component,
const FiniteElemSpace *feSpace);
///
void createInterfaceNodes(const FiniteElemSpace *feSpace);
void createInterfaceNodes(int component,
const FiniteElemSpace *feSpace);
/// Create Lagrange multiplier variables corresponding to the dual
/// variables.
void createLagrange(const FiniteElemSpace *feSpace);
void createLagrange(int component,
const FiniteElemSpace *feSpace);
void createAugmentedLagrange(const FiniteElemSpace *feSpace);
void createAugmentedLagrange(int component,
const FiniteElemSpace *feSpace);
/// Creates a global index of the B variables.
void createIndexB(const FiniteElemSpace *feSpace);
void createIndexB(int component,
const FiniteElemSpace *feSpace);
/// Creates the Lagrange multiplier constraints and assembles them
/// to \ref mat_lagrange.
......
......@@ -150,8 +150,7 @@ namespace AMDiS {
for (cursor_type cursor = begin<row>(dofMat->getBaseMatrix()),
cend = end<row>(dofMat->getBaseMatrix()); cursor != cend; ++cursor) {
bool isRowCoarse =
isCoarseSpace(rowComponent, feSpaces[rowComponent], *cursor);
bool isRowCoarse = isCoarseSpace(rowComponent, *cursor);
cols.clear();
colsOther.clear();
......@@ -162,8 +161,7 @@ namespace AMDiS {
for (icursor_type icursor = begin<nz>(cursor), icend = end<nz>(cursor);
icursor != icend; ++icursor) {
bool isColCoarse =
isCoarseSpace(colComponent, feSpaces[colComponent], col(*icursor));
bool isColCoarse = isCoarseSpace(colComponent, col(*icursor));
if (isColCoarse == false)
if ((*interiorMap)[dofMat->getColFeSpace()].isSet(col(*icursor)) == false)
......@@ -786,7 +784,7 @@ namespace AMDiS {
if (rankOnly && !(*interiorMap)[feSpace].isRankDof(dofIt.getDOFIndex()))
continue;
if (isCoarseSpace(nRowVec, feSpace, dofIt.getDOFIndex())) {
if (isCoarseSpace(nRowVec, dofIt.getDOFIndex())) {
TEST_EXIT_DBG(vecCoarse != PETSC_NULL)("Should not happen!\n");
int index = rowCoarseSpace->getMatIndex(nRowVec, dofIt.getDOFIndex());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment