MappedFEValuesBase Class Reference

#include <mappedfevaluesbase.h>

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

List of all members.

Public Member Functions

 MappedFEValuesBase (FiniteElementInterface &fe, Index n_dofs)
unsigned n_pts ()
double function_value (Index pt, Index local_dof) const
const VecDoublefunction_grad (Index pt, Index local_dof) const
double J (unsigned ptIndex)
double JxW (unsigned ptIndex)
void compute_points (MappingOrthoMesh &map)
const VecDoublemapped_pts (unsigned ptIndex)
 ~MappedFEValuesBase ()
void print (std::ostream &out=std::cout)

Protected Member Functions

void setPoints (const ArrayOfVecDouble &v, const VecDouble &weights)

Protected Attributes

FiniteElementInterface_fe
ArrayOfVecDouble _pts
VecDouble _weights
unsigned m_n_dofs
Matrix _Values
std::vector< VecDouble_Grad
std::vector< VecDouble_Mapped_Points
std::vector< Matrix_TGrad
VecDouble _J
VecDouble _JxW
unsigned m_compute_flags

Detailed Description

MappedFEValuesBase

Definition at line 13 of file mappedfevaluesbase.h.


Constructor & Destructor Documentation

MappedFEValuesBase::MappedFEValuesBase ( FiniteElementInterface fe,
Index  n_dofs 
) [inline]

Definition at line 37 of file mappedfevaluesbase.h.

00038    :_fe(fe),m_n_dofs(n_dofs),m_compute_flags(0){}

MappedFEValuesBase::~MappedFEValuesBase (  )  [inline]

Definition at line 99 of file mappedfevaluesbase.h.

00099 {}


Member Function Documentation

void MappedFEValuesBase::compute_points ( MappingOrthoMesh map  ) 

Definition at line 30 of file mappedfevaluesbase.cpp.

00031 {
00032   VecDoubleRef pt(3);
00033 
00034   for(unsigned i=0;i<_pts.size();i++)
00035   {
00036     //get pt i
00037     _pts.getVecValues(i,&pt); //Get the point
00038 
00039     //get GradT
00040     map.T(pt,_Mapped_Points[i]);
00041   }
00042   
00043 }

const VecDouble& MappedFEValuesBase::function_grad ( Index  pt,
Index  local_dof 
) const [inline]

Get the gradient of a basis function in a point given the index of the base function and the index of the point in the list passed in the method setPts() implemented in the childs

Parameters:
pt Index of the point in the list of points passed in the method setPts().
index of the basis function
Returns:

Definition at line 57 of file mappedfevaluesbase.h.

00058   {
00059     //assert(m_compute_flags | COMPUTE_GRADS);
00060     return _Grad[pt*m_n_dofs + local_dof];
00061   }

double MappedFEValuesBase::function_value ( Index  pt,
Index  local_dof 
) const [inline]

<Get the values of the basis function at points

Definition at line 43 of file mappedfevaluesbase.h.

00044   {
00045     //assert(m_compute_flags | COMPUTE_VALUES);
00046     return _Values(pt,local_dof);
00047   }

double MappedFEValuesBase::J ( unsigned  ptIndex  )  [inline]

Get det(Grad(T)) in one of the points passed in the method setPts() implemented in the child classes

Parameters:
ptIndex INdex of the point
Returns:
det(Grad(T(pt[ptIndex])))

Definition at line 69 of file mappedfevaluesbase.h.

00070   {
00071     //assert(m_compute_flags | COMPUTE_J);
00072     return _J(ptIndex);
00073   }

double MappedFEValuesBase::JxW ( unsigned  ptIndex  )  [inline]

Get det(Grad(T)) for each point multiplied by the weights. The points are specified in the method setPts() implemented in the child classes. The weights are given as parameters of the method compute_JxW()

Parameters:
ptIndex INdex of the point
Returns:
det(Grad(T(pt[ptIndex])))

Definition at line 85 of file mappedfevaluesbase.h.

00086   {
00087     //assert(m_compute_flags | COMPUTE_JxW);
00088 
00089     return _JxW(ptIndex);
00090   }

const VecDouble& MappedFEValuesBase::mapped_pts ( unsigned  ptIndex  )  [inline]

Definition at line 94 of file mappedfevaluesbase.h.

00095   {
00096     return _Mapped_Points[ptIndex];
00097   }

unsigned MappedFEValuesBase::n_pts (  )  [inline]

Definition at line 41 of file mappedfevaluesbase.h.

00041 {return _pts.size();}

void MappedFEValuesBase::print ( std::ostream &  out = std::cout  ) 

Definition at line 46 of file mappedfevaluesbase.cpp.

00047 {
00048   Matrix &M = _pts;
00049 
00050   out << "Points: \n";
00051   M.print_formatted(out,5,true,7,"0");
00052   out << "Jacobians: ";
00053   _J.print(out,5,true,true);
00054   out << "\nJacobians x W: ";
00055   _JxW.print(out,5,true,true);
00056   out<<std::endl;
00057   out << "\nPoints x Function Values:\n";
00058   _Values.print_formatted(out,5,true,7,"0");
00059   
00060   
00061     
00062 }

void MappedFEValuesBase::setPoints ( const ArrayOfVecDouble v,
const VecDouble weights 
) [protected]

Reimplemented in MappedFEFaceValues, and MappedFEValues.

Definition at line 4 of file mappedfevaluesbase.cpp.

00005 {
00006   _pts=v;
00007   _weights=weights;
00008   unsigned n_pts=v.size();
00009   _J.reinit(n_pts);
00010   _JxW.reinit(n_pts);
00011   //clear the data
00012   _Values.reinit(n_pts,m_n_dofs);
00013   _Grad.resize(m_n_dofs*n_pts);
00014   for (unsigned i=0;i<_Grad.size();i++)
00015   {
00016     _Grad[i].reinit(3);
00017   }
00018 
00019   _Mapped_Points.resize(n_pts);
00020   for (unsigned i=0;i<_Mapped_Points.size();i++)
00021   {
00022     _Mapped_Points[i].reinit(3);
00023   }
00024 
00025 
00026 }


Member Data Documentation

Definition at line 17 of file mappedfevaluesbase.h.

std::vector<VecDouble> MappedFEValuesBase::_Grad [protected]

Store the gradients of the bases functions

Definition at line 24 of file mappedfevaluesbase.h.

Store the jacobians

Definition at line 27 of file mappedfevaluesbase.h.

Store the jacobians multiplied by weights given in the method JxW

Definition at line 28 of file mappedfevaluesbase.h.

Definition at line 25 of file mappedfevaluesbase.h.

Points on the reference domain

Definition at line 18 of file mappedfevaluesbase.h.

std::vector<Matrix> MappedFEValuesBase::_TGrad [protected]

Store the Gradient of T for each point

Definition at line 26 of file mappedfevaluesbase.h.

To contain the values of the shape functions on the points

Definition at line 23 of file mappedfevaluesbase.h.

Definition at line 19 of file mappedfevaluesbase.h.

Definition at line 30 of file mappedfevaluesbase.h.

unsigned MappedFEValuesBase::m_n_dofs [protected]

Number of basis functions

Definition at line 20 of file mappedfevaluesbase.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:17 2012 for CO2INJECTION by  doxygen 1.6.3