AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > Class Template Reference

#include <AbstractFunctionalCalculator.hpp>

Collaboration diagram for AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

double Calculate (TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, Vec solution)

Private Member Functions

virtual double GetIntegrand (ChastePoint< SPACE_DIM > &rX, c_vector< double, PROBLEM_DIM > &rU, c_matrix< double, PROBLEM_DIM, SPACE_DIM > &rGradU)=0
double CalculateOnElement (Element< ELEMENT_DIM, SPACE_DIM > &rElement)

Private Attributes

ReplicatableVector mSolutionReplicated


Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
class AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >

This is an abstract class for computing user-defined integral-based functionals of a solution on the mesh. The user needs to define GetIntegrand() in the concrete class, and this class can then be used to compute the integral of f(x,u,grad_u) over the mesh, where x is position, u is the solution at x (possibly with multiple components, for which PROBLEM_DIM>1), grad_u the gradient of u and f the integrand as defined in the concrete class.

Note linear basis functions and 2 quad points per dimension are currently hardcoded.

Definition at line 51 of file AbstractFunctionalCalculator.hpp.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual double AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetIntegrand ( ChastePoint< SPACE_DIM > &  rX,
c_vector< double, PROBLEM_DIM > &  rU,
c_matrix< double, PROBLEM_DIM, SPACE_DIM > &  rGradU 
) [private, pure virtual]

The integrand. Must be defined by the user

Referenced by AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CalculateOnElement().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
double AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CalculateOnElement ( Element< ELEMENT_DIM, SPACE_DIM > &  rElement  )  [inline, private]

Compute the contribution to the integral from one element

NOTE: This assumes that the Jacobian is constant on an element, ie no curvilinear bases were used for position

Todo:
Check if we are using a mesh with cached Jacobians, if so, get it from the mesh rather than calling the calculate method.

Definition at line 63 of file AbstractFunctionalCalculator.hpp.

References AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetIntegrand(), GaussianQuadratureRule< ELEM_DIM >::GetNumQuadPoints(), GaussianQuadratureRule< ELEM_DIM >::GetWeight(), AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mSolutionReplicated, and GaussianQuadratureRule< ELEM_DIM >::rGetQuadPoint().

Referenced by AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Calculate().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
double AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Calculate ( TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh,
Vec  solution 
) [inline]


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
ReplicatableVector AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mSolutionReplicated [private]


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

Generated on Wed Mar 18 12:52:04 2009 for Chaste by  doxygen 1.5.5