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

Helper class to evaluate a discrete vector-valued nodal function on a given mesh. More...

#include <discreteFunctionShellFE.h>

Public Types

typedef ConfiguratorType::RealType RealType
 
typedef ConfiguratorType::DomVecType DomVecType
 
typedef ConfiguratorType::TangentVecType TangentVecType
 
typedef ConfiguratorType::VectorType VectorType
 
typedef ConfiguratorType::Matrix22 Matrix22
 
typedef ConfiguratorType::Matrix32 Matrix32
 
typedef ConfiguratorType::Matrix33 Matrix33
 
typedef ConfiguratorType::ElementType ElementType
 
typedef DiscreteFunctionDefaultShellFE< ConfiguratorType, Eigen::Ref< const VectorType > > DiscFuncType
 

Public Member Functions

 DiscreteVectorFunctionDefaultShellFE (const ConfiguratorType &Configurator, const VectorType &Dofs, const int numComponents)
 
void evaluate (const ElementType &El, const DomVecType &RefCoord, TangentVecType &Value) const
 
void evaluateAtQuadPoint (const ElementType &El, int QuadPoint, TangentVecType &Value) const
 
void evaluateGradient (const ElementType &El, const DomVecType &RefCoord, Matrix32 &Dx) const
 
void evaluateGradientAtQuadPoint (const ElementType &El, int QuadPoint, Matrix32 &Dx) const
 
void evaluateFirstFundamentalForm (const ElementType &El, const DomVecType &RefCoord, Matrix22 &g) const
 
void evaluateFirstFundamentalFormAtQuadPoint (const ElementType &El, int QuadPoint, Matrix22 &g) const
 
void evaluateFirstFundamentalForm (const Matrix32 &Dx, Matrix22 &g) const
 
void evaluateNormalAtQuadPointOnShell (const ElementType &El, int QuadPoint, TangentVecType &normal) const
 
void evaluateNormal (const Matrix32 &Dx, TangentVecType &normal) const
 
const DiscFuncTypeoperator[] (int i) const
 
DiscFuncTypeoperator[] (int i)
 

Public Attributes

const int _numComponents
 
std::vector< Eigen::Ref< const VectorType > > _refs
 
std::vector< DiscFuncType_discrFuncs
 

Detailed Description

template<typename ConfiguratorType>
class shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >

Helper class to evaluate a discrete vector-valued nodal function on a given mesh.

Definition at line 90 of file discreteFunctionShellFE.h.

Member Typedef Documentation

Definition at line 101 of file discreteFunctionShellFE.h.

Definition at line 93 of file discreteFunctionShellFE.h.

Definition at line 100 of file discreteFunctionShellFE.h.

Definition at line 96 of file discreteFunctionShellFE.h.

Definition at line 97 of file discreteFunctionShellFE.h.

Definition at line 98 of file discreteFunctionShellFE.h.

Definition at line 92 of file discreteFunctionShellFE.h.

Definition at line 94 of file discreteFunctionShellFE.h.

Definition at line 95 of file discreteFunctionShellFE.h.

Constructor & Destructor Documentation

template<typename ConfiguratorType >
shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::DiscreteVectorFunctionDefaultShellFE ( const ConfiguratorType Configurator,
const VectorType Dofs,
const int  numComponents 
)
inline

Definition at line 109 of file discreteFunctionShellFE.h.

109  :
110  _numComponents ( numComponents )
111  {
112  const int numGlobalDofs = Configurator.getNumGlobalDofs();
113  _refs.reserve( _numComponents );
114  _discrFuncs.reserve( _numComponents );
115 
116  _refs.push_back ( Dofs.segment( 0, numGlobalDofs) );
117  _refs.push_back ( Dofs.segment( numGlobalDofs, numGlobalDofs) );
118  _refs.push_back ( Dofs.segment( 2 * numGlobalDofs, numGlobalDofs) );
119 
120  _discrFuncs.push_back ( DiscFuncType ( Configurator, _refs[0] ) );
121  _discrFuncs.push_back ( DiscFuncType ( Configurator, _refs[1] ) );
122  _discrFuncs.push_back ( DiscFuncType ( Configurator, _refs[2] ) );
123  }
int getNumGlobalDofs() const
Returns the number of global degrees of freedom.
std::vector< Eigen::Ref< const VectorType > > _refs
DiscreteFunctionDefaultShellFE< ConfiguratorType, Eigen::Ref< const VectorType > > DiscFuncType

Member Function Documentation

template<typename ConfiguratorType >
void shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::evaluate ( const ElementType El,
const DomVecType RefCoord,
TangentVecType Value 
) const
inline

Definition at line 125 of file discreteFunctionShellFE.h.

125  {
126  for ( int c = 0; c < 3; ++c )
127  Value[c] = _discrFuncs[c].evaluate ( El, RefCoord );
128  }
void evaluate(const ElementType &El, const DomVecType &RefCoord, TangentVecType &Value) const
template<typename ConfiguratorType >
void shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::evaluateAtQuadPoint ( const ElementType El,
int  QuadPoint,
TangentVecType Value 
) const
inline

Definition at line 130 of file discreteFunctionShellFE.h.

130  {
131  for ( int c = 0; c < 3; ++c )
132  Value[c] = _discrFuncs[c].evaluateAtQuadPoint ( El, QuadPoint );
133  }
void evaluateAtQuadPoint(const ElementType &El, int QuadPoint, TangentVecType &Value) const
template<typename ConfiguratorType >
void shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::evaluateFirstFundamentalForm ( const ElementType El,
const DomVecType RefCoord,
Matrix22 g 
) const
inline

Definition at line 153 of file discreteFunctionShellFE.h.

153  {
154  Matrix32 Dx;
155  evaluateGradient( El, RefCoord, Dx );
156  g = Dx.transpose() * Dx;
157  }
void evaluateGradient(const ElementType &El, const DomVecType &RefCoord, Matrix32 &Dx) const
template<typename ConfiguratorType >
void shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::evaluateFirstFundamentalForm ( const Matrix32 Dx,
Matrix22 g 
) const
inline

Definition at line 166 of file discreteFunctionShellFE.h.

166  {
167  g = Dx.transpose() * Dx;
168  }
template<typename ConfiguratorType >
void shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::evaluateFirstFundamentalFormAtQuadPoint ( const ElementType El,
int  QuadPoint,
Matrix22 g 
) const
inline

Definition at line 160 of file discreteFunctionShellFE.h.

160  {
161  Matrix32 Dx;
162  evaluateGradientAtQuadPoint( El, QuadPoint, Dx );
163  g = Dx.transpose() * Dx;
164  }
void evaluateGradientAtQuadPoint(const ElementType &El, int QuadPoint, Matrix32 &Dx) const
template<typename ConfiguratorType >
void shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::evaluateGradient ( const ElementType El,
const DomVecType RefCoord,
Matrix32 Dx 
) const
inline

Definition at line 135 of file discreteFunctionShellFE.h.

135  {
136  DomVecType v;
137  for ( int c = 0; c < 3; c++ ) {
138  _discrFuncs[c].evaluateGradient ( El, RefCoord, v );
139  Dx( c, 0 ) = v[0];
140  Dx( c, 1 ) = v[1];
141  }
142  }
template<typename ConfiguratorType >
void shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::evaluateGradientAtQuadPoint ( const ElementType El,
int  QuadPoint,
Matrix32 Dx 
) const
inline

Definition at line 144 of file discreteFunctionShellFE.h.

144  {
145  DomVecType v;
146  for ( int c = 0; c < 3; ++c ) {
147  _discrFuncs[c].evaluateGradientAtQuadPoint ( El, QuadPoint, v );
148  Dx( c, 0 ) = v[0];
149  Dx( c, 1 ) = v[1];
150  }
151  }
template<typename ConfiguratorType >
void shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::evaluateNormal ( const Matrix32 Dx,
TangentVecType normal 
) const
inline

Definition at line 178 of file discreteFunctionShellFE.h.

178  {
179  TangentVecType unNormalizedNormal ( (Dx.col(0)).cross(Dx.col(1)) );
180  normal = unNormalizedNormal.normalized();
181  }
template<typename ConfiguratorType >
void shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::evaluateNormalAtQuadPointOnShell ( const ElementType El,
int  QuadPoint,
TangentVecType normal 
) const
inline

Definition at line 171 of file discreteFunctionShellFE.h.

171  {
172  Matrix32 Dx;
173  evaluateGradientAtQuadPoint ( El, QuadPoint, Dx );
174  TangentVecType unNormalizedNormal ( (Dx.col(0)).cross(Dx.col(1)) );
175  normal = unNormalizedNormal.normalized();
176  }
void evaluateGradientAtQuadPoint(const ElementType &El, int QuadPoint, Matrix32 &Dx) const
template<typename ConfiguratorType >
const DiscFuncType& shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::operator[] ( int  i) const
inline

Definition at line 184 of file discreteFunctionShellFE.h.

184 { return _discrFuncs[i];}
template<typename ConfiguratorType >
DiscFuncType& shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::operator[] ( int  i)
inline

Definition at line 185 of file discreteFunctionShellFE.h.

185 { return _discrFuncs[i];}

Member Data Documentation

template<typename ConfiguratorType >
std::vector<DiscFuncType> shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::_discrFuncs
mutable

Definition at line 105 of file discreteFunctionShellFE.h.

template<typename ConfiguratorType >
const int shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::_numComponents

Definition at line 103 of file discreteFunctionShellFE.h.

template<typename ConfiguratorType >
std::vector<Eigen::Ref<const VectorType> > shellFE::DiscreteVectorFunctionDefaultShellFE< ConfiguratorType >::_refs
mutable

Definition at line 104 of file discreteFunctionShellFE.h.


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