Commit cdf68971 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Removed *_MEMORY macros in cFEM

parent 030e4563
......@@ -11,10 +11,9 @@
#include "CompositeFEMMethods.h"
void
CompositeFEMMethods::setPosLsToVal(DOFVector<double> *dof,
const double &val,
const DOFVector<double> *lsFct_dof)
void CompositeFEMMethods::setPosLsToVal(DOFVector<double> *dof,
const double &val,
const DOFVector<double> *lsFct_dof)
{
DOFVector<double>::Iterator it_dof(dof, USED_DOFS);
DOFVector<double>::Iterator it_lsFct_dof(
......@@ -25,17 +24,14 @@ CompositeFEMMethods::setPosLsToVal(DOFVector<double> *dof,
++it_dof, ++it_lsFct_dof) {
// Is vertex in domain with positive level set function values ?
if (*it_lsFct_dof > 0) {
if (*it_lsFct_dof > 0)
*it_dof = val;
}
}
}
void
CompositeFEMMethods::setPosLsToFct(
DOFVector<double> *dof,
const AbstractFunction<double, WorldVector<double> > *fct,
const DOFVector<double> *lsFct_dof)
void CompositeFEMMethods::setPosLsToFct(DOFVector<double> *dof,
const AbstractFunction<double, WorldVector<double> > *fct,
const DOFVector<double> *lsFct_dof)
{
const BasisFunction *basisFcts = dof->getFESpace()->getBasisFcts();
const DOFAdmin *admin = dof->getFESpace()->getAdmin();
......@@ -61,19 +57,17 @@ CompositeFEMMethods::setPosLsToFct(
for (int i=0; i<=dim; ++i) {
// Is vertex in domain with positive level set function values ?
if (locVec[i] > 0) {
if (locVec[i] > 0)
(*dof)[locInd[i]] = (*fct)(elInfo->getCoord(i));
}
}
elInfo = stack.traverseNext(elInfo);
}
}
void
CompositeFEMMethods::printBoundaryElements(const std::string fn_str,
ElementLevelSet *elLS,
FiniteElemSpace *feSpace)
void CompositeFEMMethods::printBoundaryElements(const std::string fn_str,
ElementLevelSet *elLS,
FiniteElemSpace *feSpace)
{
FUNCNAME("CompositeFEMMethods::printBoundaryElements()");
......@@ -92,14 +86,14 @@ CompositeFEMMethods::printBoundaryElements(const std::string fn_str,
WorldVector<double> coord;
const int nBasFcts = feSpace->getBasisFcts()->getNumber();
DegreeOfFreedom *locInd = GET_MEMORY(DegreeOfFreedom, nBasFcts);
DegreeOfFreedom *locInd = new DegreeOfFreedom[nBasFcts];
ElInfo *loc_elInfo = stack.traverseFirst(feSpace->getMesh(),
-1,
Mesh::CALL_LEAF_EL |
Mesh::FILL_BOUND |
Mesh::FILL_COORDS);
while(loc_elInfo) {
while (loc_elInfo) {
// Get local indices of vertices.
feSpace->getBasisFcts()->getLocalIndices(
......@@ -137,7 +131,7 @@ CompositeFEMMethods::printBoundaryElements(const std::string fn_str,
} // end of: mesh traverse
FREE_MEMORY(locInd, DegreeOfFreedom, nBasFcts);
delete [] locInd;
boundaryOut << "\nNumber of boundary elements: \t" << boundEl_cntr << "\n";
......
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