PoissonEqVar Class Reference

#include <poissoneqvar.h>

Inheritance diagram for PoissonEqVar:
Inheritance graph
[legend]
Collaboration diagram for PoissonEqVar:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PoissonEqVar (OrthoMesh &mesh)
 ~PoissonEqVar ()
void setSource (Function3D &fs)
void setK (const VecDouble &K)
const VecDoublegetK ()
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 VecIndexlocal_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
OrthoMeshm_mesh
Function3Dm_pFS
const VecDoublem_pK
double m_currK

Static Private Attributes

static const Index m_local_dof_face_cell_map [6][4]

Detailed Description

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.


Constructor & Destructor Documentation

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 }


Member Function Documentation

void PoissonEqVar::changedCellEvent (  )  [inline]

Reimplemented from DealFEWrapper.

Definition at line 52 of file poissoneqvar.h.

00052 {m_currK=getK()(getCell()->index());}

Point3D PoissonEqVar::get_global_dof_position ( Index  cDof  ) 

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.

00039 {assert(m_pK);return *m_pK;}

Index PoissonEqVar::local_dof_component ( Index  cDof  ) 

Given the local cell dof, this function returns its component

Reimplemented from DealFEWrapper.

Definition at line 40 of file poissoneqvar.cpp.

00041 {
00042   return 0;
00043 }

Index PoissonEqVar::local_face_to_local_cell_map ( Index  face,
Index  local_dof_face 
)

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]

Reimplemented from DealFEWrapper.

Definition at line 42 of file poissoneqvar.h.

00042 {return 8;}

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.

00046 {return 27;}

unsigned PoissonEqVar::n_quadrature_points (  )  [inline]

M Number of dofs per cell

Reimplemented from DealFEWrapper.

Definition at line 43 of file poissoneqvar.h.

00043 {return 8;}

bool PoissonEqVar::nullProduct ( unsigned  i,
unsigned  j 
)

Definition at line 74 of file poissoneqvar.cpp.

00075 {
00076   return false;
00077 }

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.

00037 {assert(!m_pFS);m_pFS=&fs;}


Member Data Documentation

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.

Definition at line 26 of file poissoneqvar.h.

Initial value:
 {{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.

Definition at line 28 of file poissoneqvar.h.

Definition at line 29 of file poissoneqvar.h.

const VecDouble* PoissonEqVar::m_pK [private]

Definition at line 30 of file poissoneqvar.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:13:27 2012 for CO2INJECTION by  doxygen 1.6.3