BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType > Class Template Reference

Collaboration diagram for BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

template<typename SurfaceMeshType>
void eval (const SurfaceMeshType &surfaceMesh) const
 __TimesXDirichlet (const Dirichlet &dirichlet, const size_t equationNumber, const VectorType &x, VectorType &z, const BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization > &bc)
 __TimesXDirichlet (const __TimesXDirichlet &T)
 ~__TimesXDirichlet ()

Private Attributes

const Dirichlet__dirichlet
const size_t __equationNumber
const VectorType & __x
VectorType & __z
const
BoundaryConditionDiscretizationPenalty
< MeshType,
TypeOfDiscretization > & 
__bc


Detailed Description

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
class BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >

Definition at line 511 of file BoundaryConditionDiscretizationPenalty.hpp.


Constructor & Destructor Documentation

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__TimesXDirichlet ( const Dirichlet dirichlet,
const size_t  equationNumber,
const VectorType &  x,
VectorType &  z,
const BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization > &  bc 
) [inline]

Definition at line 619 of file BoundaryConditionDiscretizationPenalty.hpp.

00625       : __dirichlet(dirichlet),
00626         __equationNumber(equationNumber),
00627         __x(x),
00628         __z(z),
00629         __bc(bc)
00630     {
00631       ;
00632     }

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__TimesXDirichlet ( const __TimesXDirichlet< VectorType > &  T  )  [inline]

Definition at line 634 of file BoundaryConditionDiscretizationPenalty.hpp.

00635       : __dirichlet(T.__dirichlet),
00636         __equationNumber(T.__equationNumber),
00637         __x(T.__x),
00638         __z(T.__z),
00639         __bc(T.__bc)
00640     {
00641       ;
00642     }

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::~__TimesXDirichlet (  )  [inline]

Definition at line 644 of file BoundaryConditionDiscretizationPenalty.hpp.

00645     {
00646       ;
00647     }


Member Function Documentation

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
template<typename SurfaceMeshType>
void BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::eval ( const SurfaceMeshType &  surfaceMesh  )  const [inline]

Definition at line 528 of file BoundaryConditionDiscretizationPenalty.hpp.

References BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__bc, BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__equationNumber, BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__x, and BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__z.

00529     {
00530       typedef typename SurfaceMeshType::CellType BoundaryCellType;
00531 
00532       typedef
00533         typename FiniteElementTraits<BoundaryCellType,
00534                                      TypeOfDiscretization>::Transformation
00535         BoundaryConformTransformation;
00536 
00537       typedef
00538         typename FiniteElementTraits<BoundaryCellType,
00539                                      TypeOfDiscretization>::Type
00540         BoundaryFiniteElement;
00541 
00542       typedef
00543         typename BoundaryFiniteElement::QuadratureType
00544         BoundaryQuadratureType;
00545 
00546       const FiniteElement& finiteElement = FiniteElement::instance();
00547 
00548       const BoundaryQuadratureType& referenceBoundaryQuadrature
00549         = BoundaryQuadratureType::instance();
00550 
00551       const ScalarDegreeOfFreedomPositionsSet& dofPositions
00552         = __bc.__degreeOfFreedomSet.positionsSet(0);
00553 
00554       AutoPointer<ConformTransformation> pT;
00555 
00556       const CellType* lastCell = 0;
00557 
00558       for (typename SurfaceMeshType::const_iterator iface(surfaceMesh);
00559            not(iface.end()); ++iface) {
00560         const typename SurfaceMeshType::CellType& face = *iface;
00561         const BoundaryConformTransformation boundaryT(face);
00562 
00563         const CellType& cell
00564           = static_cast<const CellType&>(face.mother());
00565 
00566         if(lastCell != &cell) {
00567           pT = new ConformTransformation(cell);
00568           lastCell = &cell;
00569         }
00570 
00571         const size_t cellNumber = __bc.mesh().cellNumber(cell);
00572 
00573         const ConformTransformation& T = *pT;
00574 
00575         for (size_t k=0; k<BoundaryQuadratureType::numberOfQuadraturePoints;
00576              k++) {
00577           // computes local quadrature vertex
00578           TinyVector<3, real_t> q;
00579           boundaryT.value(referenceBoundaryQuadrature[k], q);
00580 
00581           const real_t weight
00582             = referenceBoundaryQuadrature.weight(k)
00583             * face.volume();
00584 
00585           TinyVector<3> coordinates;
00586           T.invertT(q, coordinates);
00587 
00588           typename FiniteElement::ElementaryVector W;
00589           for (size_t l=0; l<FiniteElement::numberOfDegreesOfFreedom; l++) 
00590             W[l] = finiteElement.W(l,coordinates);
00591 
00592           typename FiniteElement::ElementaryMatrix WiWj;
00593 
00594           for (size_t l=0; l<FiniteElement::numberOfDegreesOfFreedom; l++)
00595             for (size_t m=0; m<FiniteElement::numberOfDegreesOfFreedom; m++)
00596               WiWj(l,m) = W[l] * W[m];
00597 
00598           size_t indices[FiniteElement::numberOfDegreesOfFreedom];
00599           for (size_t l=0; l<FiniteElement::numberOfDegreesOfFreedom; ++l) {
00600             indices[l] = __bc.__degreeOfFreedomSet(__equationNumber,
00601                                                    dofPositions(cellNumber, l));
00602           }
00603             
00604           for (size_t l=0; l<FiniteElement::numberOfDegreesOfFreedom; l++) {
00605             const size_t I = indices[l];
00606             if (not(__bc.__dirichletList[I])) {
00607               for (size_t m=0; m<FiniteElement::numberOfDegreesOfFreedom; m++) {
00608                 const size_t J = indices[m];
00609                 if (not(__bc.__dirichletList[J])) {
00610                   __z[J] += WiWj(l,m) * weight * __x[I] / __bc.__epsilon;
00611                 }
00612               }
00613             }
00614           }
00615         }
00616       }
00617     }


Member Data Documentation

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
const Dirichlet& BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__dirichlet [private]

Definition at line 514 of file BoundaryConditionDiscretizationPenalty.hpp.

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
const size_t BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__equationNumber [private]

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
const VectorType& BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__x [private]

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
VectorType& BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__z [private]

template<typename MeshType, ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
template<typename VectorType>
const BoundaryConditionDiscretizationPenalty<MeshType, TypeOfDiscretization>& BoundaryConditionDiscretizationPenalty< MeshType, TypeOfDiscretization >::__TimesXDirichlet< VectorType >::__bc [private]


The documentation for this class was generated from the following file:

Generated on Wed Nov 19 00:04:29 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6