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

Calculates the $H^1$ norm of the difference between exact and numerical solution. More...

#include <errorMeasurements.h>

Public Member Functions

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

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, H1NormSqrDiff< ConfiguratorType > >
const ConfiguratorType_config
 

Static Protected Attributes

static const int dim = 3
 

Additional Inherited Members

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

Detailed Description

template<typename ConfiguratorType>
class H1NormSqrDiff< ConfiguratorType >

Calculates the $H^1$ norm of the difference between exact and numerical solution.

Definition at line 59 of file errorMeasurements.h.

Member Typedef Documentation

template<typename ConfiguratorType >
typedef ConfiguratorType::DomVecType H1NormSqrDiff< ConfiguratorType >::DomVecType
protected

Definition at line 66 of file errorMeasurements.h.

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

Definition at line 63 of file errorMeasurements.h.

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

Definition at line 64 of file errorMeasurements.h.

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

Definition at line 65 of file errorMeasurements.h.

Constructor & Destructor Documentation

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

Definition at line 76 of file errorMeasurements.h.

78  _numericalSolution(this->_config, numericalSolution)
79  {
80  int numGlobalDofs = this->_config.getNumGlobalDofs();
81  const typename ConfiguratorType::InitType &grid = this->_config.getInitializer();
82  _dof.reset(new typename ConfiguratorType::VectorType (dim * numGlobalDofs));
83 
84  for (int i = 0; i < numGlobalDofs; ++i) {
85  for (int c = 0; c < dim; ++c) {
86  (*_dof)[c*numGlobalDofs + i] = grid.getVertex(i)[c];
87  }
88  }
89 
91  }
const shellFE::DiscreteFunctionDefaultShellFE< ConfiguratorType > _numericalSolution
DataTypeContainer::VectorType VectorType
std::unique_ptr< shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType > > _x
const Point3DType & getVertex(const int num) const
Definition: triangMesh.h:66
static const int dim
std::unique_ptr< typename ConfiguratorType::VectorType > _dof
Helper class to evaluate a discrete vector-valued nodal function on a given mesh. ...
const InitType & getInitializer() const
Returns the mesh.
int getNumGlobalDofs() const
Returns the number of global degrees of freedom.
Integrator to compute , where is the argument of the operator.

Member Function Documentation

template<typename ConfiguratorType >
RealType H1NormSqrDiff< ConfiguratorType >::evaluateIntegrand ( const typename ConfiguratorType::ElementType el,
int  q 
) const
inline
Todo:
Evaluate $ H^1 $ norm

Definition at line 93 of file errorMeasurements.h.

94  {
95  RealType nl = 0.0;
96 
98 
99  return nl;
100  }
double RealType
Definition: ex1.cpp:22

Member Data Documentation

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

Definition at line 70 of file errorMeasurements.h.

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

Definition at line 73 of file errorMeasurements.h.

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

Definition at line 71 of file errorMeasurements.h.

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

Definition at line 68 of file errorMeasurements.h.


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