#include <mappedfevalues.h>
Public Member Functions | |
MappedFEValues (FiniteElementInterface &fe) | |
void | setPoints (const dealii::Quadrature< 3 > &quad) |
void | setPoints (const ArrayOfVecDouble &pts, const VecDouble &weights) |
void | compute (MappingOrthoMesh &map, unsigned compute_flags) |
void | compute_values () |
void | compute_grads (MappingOrthoMesh &map) |
void | compute_J (MappingOrthoMesh &map) |
void | compute_JxW (MappingOrthoMesh &map, const VecDouble &weights) |
void | compute_JxW (MappingOrthoMesh &map) |
~MappedFEValues () |
The sole purpose of this class is to get values of the FE in the deformed cell.
The user first set the points (on the reference domain) for which the FE values will be computed and then call the many compute methods of this class like computeShapeValues() and computeShapeGrad(), etc.
After that, the user can get the values computed through methods like shape_value(Index pt,Index i) or shape_grad(Index pt,Index i), etc..... where pt is the index in the vector of points passed to this class and i the base function associated with shape function i of the element.
Definition at line 30 of file mappedfevalues.h.
MappedFEValues::MappedFEValues | ( | FiniteElementInterface & | fe | ) |
Definition at line 95 of file mappedfevalues.cpp.
00096 :MappedFEValuesBase(fe,fe.n_local_dofs()) 00097 { 00098 00099 }
MappedFEValues::~MappedFEValues | ( | ) | [inline] |
Definition at line 52 of file mappedfevalues.h.
void MappedFEValues::compute | ( | MappingOrthoMesh & | map, | |
unsigned | compute_flags | |||
) |
Definition at line 102 of file mappedfevalues.cpp.
00103 { 00104 m_compute_flags=compute_flags; 00105 if (compute_flags | COMPUTE_VALUES) 00106 compute_values(); 00107 if (compute_flags | COMPUTE_GRADS) 00108 compute_grads(map); 00109 if (compute_flags | COMPUTE_PTS) 00110 compute_points(map); 00111 if (compute_flags | COMPUTE_JxW) 00112 compute_JxW(map,_weights); 00113 else if (compute_flags | COMPUTE_J) 00114 compute_J(map); 00115 00116 }
void MappedFEValues::compute_grads | ( | MappingOrthoMesh & | map | ) |
Compute the gras of the bases functions
Definition at line 34 of file mappedfevalues.cpp.
00035 { 00036 unsigned iEnd = _pts.size(); 00037 unsigned n_local_dofs = _fe.n_local_dofs(); 00038 VecDoubleRef pt(3); 00039 static VecDouble vGradRef(3); 00040 Matrix invTGrad(3,3); 00041 for (unsigned iPt=0;iPt<iEnd;iPt++) //for all points in _pts list 00042 { 00043 _pts.getVecValues(iPt,&pt); //Get the point 00044 map.Inv_T_Grad(pt,invTGrad); 00045 00046 for (unsigned j=0;j<n_local_dofs;j++) //for all dofs 00047 { 00048 _fe.shape_grad(j,pt,vGradRef); 00049 invTGrad.Tvmult(_Grad[iPt*m_n_dofs + j],vGradRef); 00050 } 00051 } 00052 }
void MappedFEValues::compute_J | ( | MappingOrthoMesh & | map | ) |
Compute jacobians of the points list
Definition at line 57 of file mappedfevalues.cpp.
00058 { 00059 static Matrix GradT(3,3); //A matrix 3x3 00060 VecDoubleRef pt(3); 00061 00062 for(unsigned i=0;i<_pts.size();i++) 00063 { 00064 //get pt i 00065 _pts.getVecValues(i,&pt); //Get the point 00066 00067 //get GradT 00068 map.T_grad(pt,GradT); 00069 _J(i)=NumericMethods::det3x3(GradT); 00070 } 00071 }
void MappedFEValues::compute_JxW | ( | MappingOrthoMesh & | map | ) |
void MappedFEValues::compute_JxW | ( | MappingOrthoMesh & | map, | |
const VecDouble & | weights | |||
) |
Compute the jacobians calling the compute_J() method and the calculate the jacobians multiplied by weights.
weights |
Definition at line 80 of file mappedfevalues.cpp.
void MappedFEValues::compute_values | ( | ) |
Compute the values of the basis function
Compute the values of the bases functions in the deformed domain
Definition at line 15 of file mappedfevalues.cpp.
00016 { 00017 unsigned iEnd = _pts.size(); 00018 VecDoubleRef pt(3); 00019 unsigned n_local_dofs = _fe.n_local_dofs(); 00020 00021 for (unsigned i=0;i<iEnd;i++) //for all points in _pts list 00022 { 00023 _pts.getVecValues(i,&pt); //Get the point 00024 for (unsigned j=0;j<n_local_dofs;j++) //for all dofs 00025 { 00026 //evaluates the base function j on the point pt 00027 //and store in the matrix this->_Values; 00028 _Values(i,j)=_fe.shape_value(j,pt); 00029 } 00030 } 00031 }
void MappedFEValues::setPoints | ( | const ArrayOfVecDouble & | pts, | |
const VecDouble & | weights | |||
) |
Reimplemented from MappedFEValuesBase.
Definition at line 119 of file mappedfevalues.cpp.
00120 { 00121 MappedFEValuesBase::setPoints(pts,weights); 00122 }
void MappedFEValues::setPoints | ( | const dealii::Quadrature< 3 > & | quad | ) |
Definition at line 5 of file mappedfevalues.cpp.
00006 { 00007 MappedFEValuesBase::setPoints(quad.get_points(),quad.get_weights()); 00008 }