1 #ifndef __SHELLHANDLER_H 2 #define __SHELLHANDLER_H 19 template<
typename ConfiguratorType >
34 mutable VectorType
_xA;
40 _mesh( conf.getInitializer() ),
41 _numVertices ( _mesh.getNumVertices() ),
42 _numGlobalDofs ( conf.getNumGlobalDofs() ),
43 _xA ( 3 * conf.getNumGlobalDofs() )
51 for (
int nodeIdx=0; nodeIdx <
_numVertices; ++nodeIdx ) {
52 const Point3DType& coords ( _mesh.
getVertex(nodeIdx) );
54 for(
int comp=0; comp<3; ++comp )
55 _xA[nodeIdx + _numGlobalDofs * comp] = coords[comp];
66 bool clampedBoundaryCondition =
false)
const{
67 mask.resize( _numGlobalDofs,
false );
70 switch ( boundaryType ){
75 for(
int ElementIndex = 0; ElementIndex < _mesh.
getNumTriangs(); ++ElementIndex ){
76 for(
int i = 0; i < 3; i++ ){
86 for (
int nodeIdx=0; nodeIdx < _mesh.
getNumVertices(); ++nodeIdx ) {
87 const Point3DType& coords ( _mesh.
getVertex(nodeIdx) );
88 if (coords [0] == 0. ){
96 for (
int nodeIdx=0; nodeIdx < _mesh.
getNumVertices(); ++nodeIdx ) {
97 const Point3DType& coords ( _mesh.
getVertex(nodeIdx) );
98 if (coords [0] == 0. || coords[1] == 1. ){
100 mask[nodeIdx] =
true;
106 for (
int nodeIdx=0; nodeIdx < _mesh.
getNumVertices(); ++nodeIdx ) {
107 const Point3DType& coords ( _mesh.
getVertex(nodeIdx) );
108 if (coords [0] == 0. || coords [0] == 1. || coords [1] == 0. || coords[1] == 1. ){
110 mask[nodeIdx] =
true;
117 throw std::invalid_argument(
aol::strprintf (
"Wrong boundary condition. In File %s at line %d.", __FILE__, __LINE__ ).c_str() );
140 #endif //__SHANDLER_H DataTypeContainer::MaskType MaskType
DataTypeContainer::Point3DType Point3DType
DataTypeContainer::VectorType VectorType
const MaskType & getDirichletMask() const
const Point3DType & getVertex(const int num) const
int getNumVertices() const
int getNeighbour(const int elementID, const int acrossLocalEdge) const
Get neighbor on edge.
DataTypeContainer::RealType RealType
ConfiguratorType::MaskType MaskType
ConfiguratorType::Point3DType Point3DType
int getNumTriangs() const
ConfiguratorType::InitType MeshType
void generateDirichletBoundaryMask(MaskType &mask, int &numBoundaryNodes, ShellBoundaryType boundaryType=ALLBOUNDARY, bool clampedBoundaryCondition=false) const
ConfiguratorType::TangentVecType TangentVecType
Additional information about TriangleMeshes.
int getTriangNodeIdx(const int num, const int localNode) const
ShellHandler(const ConfiguratorType &conf)
DataTypeContainer::TangentVecType TangentVecType
string strprintf(const char *format,...)
Give back formatted string, analogously to sprintf, but save the long way 'round with char arrays...
void generateChart_xA() const
ConfiguratorType::VectorType VectorType
static const ShellFEType _ShellFEType
ConfiguratorType::RealType RealType
const int & getNumBoundaryNodes() const
VectorType & getChartToUndeformedShell() const
Configurator for Finite Elements.
const ConfiguratorType & _conf