SCOREC core
Parallel unstructured mesh tools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
apf::Integrator Class Referenceabstract

A virtual base for user-defined integrators. More...

Public Member Functions

 Integrator (int o)
 Construct an Integrator given an order of accuracy.
 
void process (Mesh *m, int dim=-1)
 Run the Integrator over the local Mesh. More...
 
void process (MeshElement *e)
 Run the Integrator over a Mesh Element.
 
virtual void inElement (MeshElement *)
 User callback: element entry. More...
 
virtual void outElement ()
 User callback: element exit. More...
 
virtual void atPoint (Vector3 const &p, double w, double dV)=0
 User callback: accumulation. More...
 
virtual void parallelReduce ()
 User callback: parallel reduction. More...
 

Detailed Description

A virtual base for user-defined integrators.

Users of APF can define an Integrator object to handle integrating expressions over elements and over meshes. Users specify the accuracy of the integration and provide accumulation callbacks which APF uses at each integration point. The APF-provided process functions will perform the integration over an element or mesh using the callbacks. In parallel, users must provide a reduction callback to turn locally accumulated values into a globally integrated value.

Definition at line 415 of file apf.h.

Member Function Documentation

virtual void apf::Integrator::atPoint ( Vector3 const &  p,
double  w,
double  dV 
)
pure virtual

User callback: accumulation.

APF will call this function at each integration point. Users should evaluate their expression and accumulate the value.

Parameters
pThe local coordinates of the point.
wThe integration weight of the point.
dVThe differential volume at that point.
virtual void apf::Integrator::inElement ( MeshElement )
virtual

User callback: element entry.

APF will call this function every time the Integrator begins operating over a new element. Users can then construct Field Elements, for example.

virtual void apf::Integrator::outElement ( )
virtual

User callback: element exit.

APF will call this function once an Integrator is done operating over an element. This can be used to destroy Field Elements, for example.

virtual void apf::Integrator::parallelReduce ( )
virtual

User callback: parallel reduction.

This function should use communication to reduce process-local integrations into a global mesh integration, if that is the user's goal.

void apf::Integrator::process ( Mesh m,
int  dim = -1 
)

Run the Integrator over the local Mesh.

Parameters
mmesh to integrate over
dimoptional dimension to integrate over. This defaults to integration over the mesh dimesion which may not be correct e.g. in the case of a 1D element embeded in 3D space.

The documentation for this class was generated from the following file: