Skip to content
Snippets Groups Projects
Commit fe4a78e4 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

dg : clean dgFunctionEvaluator, merge functionEvaluatorInterface in functionEvaluator

dg : rewrite strong boundary condition for continuous galerkin
parent c3fe691a
No related branches found
No related tags found
No related merge requests found
...@@ -115,16 +115,18 @@ MElement *MElementOctree::find(double x, double y, double z, int dim) ...@@ -115,16 +115,18 @@ MElement *MElementOctree::find(double x, double y, double z, int dim)
{ {
double P[3] = {x, y, z}; double P[3] = {x, y, z};
MElement *e = (MElement*)Octree_Search(P, _octree); MElement *e = (MElement*)Octree_Search(P, _octree);
if (dim == -1 || !e || e->getDim() == dim) if (e && (dim == -1 || e->getDim() == dim))
return e; return e;
std::list<void*> l; std::list<void*> l;
Octree_SearchAll(P, _octree, &l); if (e && e->getDim() != dim) {
for (std::list<void*>::iterator it = l.begin(); it != l.end(); it++) { Octree_SearchAll(P, _octree, &l);
MElement *el = (MElement*) *it; for (std::list<void*>::iterator it = l.begin(); it != l.end(); it++) {
if (el->getDim() == dim) MElement *el = (MElement*) *it;
return el; if (el->getDim() == dim) {
return el;
}
}
} }
// JF : can you check if this is still needed, now that we changed Octree_SearchAll
if (!e || (dim != -1 && e->getDim() != dim)){ if (!e || (dim != -1 && e->getDim() != dim)){
double initialTol = MElement::getTolerance(); double initialTol = MElement::getTolerance();
double tol = initialTol; double tol = initialTol;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment