Programming tasks to Scientific Computing I
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, Imp > Class Template Reference

Integrator to compute $\int_\Omega f(\phi,x) dx$, where $\phi$ is the argument of the operator. More...

#include <unityTriangleIntegratorShellFE.h>

Public Types

typedef ConfiguratorType::RealType RealType
 
typedef ConfiguratorType::ElementType ElementType
 

Public Member Functions

 UnitTriangleFENonlinIntegrationScalarIntegratorShellFE (const ConfiguratorType &Config)
 
virtual ~UnitTriangleFENonlinIntegrationScalarIntegratorShellFE ()
 
void assembleAdd (RealType &Dest) const
 
RealType evaluateIntegrand (const typename ConfiguratorType::ElementType &El, int QuadPoint) const
 interface function, has to be provided in derived classes. More...
 

Protected Member Functions

Imp & asImp ()
 
const Imp & asImp () const
 

Protected Attributes

const ConfiguratorType_config
 

Detailed Description

template<typename ConfiguratorType, typename Imp>
class shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, Imp >

Integrator to compute $\int_\Omega f(\phi,x) dx$, where $\phi$ is the argument of the operator.

Definition at line 12 of file unityTriangleIntegratorShellFE.h.

Member Typedef Documentation

Definition at line 15 of file unityTriangleIntegratorShellFE.h.

Definition at line 14 of file unityTriangleIntegratorShellFE.h.

Constructor & Destructor Documentation

template<typename ConfiguratorType, typename Imp>
virtual shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, Imp >::~UnitTriangleFENonlinIntegrationScalarIntegratorShellFE ( )
inlinevirtual

Definition at line 22 of file unityTriangleIntegratorShellFE.h.

22 {}

Member Function Documentation

template<typename ConfiguratorType, typename Imp>
Imp& shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, Imp >::asImp ( )
inlineprotected

Definition at line 50 of file unityTriangleIntegratorShellFE.h.

50 { return static_cast<Imp&> ( *this ); }
template<typename ConfiguratorType, typename Imp>
const Imp& shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, Imp >::asImp ( ) const
inlineprotected

Definition at line 51 of file unityTriangleIntegratorShellFE.h.

51 { return static_cast<const Imp&> ( *this ); }
template<typename ConfiguratorType, typename Imp>
void shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, Imp >::assembleAdd ( RealType Dest) const
inline

Definition at line 24 of file unityTriangleIntegratorShellFE.h.

24  {
25 
26  RealType res = 0.;
27 
28  for ( int elementIdx = 0; elementIdx < _config.getInitializer().getNumTriangs(); ++elementIdx){
29  const ElementType& El ( _config.getInitializer().getTriang( elementIdx ) );
31  const int numQuadPoints = bfs.numQuadPoints( );
32 
33  RealType a = 0.;
34  for ( int q = 0; q < numQuadPoints; ++q ) {
35  a += this->asImp().evaluateIntegrand ( El, q ) * bfs.getWeight ( q );
36  }
37  res += a;
38  }
39  Dest += 0.5 * res;
40  }
const TriangleType & getTriang(const int num) const
Definition: triangMesh.h:87
int numQuadPoints() const
Returns the number of quadrature points.
int getNumTriangs() const
Definition: triangMesh.h:46
const InitType & getInitializer() const
Returns the mesh.
double RealType
Definition: ex1.cpp:22
const BaseFuncSetType & getBaseFunctionSet(const ElementType &) const
Returns the base funcitons set for an element.
template<typename ConfiguratorType, typename Imp>
RealType shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, Imp >::evaluateIntegrand ( const typename ConfiguratorType::ElementType El,
int  QuadPoint 
) const
inline

interface function, has to be provided in derived classes.

Definition at line 43 of file unityTriangleIntegratorShellFE.h.

43  {
44  throw std::invalid_argument( aol::strprintf ( "Called the interface function. In File %s at line %d.", __FILE__, __LINE__ ).c_str() );
45  return this->asImp().evaluateIntegrand ( El, QuadPoint );
46  }
string strprintf(const char *format,...)
Give back formatted string, analogously to sprintf, but save the long way &#39;round with char arrays...
Definition: aol.cpp:5

Member Data Documentation

template<typename ConfiguratorType, typename Imp>
const ConfiguratorType& shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, Imp >::_config
protected

Definition at line 17 of file unityTriangleIntegratorShellFE.h.


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