Programming tasks to Scientific Computing I
Public Member Functions | Protected Types | Protected Attributes | Static Protected Attributes | List of all members
L2NormSqrDiff< ConfiguratorType > Class Template Reference

Calculates the $L^2$ norm of the difference between exact and numerical solution. More...

#include <errorMeasurements.h>

Public Member Functions

 L2NormSqrDiff (const ConfiguratorType &conf, const VectorType &numericalSolution)
 
RealType evaluateIntegrand (const typename ConfiguratorType::ElementType &el, int q) const
 
- Public Member Functions inherited from shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, L2NormSqrDiff< ConfiguratorType > >
 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 Types

typedef ConfiguratorType::RealType RealType
 
typedef ConfiguratorType::VectorType VectorType
 
typedef ConfiguratorType::TangentVecType TangentVecType
 

Protected Attributes

std::unique_ptr< typename ConfiguratorType::VectorType_dof
 
std::unique_ptr< shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType > > _x
 
const shellFE::DiscreteFunctionDefaultShellFE< ConfiguratorType_numericalSolution
 
- Protected Attributes inherited from shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, L2NormSqrDiff< ConfiguratorType > >
const ConfiguratorType_config
 

Static Protected Attributes

static const int dim = 3
 

Additional Inherited Members

- Public Types inherited from shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, L2NormSqrDiff< ConfiguratorType > >
typedef ConfiguratorType::RealType RealType
 
typedef ConfiguratorType::ElementType ElementType
 
- Protected Member Functions inherited from shellFE::UnitTriangleFENonlinIntegrationScalarIntegratorShellFE< ConfiguratorType, L2NormSqrDiff< ConfiguratorType > >
L2NormSqrDiff< ConfiguratorType > & asImp ()
 
const L2NormSqrDiff< ConfiguratorType > & asImp () const
 

Detailed Description

template<typename ConfiguratorType>
class L2NormSqrDiff< ConfiguratorType >

Calculates the $L^2$ norm of the difference between exact and numerical solution.

Definition at line 14 of file errorMeasurements.h.

Member Typedef Documentation

template<typename ConfiguratorType >
typedef ConfiguratorType::RealType L2NormSqrDiff< ConfiguratorType >::RealType
protected

Definition at line 18 of file errorMeasurements.h.

template<typename ConfiguratorType >
typedef ConfiguratorType::TangentVecType L2NormSqrDiff< ConfiguratorType >::TangentVecType
protected

Definition at line 20 of file errorMeasurements.h.

template<typename ConfiguratorType >
typedef ConfiguratorType::VectorType L2NormSqrDiff< ConfiguratorType >::VectorType
protected

Definition at line 19 of file errorMeasurements.h.

Constructor & Destructor Documentation

template<typename ConfiguratorType >
L2NormSqrDiff< ConfiguratorType >::L2NormSqrDiff ( const ConfiguratorType conf,
const VectorType numericalSolution 
)
inline

Definition at line 30 of file errorMeasurements.h.

32  _numericalSolution(this->_config, numericalSolution)
33  {
34  int numGlobalDofs = this->_config.getNumGlobalDofs();
35  const typename ConfiguratorType::InitType &grid = this->_config.getInitializer();
36  _dof.reset(new typename ConfiguratorType::VectorType (dim * numGlobalDofs));
37 
38  for (int i = 0; i < numGlobalDofs; ++i) {
39  for (int c = 0; c < dim; ++c) {
40  (*_dof)[c*numGlobalDofs + i] = grid.getVertex(i)[c];
41  }
42  }
43 
45  }
DataTypeContainer::VectorType VectorType
const Point3DType & getVertex(const int num) const
Definition: triangMesh.h:66
static const int dim
const shellFE::DiscreteFunctionDefaultShellFE< ConfiguratorType > _numericalSolution
Helper class to evaluate a discrete vector-valued nodal function on a given mesh. ...
std::unique_ptr< typename ConfiguratorType::VectorType > _dof
const InitType & getInitializer() const
Returns the mesh.
int getNumGlobalDofs() const
Returns the number of global degrees of freedom.
std::unique_ptr< shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType > > _x
Integrator to compute , where is the argument of the operator.

Member Function Documentation

template<typename ConfiguratorType >
RealType L2NormSqrDiff< ConfiguratorType >::evaluateIntegrand ( const typename ConfiguratorType::ElementType el,
int  q 
) const
inline
Todo:
Evaluate $ L^2 $ norm

Definition at line 47 of file errorMeasurements.h.

48  {
49  RealType nl = 0.0;
50 
52 
53  return nl;
54  }
double RealType
Definition: ex1.cpp:22

Member Data Documentation

template<typename ConfiguratorType >
std::unique_ptr<typename ConfiguratorType::VectorType> L2NormSqrDiff< ConfiguratorType >::_dof
protected

Definition at line 24 of file errorMeasurements.h.

template<typename ConfiguratorType >
const shellFE::DiscreteFunctionDefaultShellFE<ConfiguratorType> L2NormSqrDiff< ConfiguratorType >::_numericalSolution
protected

Definition at line 27 of file errorMeasurements.h.

template<typename ConfiguratorType >
std::unique_ptr<shellFE::DiscreteVectorFunctionDefaultShellFE<ConfiguratorType> > L2NormSqrDiff< ConfiguratorType >::_x
protected

Definition at line 25 of file errorMeasurements.h.

template<typename ConfiguratorType >
const int L2NormSqrDiff< ConfiguratorType >::dim = 3
staticprotected

Definition at line 22 of file errorMeasurements.h.


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