Permalink
Browse files

Merge branch 'global_localheap_reset_when_used' into 'master'

reset local heap after use (__call__ of coeffcts.)

See merge request jschoeberl/ngsolve!289
  • Loading branch information...
JSchoeberl committed Jan 23, 2018
2 parents 8f64933 + 09efa08 commit 13ea6aff51f54512cee6ba504e7b6dc91e550115
Showing with 3 additions and 0 deletions.
  1. +3 −0 comp/python_comp.cpp
@@ -2205,6 +2205,7 @@ used_idnrs : list of int = None
.def("__call__",
[](shared_ptr<GF> self, double x, double y, double z)
{
HeapReset hr(glh);
auto space = self->GetFESpace();
auto evaluator = space->GetEvaluator();
IntegrationPoint ip;
@@ -2243,6 +2244,7 @@ used_idnrs : list of int = None
.def("__call__",
[](shared_ptr<GF> self, const BaseMappedIntegrationPoint & mip)
{
HeapReset hr(glh);
auto space = self->GetFESpace();
ElementId ei = mip.GetTransformation().GetElementId();
@@ -2279,6 +2281,7 @@ used_idnrs : list of int = None
.def("D",
[](shared_ptr<GF> self, const double &x, const double &y, const double &z)
{
HeapReset hr(glh);
const FESpace & space = *self->GetFESpace();
IntegrationPoint ip;
int dim_mesh = space.GetMeshAccess()->GetDimension();

0 comments on commit 13ea6af

Please sign in to comment.