MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Shape function space for trilinear hexahedron, obtained by a pushforward of the canonical linear (affine) functions. More...
#include <ElemUtil.hpp>
Public Member Functions | |
QuadraticHex (const std::vector< CartVect > &vertices) | |
QuadraticHex () | |
virtual | ~QuadraticHex () |
virtual CartVect | evaluate (const CartVect &xi) const |
Evaluate the map on \(x_i\) (calculate \(\vec x = F($\vec \xi)\) ) | |
virtual bool | inside_nat_space (const CartVect &xi, double &tol) const |
decide if within the natural param space, with a tolerance | |
virtual Matrix3 | jacobian (const CartVect &xi) const |
Evaluate the map's Jacobi matrix. | |
virtual double | evaluate_scalar_field (const CartVect &xi, const double *field_vertex_values) const |
Evaluate a scalar field at a point given field values at the vertices. | |
virtual double | integrate_scalar_field (const double *field_vertex_values) const |
Integrate a scalar field over the element given field values at the vertices. | |
Static Protected Attributes | |
static const int | corner [27][3] |
static const double | gauss [8][2] |
static const unsigned int | corner_count = 27 |
static const unsigned int | gauss_count = 2 |
Shape function space for trilinear hexahedron, obtained by a pushforward of the canonical linear (affine) functions.
Definition at line 172 of file ElemUtil.hpp.
moab::Element::QuadraticHex::QuadraticHex | ( | const std::vector< CartVect > & | vertices | ) | [inline] |
Definition at line 175 of file ElemUtil.hpp.
: Map( vertices ){};
Definition at line 804 of file ElemUtil.cpp.
: Map( 0 ) {}
moab::Element::QuadraticHex::~QuadraticHex | ( | ) | [virtual] |
Definition at line 806 of file ElemUtil.cpp.
{}
CartVect moab::Element::QuadraticHex::evaluate | ( | const CartVect & | xi | ) | const [virtual] |
Evaluate the map on \(x_i\) (calculate \(\vec x = F($\vec \xi)\) )
Implements moab::Element::Map.
Definition at line 836 of file ElemUtil.cpp.
References corner, and moab::Element::SH().
double moab::Element::QuadraticHex::evaluate_scalar_field | ( | const CartVect & | xi, |
const double * | field_vertex_values | ||
) | const [virtual] |
Evaluate a scalar field at a point given field values at the vertices.
Implements moab::Element::Map.
Definition at line 874 of file ElemUtil.cpp.
References corner, and moab::Element::SH().
bool moab::Element::QuadraticHex::inside_nat_space | ( | const CartVect & | xi, |
double & | tol | ||
) | const [virtual] |
decide if within the natural param space, with a tolerance
Implements moab::Element::Map.
Definition at line 849 of file ElemUtil.cpp.
Referenced by moab::Coupler::nat_param().
{ // just look at the box+tol here return ( xi[0] >= -1. - tol ) && ( xi[0] <= 1. + tol ) && ( xi[1] >= -1. - tol ) && ( xi[1] <= 1. + tol ) && ( xi[2] >= -1. - tol ) && ( xi[2] <= 1. + tol ); }
double moab::Element::QuadraticHex::integrate_scalar_field | ( | const double * | field_vertex_values | ) | const [virtual] |
Integrate a scalar field over the element given field values at the vertices.
Implements moab::Element::Map.
Definition at line 885 of file ElemUtil.cpp.
{ return 0.; // TODO: gaussian integration , probably 2x2x2 }
Matrix3 moab::Element::QuadraticHex::jacobian | ( | const CartVect & | xi | ) | const [virtual] |
Evaluate the map's Jacobi matrix.
Implements moab::Element::Map.
Definition at line 855 of file ElemUtil.cpp.
References corner, moab::Element::DSH(), and moab::Element::SH().
{ Matrix3 J( 0.0 ); for( int i = 0; i < 27; i++ ) { const double sh[3] = { SH( corner[i][0], xi[0] ), SH( corner[i][1], xi[1] ), SH( corner[i][2], xi[2] ) }; const double dsh[3] = { DSH( corner[i][0], xi[0] ), DSH( corner[i][1], xi[1] ), DSH( corner[i][2], xi[2] ) }; for( int j = 0; j < 3; j++ ) { J( j, 0 ) += dsh[0] * sh[1] * sh[2] * vertex[i][j]; // dxj/dr first column J( j, 1 ) += sh[0] * dsh[1] * sh[2] * vertex[i][j]; // dxj/ds J( j, 2 ) += sh[0] * sh[1] * dsh[2] * vertex[i][j]; // dxj/dt } } return J; }
const int moab::Element::QuadraticHex::corner [static, protected] |
{ { -1, -1, -1 }, { 1, -1, -1 }, { 1, 1, -1 }, { -1, 1, -1 }, { -1, -1, 1 }, { 1, -1, 1 }, { 1, 1, 1 }, { -1, 1, 1 }, { 0, -1, -1 }, { 1, 0, -1 }, { 0, 1, -1 }, { -1, 0, -1 }, { -1, -1, 0 }, { 1, -1, 0 }, { 1, 1, 0 }, { -1, 1, 0 }, { 0, -1, 1 }, { 1, 0, 1 }, { 0, 1, 1 }, { -1, 0, 1 }, { 0, -1, 0 }, { 1, 0, 0 }, { 0, 1, 0 }, { -1, 0, 0 }, { 0, 0, -1 }, { 0, 0, 1 }, { 0, 0, 0 } }
Definition at line 189 of file ElemUtil.hpp.
Referenced by evaluate(), evaluate_scalar_field(), and jacobian().
const unsigned int moab::Element::QuadraticHex::corner_count = 27 [static, protected] |
Definition at line 191 of file ElemUtil.hpp.
const double moab::Element::QuadraticHex::gauss[8][2] [static, protected] |
Definition at line 190 of file ElemUtil.hpp.
const unsigned int moab::Element::QuadraticHex::gauss_count = 2 [static, protected] |
Definition at line 192 of file ElemUtil.hpp.