Hermes2D  2.0
Hermes::Hermes2D::Func< T > Class Template Reference

#include <forms.h>

+ Inheritance diagram for Hermes::Hermes2D::Func< T >:

Public Member Functions

 Func (int num_gip, int num_comps)
 Constructor. More...
 
virtual T & get_val_central (int k) const
 Methods designed for discontinuous functions, return errors here.
 
virtual T & get_val_neighbor (int k) const
 Methods designed for discontinuous functions, return errors here.
 
virtual T & get_dx_central (int k) const
 Methods designed for discontinuous functions, return errors here.
 
virtual T & get_dx_neighbor (int k) const
 Methods designed for discontinuous functions, return errors here.
 
virtual T & get_dy_central (int k) const
 Methods designed for discontinuous functions, return errors here.
 
virtual T & get_dy_neighbor (int k) const
 Methods designed for discontinuous functions, return errors here.
 
virtual T & get_laplace_central (int k)
 Methods designed for discontinuous functions, return errors here.
 
virtual T & get_laplace_neighbor (int k)
 Methods designed for discontinuous functions, return errors here.
 
virtual void free_ord ()
 Dellocates an instance of Func<Ord>
 
virtual void free_fn ()
 Dellocates an instance of Func<double> / Func<std::complex<double> >
 
virtual ~Func ()
 
void subtract (Func< T > *func)
 
void add (T *attribute, T *other_attribute)
 
int get_num_gip () const
 

Public Attributes

T * val
 Function values. If T == Hermes::Ord and orders vary with direction, this returns max(h_order, v_order).
 
T * dx
 
T * dy
 First-order partial derivatives.
 
T * laplace
 Sum of second-order partial derivatives. Enabled by defining H2D_USE_SECOND_DERIVATIVES in h2d_common.h.
 
T * val0
 
T * val1
 Components of a vector field.
 
T * dx0
 
T * dx1
 Components of the gradient of a vector field.
 
T * dy0
 
T * dy1
 Components of the gradient of a vector field.
 
T * curl
 Components of the curl of a vector field.
 
T * div
 Components of the div of a vector field.
 

Protected Member Functions

void subtract (T *attribute, T *other_attribute)
 Calculate this -= func for each function expations and each integration point. More...
 
void add (Func< T > *func)
 Calculate this += func for each function expations and each integration point. More...
 

Protected Attributes

const int num_gip
 Number of integration points used by this intance.
 
const int nc
 Number of components. Currently accepted values are 1 (H1, L2 space) and 2 (Hcurl, Hdiv space).
 

Friends

template<typename Scalar >
class DiscontinuousFunc
 
template<typename Scalar >
class Adapt
 
template<typename Scalar >
class KellyTypeAdapt
 
template<typename Scalar >
class DiscreteProblem
 
template<typename Scalar >
class DiscreteProblemLinear
 
template<typename Scalar >
class BasicKellyAdapt
 
template<typename Scalar >
class Hermes::Hermes2D::OGProjection
 
class ErrorEstimatorFormKelly
 
Func< Hermes::Ord > * init_fn_ord (const int order)
 Init the function for calculation the integration order.
 
Func< double > * init_fn (PrecalcShapeset *fu, RefMap *rm, const int order)
 Init the shape function for the evaluation of the volumetric/surface integral (transformation of values).
 
template<typename Scalar >
Func< Scalar > * init_fn (MeshFunction< Scalar > *fu, const int order)
 Init the mesh-function for the evaluation of the volumetric/surface integral.
 
template<typename Scalar >
Func< Scalar > * init_fn (Solution< Scalar > *fu, const int order)
 Init the solution for the evaluation of the volumetric/surface integral.
 

Detailed Description

template<typename T>
class Hermes::Hermes2D::Func< T >

Calculated function values (from the class Function) on an element for assembling.

Definition at line 42 of file forms.h.

Constructor & Destructor Documentation

template<typename T >
Hermes::Hermes2D::Func< T >::Func ( int  num_gip,
int  num_comps 
)

Constructor.

Parameters
[in]num_gipA number of integration points.
[in]num_compsA number of components.

Definition at line 27 of file forms.cpp.

template<typename T>
virtual Hermes::Hermes2D::Func< T >::~Func ( )
inlinevirtual

All deallocation done via free_fn / free_ord. This is to allow proper destruction of DiscontinuousFunc by applying delete on a Func pointer. NOTE: An error is raised if the user tries to use a Func object for a discontinuous function. Alternatively, both Func::get_*_central and Func::get_*_neighbor could return the central values as expected from a continuous function.

Definition at line 87 of file forms.h.

Member Function Documentation

template<typename T>
void Hermes::Hermes2D::Func< T >::add ( Func< T > *  func)
protected

Calculate this += func for each function expations and each integration point.

Parameters
[in]funcA function which is added to *this. A number of integratioN points and a number of component has to match.

Definition at line 90 of file forms.cpp.

template<typename T>
void Hermes::Hermes2D::Func< T >::subtract ( T *  attribute,
T *  other_attribute 
)
protected

Calculate this -= func for each function expations and each integration point.

Parameters
[in]funcA function which is subtracted from *this. A number of integratioN points and a number of component has to match.

Definition at line 80 of file forms.cpp.


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