Commit 729ab8dc authored by Thomas Witkowski's avatar Thomas Witkowski

Fixed problem with getRecoveryGradient.

parent 7ab4ab7b
......@@ -18,8 +18,8 @@ namespace AMDiS {
DOFAdmin::DOFAdmin(Mesh* m)
: mesh(m),
nrDOF(mesh->getDim(), NO_INIT),
nr0DOF(mesh->getDim(), NO_INIT)
nDof(mesh->getDim(), NO_INIT),
nPreDof(mesh->getDim(), NO_INIT)
{
init();
}
......@@ -28,8 +28,8 @@ namespace AMDiS {
DOFAdmin::DOFAdmin(Mesh* m, std::string aName)
: name(aName),
mesh(m),
nrDOF(mesh->getDim(), NO_INIT),
nr0DOF(mesh->getDim(), NO_INIT)
nDof(mesh->getDim(), NO_INIT),
nPreDof(mesh->getDim(), NO_INIT)
{
init();
}
......@@ -62,8 +62,8 @@ namespace AMDiS {
holeCount = src.holeCount;
sizeUsed = src.sizeUsed;
for (int i = 0; i <= mesh->getDim(); i++) {
nrDOF[i] = src.nrDOF[i];
nr0DOF[i] = src.nr0DOF[i];
nDof[i] = src.nDof[i];
nPreDof[i] = src.nPreDof[i];
}
dofIndexedList = src.dofIndexedList;
dofContainerList = src.dofContainerList;
......@@ -142,10 +142,10 @@ namespace AMDiS {
firstHole = i;
} else { // if there is no hole
// enlarge dof-list
enlargeDOFLists();
enlargeDofLists();
TEST_EXIT_DBG(firstHole < static_cast<int>(dofFree.size()))
("no free entry after enlargeDOFLists\n");
("no free entry after enlargeDofLists\n");
TEST_EXIT_DBG(dofFree[firstHole])("no free bit at firstHole\n");
dofFree[firstHole] = false;
dof = firstHole;
......@@ -161,9 +161,9 @@ namespace AMDiS {
}
void DOFAdmin::enlargeDOFLists(int minsize)
void DOFAdmin::enlargeDofLists(int minsize)
{
FUNCNAME("DOFAdmin::enlargeDOFLists()");
FUNCNAME("DOFAdmin::enlargeDofLists()");
int old = size;
if (minsize > 0)
......@@ -316,23 +316,23 @@ namespace AMDiS {
}
void DOFAdmin::setNumberOfDOFs(int i, int v)
void DOFAdmin::setNumberOfDofs(int i, int v)
{
FUNCNAME("DOFAdmin::setNumberOfDOFs()");
TEST_EXIT_DBG(0 <= i && 4 > i)("Should not happen!\n");
nrDOF[i] = v;
nDof[i] = v;
}
void DOFAdmin::setNumberOfPreDOFs(int i, int v)
void DOFAdmin::setNumberOfPreDofs(int i, int v)
{
FUNCNAME("DOFAdmin::setNumberOfPreDOFs()");
TEST_EXIT_DBG(0 <= i && 4 > i)("Should not happen!\n");
nr0DOF[i] = v;
nPreDof[i] = v;
}
......@@ -361,8 +361,8 @@ namespace AMDiS {
SerUtil::serialize(out, holeCount);
SerUtil::serialize(out, sizeUsed);
nrDOF.serialize(out);
nr0DOF.serialize(out);
nDof.serialize(out);
nPreDof.serialize(out);
}
......@@ -388,8 +388,8 @@ namespace AMDiS {
SerUtil::deserialize(in, holeCount);
SerUtil::deserialize(in, sizeUsed);
nrDOF.deserialize(in);
nr0DOF.deserialize(in);
nDof.deserialize(in);
nPreDof.deserialize(in);
std::list<DOFIndexedBase*>::iterator di;
std::list<DOFIndexedBase*>::iterator end = dofIndexedList.end();
......
......@@ -66,7 +66,7 @@ namespace AMDiS {
* Enlarges the number of DOFs that can be managed at least to minsize by
* a step size of \ref sizeIncrement.
*/
void enlargeDOFLists(int minsize = 0);
void enlargeDofLists(int minsize = 0);
/// assignment operator
DOFAdmin& operator=(const DOFAdmin&);
......@@ -77,7 +77,7 @@ namespace AMDiS {
/// Compares two DOFAdmins by their names.
inline bool operator!=(const DOFAdmin& ad) const
{
return !(ad==*this);
return !(ad == *this);
}
/** \brief
......@@ -150,28 +150,28 @@ namespace AMDiS {
return name;
}
/// Returns \ref nrDOF[i], i.e., the number of dofs for the position i.
/// Returns \ref nDof[i], i.e., the number of dofs for the position i.
inline const int getNumberOfDofs(int i) const
{
return nrDOF[i];
return nDof[i];
}
/// Returns \ref nrDOF
/// Returns \ref nDof
inline const DimVec<int>& getNumberOfDofs() const
{
return nrDOF;
return nDof;
}
/// Returns \ref nr0DOF[i]
inline const int getNumberOfPreDOFs(int i) const
/// Returns \ref nPreDof[i]
inline const int getNumberOfPreDofs(int i) const
{
return nr0DOF[i];
return nPreDof[i];
}
/// Returns \ref nr0DOF
inline const DimVec<int>& getNumberOfPreDOFs() const
/// Returns \ref nPreDof
inline const DimVec<int>& getNumberOfPreDofs() const
{
return nr0DOF;
return nPreDof;
}
/// Returns \ref mesh
......@@ -181,19 +181,19 @@ namespace AMDiS {
}
/// Returns \ref dofFree, the array denoting DOFs to be either free or used.
inline const std::vector<bool>& getDOFFree() const
inline const std::vector<bool>& getDofFree() const
{
return dofFree;
}
/// Returns if the given DOF is free.
inline const bool isDOFFree(int i) const
inline const bool isDofFree(int i) const
{
return dofFree[i];
}
/// Sets a DOF to be free or not.
inline void setDOFFree(int i, bool b)
inline void setDofFree(int i, bool b)
{
dofFree[i] = b;
}
......@@ -224,17 +224,17 @@ namespace AMDiS {
* \{
*/
/// Sets \ref nrDOF[i] = v
void setNumberOfDOFs(int i, int v);
/// Sets \ref nDof[i] = v
void setNumberOfDofs(int i, int v);
/// Sets all values of \ref nrDOF
void setNumberOfDOFs(DimVec<int> v)
/// Sets all values of \ref nDof
void setNumberOfDofs(DimVec<int> v)
{
nrDOF = v;
nDof = v;
}
/// Sets \ref nr0DOF[i] = v
void setNumberOfPreDOFs(int i, int v);
/// Sets \ref nPreDof[i] = v
void setNumberOfPreDofs(int i, int v);
/// Sets \ref name = n
inline void setName(std::string n)
......@@ -300,10 +300,10 @@ namespace AMDiS {
* Number of dofs for each position, i.e., vertex, edge, ..., center,
* for this DOFAdmin.
*/
DimVec<int> nrDOF;
DimVec<int> nDof;
/// Dofs from previous DOFAdmins
DimVec<int> nr0DOF;
DimVec<int> nPreDof;
/// List of all managed DOFIndexed objects.
std::list<DOFIndexedBase*> dofIndexedList;
......
......@@ -45,7 +45,7 @@ namespace AMDiS {
return;
Element *el = list.getElement(0);
int n0 = feSpace->getAdmin()->getNumberOfPreDOFs(VERTEX);
int n0 = feSpace->getAdmin()->getNumberOfPreDofs(VERTEX);
DegreeOfFreedom dof0 = el->getDof(0, n0);
DegreeOfFreedom dof1 = el->getDof(1, n0);
DegreeOfFreedom dof_new = el->getChild(0)->getDof(feSpace->getMesh()->getDim(), n0);
......@@ -79,8 +79,8 @@ namespace AMDiS {
DOFAdmin *admin = feSpace->getAdmin();
// count number of nodes and dofs per node
std::vector<int> numNodeDOFs;
std::vector<int> numNodePreDOFs;
std::vector<int> nNodeDOFs;
std::vector<int> nNodePreDofs;
std::vector<DimVec<double>*> bary;
int nNodes = 0;
......@@ -89,12 +89,12 @@ namespace AMDiS {
for (int i = 0; i < dim + 1; i++) {
GeoIndex geoIndex = INDEX_OF_DIM(i, dim);
int nPositions = mesh->getGeo(geoIndex);
int numPreDOFs = admin->getNumberOfPreDOFs(i);
int numPreDofs = admin->getNumberOfPreDofs(i);
for (int j = 0; j < nPositions; j++) {
int dofs = basFcts->getNumberOfDofs(geoIndex);
numNodeDOFs.push_back(dofs);
nNodeDOFs.push_back(dofs);
nDofs += dofs;
numNodePreDOFs.push_back(numPreDOFs);
nNodePreDofs.push_back(numPreDofs);
}
nNodes += nPositions;
}
......@@ -120,8 +120,8 @@ namespace AMDiS {
int localDOFNr = 0;
for (int i = 0; i < nNodes; i++) { // for all nodes
for (int j = 0; j < numNodeDOFs[i]; j++) { // for all dofs at this node
DegreeOfFreedom dofIndex = dof[i][numNodePreDOFs[i] + j];
for (int j = 0; j < nNodeDOFs[i]; j++) { // for all dofs at this node
DegreeOfFreedom dofIndex = dof[i][nNodePreDofs[i] + j];
if (!visited[dofIndex]) {
basFcts->evalGrdUh(*(bary[localDOFNr]), grdLambda,
localUh, &((*result)[dofIndex]));
......@@ -171,7 +171,7 @@ namespace AMDiS {
volume.set(0.0);
const BasisFunction *basFcts = feSpace->getBasisFcts();
int nPreDOFs = feSpace->getAdmin()->getNumberOfPreDOFs(0);
int nPreDofs = feSpace->getAdmin()->getNumberOfPreDofs(VERTEX);
DimVec<double> bary(dim, DEFAULT_VALUE, (1.0 / (dim + 1.0)));
WorldVector<double> grd;
......@@ -193,7 +193,7 @@ namespace AMDiS {
basFcts->evalGrdUh(bary, grdLambda, localUh, &grd);
for (int i = 0; i < dim + 1; i++) {
DegreeOfFreedom dofIndex = dof[i][nPreDOFs];
DegreeOfFreedom dofIndex = dof[i][nPreDofs];
(*result)[dofIndex] += grd * det;
volume[dofIndex] += det;
}
......@@ -640,8 +640,8 @@ namespace AMDiS {
}
// count number of nodes and dofs per node
std::vector<int> numNodeDOFs;
std::vector<int> numNodePreDOFs;
std::vector<int> nNodeDOFs;
std::vector<int> nNodePreDofs;
std::vector<DimVec<double>*> bary;
int nNodes = 0;
......@@ -650,12 +650,12 @@ namespace AMDiS {
for (int i = 0; i < dim + 1; i++) {
GeoIndex geoIndex = INDEX_OF_DIM(i, dim);
int numPositionNodes = mesh->getGeo(geoIndex);
int numPreDOFs = admin->getNumberOfPreDOFs(i);
int numPreDofs = admin->getNumberOfPreDofs(i);
for (int j = 0; j < numPositionNodes; j++) {
int dofs = basFcts->getNumberOfDofs(geoIndex);
numNodeDOFs.push_back(dofs);
nNodeDOFs.push_back(dofs);
nDofs += dofs;
numNodePreDOFs.push_back(numPreDOFs);
nNodePreDofs.push_back(numPreDofs);
}
nNodes += numPositionNodes;
}
......@@ -681,8 +681,8 @@ namespace AMDiS {
int localDOFNr = 0;
for (int i = 0; i < nNodes; i++) { // for all nodes
for (int j = 0; j < numNodeDOFs[i]; j++) { // for all dofs at this node
DegreeOfFreedom dofIndex = dof[i][numNodePreDOFs[i] + j];
for (int j = 0; j < nNodeDOFs[i]; j++) { // for all dofs at this node
DegreeOfFreedom dofIndex = dof[i][nNodePreDofs[i] + j];
if (!visited[dofIndex]) {
basFcts->evalGrdUh(*(bary[localDOFNr]), grdLambda, localUh, &grd);
......
......@@ -860,7 +860,7 @@ namespace AMDiS {
#pragma omp parallel for schedule(dynamic, 25000) default(shared) private(i)
#endif
for (i = 0; i < maxI; i++)
if (!admin->isDOFFree(i))
if (!admin->isDofFree(i))
y[i] += alpha * x[i];
}
......@@ -926,7 +926,7 @@ namespace AMDiS {
#pragma omp parallel for schedule(dynamic, 25000) default(shared) private(i)
#endif
for (i = 0; i < maxI; i++)
if (!admin->isDOFFree(i))
if (!admin->isDofFree(i))
y[i] = alpha * y[i] + x[i];
}
......
......@@ -207,7 +207,7 @@ namespace AMDiS {
if ((nd = admin->getNumberOfDofs(VERTEX))) {
int vertices = mesh->getGeo(VERTEX);
nd0 = admin->getNumberOfPreDOFs(VERTEX);
nd0 = admin->getNumberOfPreDofs(VERTEX);
n0 = admin->getMesh()->getNode(VERTEX);
for (int i = 0; i < vertices; i++)
changeDofs1(admin, newDofIndex, n0, nd0, nd, i);
......@@ -216,7 +216,7 @@ namespace AMDiS {
if (mesh->getDim() > 1) {
if ((nd = admin->getNumberOfDofs(EDGE))) {
int edges = mesh->getGeo(EDGE);
nd0 = admin->getNumberOfPreDOFs(EDGE);
nd0 = admin->getNumberOfPreDofs(EDGE);
n0 = admin->getMesh()->getNode(EDGE);
for (int i = 0; i < edges; i++)
changeDofs1(admin, newDofIndex, n0, nd0, nd, i);
......@@ -226,7 +226,7 @@ namespace AMDiS {
if (mesh->getDim() == 3) {
if ((nd = admin->getNumberOfDofs(FACE))) {
int faces = mesh->getGeo(FACE);
nd0 = admin->getNumberOfPreDOFs(FACE);
nd0 = admin->getNumberOfPreDofs(FACE);
n0 = admin->getMesh()->getNode(FACE);
for (int i = 0; i < faces; i++)
changeDofs1(admin, newDofIndex, n0, nd0, nd, i);
......@@ -234,7 +234,7 @@ namespace AMDiS {
}
if ((nd = admin->getNumberOfDofs(CENTER))) {
nd0 = admin->getNumberOfPreDOFs(CENTER);
nd0 = admin->getNumberOfPreDofs(CENTER);
n0 = admin->getMesh()->getNode(CENTER);
changeDofs1(admin, newDofIndex, n0, nd0, nd, 0);
}
......@@ -248,7 +248,7 @@ namespace AMDiS {
int nd = admin->getNumberOfDofs(VERTEX);
if (nd) {
int vertices = mesh->getGeo(VERTEX);
nd0 = admin->getNumberOfPreDOFs(VERTEX);
nd0 = admin->getNumberOfPreDofs(VERTEX);
n0 = admin->getMesh()->getNode(VERTEX);
for (int i = 0; i < vertices; i++)
changeDofs2(n0, nd0, nd, i);
......@@ -258,7 +258,7 @@ namespace AMDiS {
nd = admin->getNumberOfDofs(EDGE);
if (nd) {
int edges = mesh->getGeo(EDGE);
nd0 = admin->getNumberOfPreDOFs(EDGE);
nd0 = admin->getNumberOfPreDofs(EDGE);
n0 = admin->getMesh()->getNode(EDGE);
for (int i = 0; i < edges; i++)
changeDofs2(n0, nd0, nd, i);
......@@ -269,7 +269,7 @@ namespace AMDiS {
nd = admin->getNumberOfDofs(FACE);
if (nd) {
int faces = mesh->getGeo(FACE);
nd0 = admin->getNumberOfPreDOFs(FACE);
nd0 = admin->getNumberOfPreDofs(FACE);
n0 = admin->getMesh()->getNode(FACE);
for (int i = 0; i < faces; i++)
changeDofs2(n0, nd0, nd, i);
......@@ -278,7 +278,7 @@ namespace AMDiS {
nd = admin->getNumberOfDofs(CENTER);
if (nd) {
nd0 = admin->getNumberOfPreDOFs(CENTER);
nd0 = admin->getNumberOfPreDofs(CENTER);
n0 = admin->getMesh()->getNode(CENTER);
// only one center
changeDofs2(n0, nd0, nd, 0);
......
......@@ -30,7 +30,7 @@ namespace AMDiS {
TEST_EXIT_DBG(nDofs != 0)("Mh, I've to think about this situation!\n");
// Calculate displacement. Is used if there is more than one dof admin on the mesh.
n0 = admin->getNumberOfPreDOFs(posIndex);
n0 = admin->getNumberOfPreDofs(posIndex);
// Get first dof index position for vertices.
node0 = mesh->getNode(posIndex);
// Get number of vertices in this dimension.
......@@ -40,6 +40,7 @@ namespace AMDiS {
orderPosition = basisFcts->orderOfPositionIndices(element, posIndex, 0);
}
bool ElementDofIterator::next()
{
// First iterate over the dofs of one element (vertex, edge, face).
......@@ -76,7 +77,7 @@ namespace AMDiS {
nElements = Global::getGeo(posIndex, dim);
// Calculate displacement. Is used if there is more than one dof admin on the mesh.
n0 = admin->getNumberOfPreDOFs(posIndex);
n0 = admin->getNumberOfPreDofs(posIndex);
// Get first dof index position for the geo index position.
node0 = mesh->getNode(posIndex);
......@@ -99,6 +100,7 @@ namespace AMDiS {
return true;
}
bool ElementDofIterator::nextStrict()
{
dofPos = nDofs;
......
......@@ -47,12 +47,15 @@ namespace AMDiS {
feSpaces.push_back(this);
}
FiniteElemSpace::FiniteElemSpace()
{}
FiniteElemSpace::~FiniteElemSpace()
{}
FiniteElemSpace& FiniteElemSpace::operator=(const FiniteElemSpace& feSpace)
{
if (&feSpace == this)
......@@ -69,14 +72,13 @@ namespace AMDiS {
return *this;
}
FiniteElemSpace *FiniteElemSpace::provideFeSpace(DOFAdmin *admin,
const BasisFunction *basFcts,
Mesh *mesh,
std::string name_)
{
int numSpaces = static_cast<int>(feSpaces.size());
for (int i = 0; i < numSpaces; i++)
for (unsigned int i = 0; i < feSpaces.size(); i++)
if (feSpaces[i]->basFcts == basFcts &&
feSpaces[i]->mesh == mesh &&
(!admin || (admin && feSpaces[i]->admin == admin)))
......@@ -85,6 +87,7 @@ namespace AMDiS {
return new FiniteElemSpace(admin, basFcts, mesh, name_);
}
int FiniteElemSpace::calcMemoryUsage()
{
int result = sizeof(FiniteElemSpace);
......@@ -92,6 +95,7 @@ namespace AMDiS {
return result;
}
void FiniteElemSpace::clear()
{
for (int i = 0; i < static_cast<int>(feSpaces.size()); i++) {
......
This diff is collapsed.
......@@ -69,12 +69,6 @@ namespace AMDiS {
const int Mesh::MAX_DOF = 100;
std::map<std::pair<DegreeOfFreedom, int>, DegreeOfFreedom*> Mesh::serializedDOFs;
struct delmem {
DegreeOfFreedom* ptr;
int len;
};
Mesh::Mesh(std::string aName, int dimension)
: name(aName),
dim(dimension),
......@@ -131,7 +125,7 @@ namespace AMDiS {
if (elementDataPrototype)
delete elementDataPrototype;
for (int i = 0; i < static_cast<int>(admin.size()); i++)
for (unsigned int i = 0; i < admin.size(); i++)
delete admin[i];
}
......@@ -405,32 +399,26 @@ namespace AMDiS {
localAdmin->setMesh(this);
std::vector<DOFAdmin*>::iterator dai =
std::find(admin.begin(), admin.end(), localAdmin);
TEST_EXIT(dai == admin.end())
TEST_EXIT(std::find(admin.begin(), admin.end(), localAdmin) == admin.end())
("admin %s is already associated to mesh %s\n",
localAdmin->getName().c_str(), this->getName().c_str());
// if this will be required, see the untested code in revision < 224
// TEST_EXIT(!initialized)("Adding DOFAdmins to initilized meshes does not work yet!\n");
admin.push_back(localAdmin);
nDofEl = 0;
localAdmin->setNumberOfPreDOFs(VERTEX,nDof[VERTEX]);
localAdmin->setNumberOfPreDofs(VERTEX, nDof[VERTEX]);
nDof[VERTEX] += localAdmin->getNumberOfDofs(VERTEX);
nDofEl += getGeo(VERTEX) * nDof[VERTEX];
if (dim > 1) {
localAdmin->setNumberOfPreDOFs(EDGE,nDof[EDGE]);
localAdmin->setNumberOfPreDofs(EDGE, nDof[EDGE]);
nDof[EDGE] += localAdmin->getNumberOfDofs(EDGE);
nDofEl += getGeo(EDGE) * nDof[EDGE];
}
localAdmin->setNumberOfPreDOFs(CENTER,nDof[CENTER]);
nDof[CENTER] += localAdmin->getNumberOfDofs(CENTER);
localAdmin->setNumberOfPreDofs(CENTER, nDof[CENTER]);
nDof[CENTER] += localAdmin->getNumberOfDofs(CENTER);
nDofEl += nDof[CENTER];
TEST_EXIT_DBG(nDof[VERTEX] > 0)("no vertex dofs\n");
......@@ -445,7 +433,7 @@ namespace AMDiS {
}
if (dim == 3) {
localAdmin->setNumberOfPreDOFs(FACE,nDof[FACE]);
localAdmin->setNumberOfPreDofs(FACE, nDof[FACE]);
nDof[FACE] += localAdmin->getNumberOfDofs(FACE);
nDofEl += getGeo(FACE) * nDof[FACE];
node[FACE] = nNodeEl;
......@@ -514,7 +502,7 @@ namespace AMDiS {
TEST_EXIT_DBG(localAdmin)("no admin[%d]\n", i);
int n = localAdmin->getNumberOfDofs(position);
int n0 = localAdmin->getNumberOfPreDOFs(position);
int n0 = localAdmin->getNumberOfPreDofs(position);
TEST_EXIT_DBG(n + n0 <= ndof)("n=%d, n0=%d too large: ndof=%d\n", n, n0, ndof);
......@@ -557,11 +545,11 @@ namespace AMDiS {
const DOFAdmin *Mesh::createDOFAdmin(std::string lname, DimVec<int> lnDof)
{
FUNCNAME("Mesh::createDOFAdmin()");
DOFAdmin *localAdmin = new DOFAdmin(this, lname);
for (int i = 0; i < dim + 1; i++)
localAdmin->setNumberOfDOFs(i, lnDof[i]);
localAdmin->setNumberOfDofs(i, lnDof[i]);
addDOFAdmin(localAdmin);
......@@ -612,7 +600,7 @@ namespace AMDiS {
for (unsigned int i = 0; i < admin.size(); i++) {
DOFAdmin *localAdmin = admin[i];
int n = localAdmin->getNumberOfDofs(position);
int n0 = localAdmin->getNumberOfPreDOFs(position);
int n0 = localAdmin->getNumberOfPreDofs(position);
TEST_EXIT_DBG(n + n0 <= ndof)
("n = %d, n0 = %d too large: ndof = %d\n", n, n0, ndof);
......@@ -1221,7 +1209,7 @@ namespace AMDiS {
Mesh testMesh(name, dim);
testMesh.setElementDataPrototype(new LeafDataEstimatableVec(new LeafDataCoarsenableVec));
DOFAdmin *localAdmin = new DOFAdmin(&testMesh, admin[0]->getName());
localAdmin->setNumberOfDOFs(admin[0]->getNumberOfDofs());
localAdmin->setNumberOfDofs(admin[0]->getNumberOfDofs());
testMesh.addDOFAdmin(localAdmin);
MacroInfo *testMacroInfo =
......
......@@ -45,7 +45,7 @@ namespace AMDiS {
if (initFlag.isSet(CREATE_MESH) ||
(!adoptFlag.isSet(INIT_MESH) &&
(initFlag.isSet(INIT_SYSTEM) || initFlag.isSet(INIT_FE_SPACE))))
createMesh();
createMesh();
if (adoptProblem &&
(adoptFlag.isSet(INIT_MESH) ||
......@@ -66,6 +66,10 @@ namespace AMDiS {
componentMeshes[i] = componentMeshes[0];
}
// If the problem adopts the mesh but creates an own FE space.
if (initFlag.isSet(INIT_FE_SPACE)) {
}
}
}
......@@ -304,6 +308,7 @@ namespace AMDiS {
feSpaceMap[std::pair<Mesh*, int>(componentMeshes[i], degree)] = newFeSpace;
feSpaces.push_back(newFeSpace);
}
componentSpaces[i] = feSpaceMap[std::pair<Mesh*, int>(componentMeshes[i], degree)];
}
......
......@@ -49,7 +49,7 @@ RecoveryStructure& RecoveryStructure::operator=(const RecoveryStructure& rhs)
if (rhs.neighbors) {
if (!neighbors)
neighbors = new std::set<DegreeOfFreedom>;
*neighbors = *rhs.neighbors ;
*neighbors = *rhs.neighbors;
} else {
if (neighbors) {
delete neighbors;
......@@ -371,7 +371,7 @@ void Recovery::compute_interior_sums(DOFVector<double> *uh, ElInfo *elInfo,
void Recovery::compute_node_sums(DOFVector<double> *uh, ElInfo *elInfo,
RecoveryStructure *rec_struct, DimVec<int> preDOFs,
RecoveryStructure *rec_struct, DimVec<int> preDofs,
int n_vertices, int n_edges, int n_faces)
{