#include <poissoneqvar.h>
Public Member Functions | |
PoissonEqVar (OrthoMesh &mesh) | |
~PoissonEqVar () | |
void | setSource (Function3D &fs) |
void | setK (const VecDouble &K) |
const VecDouble & | getK () |
unsigned | n_dofs_per_face () |
unsigned | n_dofs_per_cell () |
unsigned | n_quadrature_points () |
unsigned | n_face_quadrature_points () |
unsigned | n_dofs () |
unsigned | n_max_dof_coupling () |
Index | local_dof_component (Index cDof) |
Point3D | get_global_dof_position (Index cDof) |
const VecIndex & | local_to_global_dofs_map () |
Index | local_face_to_local_cell_map (Index face, Index local_dof_face) |
void | setCell (OrthoMesh::Cell_It &cell) |
void | changedCellEvent () |
double | localEqVar (unsigned i, unsigned j, unsigned qPoint) |
double | localRHS (unsigned i, unsigned qPoint) |
double | localNeummanCondition (unsigned face_no, unsigned face_local_dof, unsigned qPoint, Function3D &fN) |
bool | nullProduct (unsigned i, unsigned j) |
Private Attributes | |
FE_Q< 3 > | m_FE |
QGauss< 3 > | m_cQG |
QGauss< 2 > | m_fQG |
VecIndex | m_global_dofs_map |
OrthoMesh & | m_mesh |
Function3D * | m_pFS |
const VecDouble * | m_pK |
double | m_currK |
Static Private Attributes | |
static const Index | m_local_dof_face_cell_map [6][4] |
This class solve the poisson equation in the context of porous media given by
-Lap(K P) = f
The variational equation is given by
< K Grad(P), Grav(v) > = <f,v> - SurfInt(-K Grad(P) v)
The user suply the source function f, and the f Neumman boundary condition F = -K Grad(P)*n at boundary.
Definition at line 20 of file poissoneqvar.h.
PoissonEqVar::PoissonEqVar | ( | OrthoMesh & | mesh | ) |
Definition at line 12 of file poissoneqvar.cpp.
00013 :m_FE(1),m_cQG(2),m_fQG(2), 00014 m_global_dofs_map(OrthoMesh::VERTICES_PER_CELL),m_mesh(mesh) 00015 { 00016 initFEValues(m_mesh,m_FE,m_cQG,m_fQG, update_quadrature_points|update_gradients|update_JxW_values|update_values, update_JxW_values|update_values|update_quadrature_points); 00017 m_pFS=NULL; 00018 00019 }
PoissonEqVar::~PoissonEqVar | ( | ) |
Definition at line 52 of file poissoneqvar.cpp.
00053 { 00054 DealFEWrapper::clear(); 00055 00056 }
void PoissonEqVar::changedCellEvent | ( | ) | [inline] |
Reimplemented from DealFEWrapper.
Definition at line 52 of file poissoneqvar.h.
Given the local dof number relative to the cell, the method returns the location of this dof at the original mesh
Definition at line 34 of file poissoneqvar.cpp.
00035 { 00036 return getCell()->vertex(static_cast<VertexDirection3D>(cDof)); 00037 }
const VecDouble& PoissonEqVar::getK | ( | ) | [inline] |
Definition at line 39 of file poissoneqvar.h.
Given the local cell dof, this function returns its component
Reimplemented from DealFEWrapper.
Definition at line 40 of file poissoneqvar.cpp.
Get the local dof number relative to the cell given the local dof relative to the face
Reimplemented from DealFEWrapper.
Definition at line 26 of file poissoneqvar.cpp.
00027 { 00028 assert(face < OrthoMesh::FACES_PER_CELL); 00029 assert(local_dof_face<n_dofs_per_face()); 00030 return m_local_dof_face_cell_map[face][local_dof_face]; 00031 }
const VecIndex & PoissonEqVar::local_to_global_dofs_map | ( | ) |
Definition at line 46 of file poissoneqvar.cpp.
00047 { 00048 return m_global_dofs_map; 00049 }
double PoissonEqVar::localEqVar | ( | unsigned | i, | |
unsigned | j, | |||
unsigned | qPoint | |||
) |
Definition at line 59 of file poissoneqvar.cpp.
00060 { 00061 return m_currK*shape_grad(i,qPoint)*shape_grad(j,qPoint)*JxW(qPoint); 00062 }
double PoissonEqVar::localNeummanCondition | ( | unsigned | face_no, | |
unsigned | face_local_dof, | |||
unsigned | qPoint, | |||
Function3D & | fN | |||
) |
Definition at line 94 of file poissoneqvar.cpp.
00095 { 00096 Point3D X = get_face_qpoint(qPoint); 00097 return fN(X)*shape_value_face(face_no,face_local_dof,qPoint)*JxWFace(qPoint); 00098 }
double PoissonEqVar::localRHS | ( | unsigned | i, | |
unsigned | qPoint | |||
) |
Definition at line 65 of file poissoneqvar.cpp.
00066 { 00067 assert(m_pFS); 00068 Function3D &fs=*m_pFS; 00069 Point3D pt = get_qpoint(qPoint); 00070 return shape_value(i,qPoint)*fs(pt)*JxW(qPoint); 00071 }
unsigned PoissonEqVar::n_dofs | ( | ) | [inline] |
Number of dofs in the domain
Reimplemented from DealFEWrapper.
Definition at line 45 of file poissoneqvar.h.
00045 {return m_mesh.numVertices();}
unsigned PoissonEqVar::n_dofs_per_cell | ( | ) | [inline] |
unsigned PoissonEqVar::n_dofs_per_face | ( | ) | [inline] |
Number of dofs per face
Reimplemented from DealFEWrapper.
Definition at line 41 of file poissoneqvar.h.
unsigned PoissonEqVar::n_face_quadrature_points | ( | ) | [inline] |
M Number of dofs per cell Number of quadrature points at faces
Reimplemented from DealFEWrapper.
Definition at line 44 of file poissoneqvar.h.
unsigned PoissonEqVar::n_max_dof_coupling | ( | ) | [inline] |
Definition at line 46 of file poissoneqvar.h.
unsigned PoissonEqVar::n_quadrature_points | ( | ) | [inline] |
M Number of dofs per cell
Reimplemented from DealFEWrapper.
Definition at line 43 of file poissoneqvar.h.
bool PoissonEqVar::nullProduct | ( | unsigned | i, | |
unsigned | j | |||
) |
Definition at line 74 of file poissoneqvar.cpp.
void PoissonEqVar::setCell | ( | OrthoMesh::Cell_It & | cell | ) |
Reimplemented from DealFEWrapper.
Definition at line 80 of file poissoneqvar.cpp.
00081 { 00082 DealFEWrapper::setCell(cell); 00083 00084 //Make the local to global dof mapping 00085 for (unsigned v=0;v<OrthoMesh::VERTICES_PER_CELL;v++) 00086 { 00087 m_global_dofs_map[v]=cell->vertex_index(static_cast<VertexDirection3D>(v)); 00088 } 00089 }
void PoissonEqVar::setK | ( | const VecDouble & | K | ) | [inline] |
Definition at line 38 of file poissoneqvar.h.
00038 {m_pK=&K;}
void PoissonEqVar::setSource | ( | Function3D & | fs | ) | [inline] |
Definition at line 37 of file poissoneqvar.h.
QGauss<3> PoissonEqVar::m_cQG [private] |
Definition at line 24 of file poissoneqvar.h.
double PoissonEqVar::m_currK [private] |
Definition at line 31 of file poissoneqvar.h.
FE_Q<3> PoissonEqVar::m_FE [private] |
Definition at line 23 of file poissoneqvar.h.
QGauss<2> PoissonEqVar::m_fQG [private] |
Definition at line 25 of file poissoneqvar.h.
VecIndex PoissonEqVar::m_global_dofs_map [private] |
Definition at line 26 of file poissoneqvar.h.
const Index PoissonEqVar::m_local_dof_face_cell_map [static, private] |
{{0,2,4,6}, {1,3,5,7}, {0,1,4,5}, {2,3,6,7}, {0,1,2,3}, {4,5,6,7}}
Definition at line 27 of file poissoneqvar.h.
OrthoMesh& PoissonEqVar::m_mesh [private] |
Definition at line 28 of file poissoneqvar.h.
Function3D* PoissonEqVar::m_pFS [private] |
Definition at line 29 of file poissoneqvar.h.
const VecDouble* PoissonEqVar::m_pK [private] |
Definition at line 30 of file poissoneqvar.h.