File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -411,8 +411,13 @@ class Integrator
411411 /* * \brief Construct an Integrator given an order of accuracy. */
412412 Integrator (int o);
413413 virtual ~Integrator ();
414- /* * \brief Run the Integrator over the local Mesh. */
415- void process (Mesh* m);
414+ /* * \brief Run the Integrator over the local Mesh.
415+ * \param m mesh to integrate over
416+ * \param dim optional dimension to integrate over. This defaults to
417+ * integration over the mesh dimesion which may not be correct e.g. in the case
418+ * of a 1D element embeded in 3D space.
419+ * */
420+ void process (Mesh* m, int dim=-1 );
416421 /* * \brief Run the Integrator over a Mesh Element. */
417422 void process (MeshElement* e);
418423 /* * \brief User callback: element entry.
Original file line number Diff line number Diff line change 88#include " apfIntegrate.h"
99#include " apfMesh.h"
1010#include " apf.h"
11+ #include " pcu_util.h"
1112
1213namespace apf {
1314
@@ -640,9 +641,11 @@ void Integrator::parallelReduce()
640641{
641642}
642643
643- void Integrator::process (Mesh* m)
644+ void Integrator::process (Mesh* m, int d )
644645{
645- int d = m->getDimension ();
646+ if (d<0 )
647+ d = m->getDimension ();
648+ PCU_DEBUG_ASSERT (d<=m->getDimension ());
646649 MeshEntity* entity;
647650 MeshIterator* elements = m->begin (d);
648651 while ((entity = m->iterate(elements)))
You can’t perform that action at this time.
0 commit comments