Skip to content
Snippets Groups Projects
Commit 83ce887d authored by Amaury Johnen's avatar Amaury Johnen
Browse files

add BasisFactory::clearAll()

parent b7cf4524
No related branches found
No related tags found
No related merge requests found
......@@ -71,3 +71,24 @@ const JacobianBasis* BasisFactory::getJacobianBasis(int elementType)
if (J) js.insert(std::make_pair(elementType, J));
return J;
}
void BasisFactory::clearAll()
{
std::map<int, nodalBasis*>::iterator itF = fs.begin();
while (itF != fs.end()) {
delete itF->second;
}
fs.clear();
std::map<int, JacobianBasis*>::iterator itJ = js.begin();
while (itJ != js.end()) {
delete itJ->second;
}
js.clear();
std::map<int, bezierBasis*>::iterator itB = bs.begin();
while (itB != bs.end()) {
delete itB->second;
}
bs.clear();
}
......@@ -24,6 +24,8 @@ class BasisFactory
static const nodalBasis* getNodalBasis(int elementType);
static const bezierBasis* getBezierBasis(int elementType);
static const JacobianBasis* getJacobianBasis(int elementType);
static void clearAll();
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment