#include <mappedfefacevalues.h>
Public Member Functions | |
MappedFEFaceValues (FiniteElementInterface &fe, Index faceId) | |
~MappedFEFaceValues () | |
void | setPoints (const ArrayOfVecDouble &v, const VecDouble &weights) |
void | setQuadrature (const dealii::Quadrature< 2 > &quad) |
void | compute (MappingOrthoMesh &map, unsigned compute_flags) |
virtual void | compute_values () |
virtual void | compute_grads (MappingOrthoMesh &map) |
virtual void | compute_J (MappingOrthoMesh &map) |
virtual void | compute_JxW (MappingOrthoMesh &map, const VecDouble &weights) |
virtual void | compute_JxW (MappingOrthoMesh &map) |
Protected Attributes | |
unsigned | _dir |
VecIndex | _face_to_cell_map |
VecDouble | e1 |
VecDouble | e2 |
This class specializes the MappedFEValues to read values from the faces. It is used mainly to compute Neumman conditions at the boundaries and it is supposed to be used in the same way as the MappedFEValues.
There are some minor differences though. First in the setPts() method you pass actually the points in 2D and the face. These points are then mapped in the reference domain in 3D to the points in the exact face. You have a method to get the jacobian to make integrations on manifolds called J_Faces()
Definition at line 22 of file mappedfefacevalues.h.
MappedFEFaceValues::MappedFEFaceValues | ( | FiniteElementInterface & | fe, | |
Index | faceId | |||
) |
Definition at line 7 of file mappedfefacevalues.cpp.
00008 :MappedFEValuesBase(fe,fe.face_to_cell_local_map(faceId).size()) 00009 { 00010 _dir = faceId;//Store the face of the face values 00011 00012 //Store the mapping between the local face dofs 00013 //and the local cell dofs. This is obtained 00014 //fron the finite element. 00015 _face_to_cell_map= fe.face_to_cell_local_map(faceId); 00016 00017 UnitCube ref; 00018 ref.face_base_vectors(faceId,&e1,&e2); 00019 00020 00021 }
MappedFEFaceValues::~MappedFEFaceValues | ( | ) | [inline] |
Definition at line 34 of file mappedfefacevalues.h.
void MappedFEFaceValues::compute | ( | MappingOrthoMesh & | map, | |
unsigned | compute_flags | |||
) |
void MappedFEFaceValues::compute_grads | ( | MappingOrthoMesh & | map | ) | [virtual] |
Compute the grads of the bases functions
Definition at line 69 of file mappedfefacevalues.cpp.
00070 { 00071 throw new Exception("MappedFEFaceValues::compute_grads() not implemented yet\n"); 00072 }
void MappedFEFaceValues::compute_J | ( | MappingOrthoMesh & | map | ) | [virtual] |
Compute jacobians of the points list
Definition at line 76 of file mappedfefacevalues.cpp.
00077 { 00078 static Matrix GradT(3,3); //A matrix 3x3 00079 VecDoubleRef pt(3); 00080 static VecDouble aux1(3); 00081 static VecDouble aux2(3); 00082 00083 for(unsigned i=0;i<_pts.size();i++) 00084 { 00085 //get pt i 00086 _pts.getVecValues(i,&pt); //Get the point 00087 00088 //get GradT 00089 map.T_grad(pt,GradT); 00090 00091 GradT.vmult(aux1,e1); 00092 GradT.vmult(aux2,e2); 00093 00094 _J(i) = NumericMethods::abs_vector_product(aux1,aux2); 00095 } 00096 00097 }
void MappedFEFaceValues::compute_JxW | ( | MappingOrthoMesh & | map | ) | [virtual] |
Definition at line 115 of file mappedfefacevalues.cpp.
00116 { 00117 compute_JxW(map,_weights); 00118 }
void MappedFEFaceValues::compute_JxW | ( | MappingOrthoMesh & | map, | |
const VecDouble & | weights | |||
) | [virtual] |
void MappedFEFaceValues::compute_values | ( | ) | [virtual] |
Compute the values of the bases function
Definition at line 49 of file mappedfefacevalues.cpp.
00050 { 00051 unsigned iEnd = _pts.size(); 00052 VecDoubleRef pt(3); 00053 unsigned n_local_dofs = _face_to_cell_map.size(); 00054 00055 for (unsigned i=0;i<iEnd;i++) //for all points in _pts list 00056 { 00057 _pts.getVecValues(i,&pt); //Get the point 00058 for (unsigned j=0;j<n_local_dofs;j++) //for all dofs 00059 { 00060 //evaluat the base function j on the point pt 00061 //and store in the matrix this->_Values; 00062 _Values(i,j)=_fe.shape_value(_face_to_cell_map[j],pt); 00063 } 00064 } 00065 00066 }
void MappedFEFaceValues::setPoints | ( | const ArrayOfVecDouble & | v, | |
const VecDouble & | weights | |||
) |
Set the list of points
Reimplemented from MappedFEValuesBase.
Definition at line 23 of file mappedfefacevalues.cpp.
00024 { 00025 00026 //The array of points must be 2D points 00027 assert(v.vecs_size() ==2); 00028 00029 ArrayOfVecDouble pts; 00030 pts.reinit(v.size(),3); 00031 00032 VecDoubleRef pt3D(3); 00033 VecDouble pt2D(2); 00034 UnitCube refDomain; 00035 00036 for (unsigned i=0;i<v.size();i++) 00037 { 00038 pts.getVecValues(i,&pt3D); 00039 v.copyVecValues(i,&pt2D); 00040 refDomain.project_2d_points_into_faces(pt2D,&pt3D,static_cast<FaceDirection3D>(_dir)); 00041 } 00042 pts.print(); 00043 MappedFEValuesBase::setPoints(pts,weights); 00044 }
void MappedFEFaceValues::setQuadrature | ( | const dealii::Quadrature< 2 > & | quad | ) |
Definition at line 108 of file mappedfefacevalues.cpp.
00109 { 00110 //printf("Caralho\n"); 00111 MappedFEFaceValues::setPoints(quad.get_points(),quad.get_weights()); 00112 }
unsigned MappedFEFaceValues::_dir [protected] |
Definition at line 27 of file mappedfefacevalues.h.
VecIndex MappedFEFaceValues::_face_to_cell_map [protected] |
Definition at line 28 of file mappedfefacevalues.h.
VecDouble MappedFEFaceValues::e1 [protected] |
Definition at line 29 of file mappedfefacevalues.h.
VecDouble MappedFEFaceValues::e2 [protected] |
Definition at line 29 of file mappedfefacevalues.h.