QuOc

 

Public Member Functions | Private Types | Private Attributes

qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType > Class Template Reference

#include <implicitSurfaceFEOps.h>

Inheritance diagram for qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >:
qc::BoundaryIntegrationInterface< ConfiguratorType, aol::Vector< ConfiguratorType::RealType >, ConfiguratorType::Dim, BoundaryQuadratureType, IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType > > aol::Op< aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType > >

List of all members.

Public Member Functions

 IntegrateProjectionUOverBoundary (const typename ConfiguratorType::InitType &Initializer, RealType Epsilon)
void setImageReference (const aol::Vector< RealType > &Phi)
RealType integrandAtQuadPoint (const aol::Vector< RealType > &arg, const typename ConfiguratorType::VecType &normal, const ElementType &el, const typename ConfiguratorType::VecType edgePoint) const
 computes

\[ P[\Phi] \nabla U \]


Private Types

typedef ConfiguratorType::RealType RealType
typedef
ConfiguratorType::ElementType 
ElementType
typedef ConfiguratorType::VecType VecType
typedef ConfiguratorType::MatType MatType

Private Attributes

ConfiguratorType::RealType _epsSqr
const
aol::DiscreteFunctionDefault
< ConfiguratorType > * 
_discrPhi

Detailed Description

template<typename ConfiguratorType, typename BoundaryQuadratureType>
class qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >

This class computes the following boundary integral:

\[ \int_{\partial\Omega} \nabla u \cdot n \, \varphi da \]

ATTENTION: ONLY WORKING IN 2D!

Definition at line 395 of file implicitSurfaceFEOps.h.


Member Typedef Documentation

template<typename ConfiguratorType , typename BoundaryQuadratureType >
typedef ConfiguratorType::ElementType qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::ElementType [private]

Definition at line 404 of file implicitSurfaceFEOps.h.

template<typename ConfiguratorType , typename BoundaryQuadratureType >
typedef ConfiguratorType::MatType qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::MatType [private]

Definition at line 406 of file implicitSurfaceFEOps.h.

template<typename ConfiguratorType , typename BoundaryQuadratureType >
typedef ConfiguratorType::RealType qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::RealType [private]

Definition at line 403 of file implicitSurfaceFEOps.h.

template<typename ConfiguratorType , typename BoundaryQuadratureType >
typedef ConfiguratorType::VecType qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::VecType [private]

Definition at line 405 of file implicitSurfaceFEOps.h.


Constructor & Destructor Documentation

template<typename ConfiguratorType , typename BoundaryQuadratureType >
qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::IntegrateProjectionUOverBoundary ( const typename ConfiguratorType::InitType &  Initializer,
RealType  Epsilon 
) [inline]

Definition at line 409 of file implicitSurfaceFEOps.h.

      : BoundaryIntegrationInterface < ConfiguratorType,
      aol::Vector<RealType>,
      ConfiguratorType::Dim,
      BoundaryQuadratureType,
      IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType > > ( Initializer ),
      _epsSqr ( Epsilon*Epsilon ), _discrPhi ( NULL ) {}


Member Function Documentation

template<typename ConfiguratorType , typename BoundaryQuadratureType >
RealType qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::integrandAtQuadPoint ( const aol::Vector< RealType > &  arg,
const typename ConfiguratorType::VecType &  normal,
const ElementType el,
const typename ConfiguratorType::VecType  edgePoint 
) const [inline]

computes

\[ P[\Phi] \nabla U \]

Definition at line 430 of file implicitSurfaceFEOps.h.

References qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::_discrPhi, qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::_epsSqr, and aol::DiscreteFunctionDefault< ConfiguratorType >::evaluateGradient().

                                                                                                                  {
    if ( !_discrPhi ) {
      throw aol::Exception ( "IntegrateProjectionUOverBoundary::integrandAtQuadPoint: set image first!", __FILE__, __LINE__ );
    }

    // compute gradient of boundaryfunction @ edgePt
    aol::DiscreteFunctionDefault<ConfiguratorType> discrU ( this->getConfigurator(), arg );
    VecType gradPhi, gradU, PGradU;
    discrU.evaluateGradient ( el, edgePoint, gradU );
    _discrPhi->evaluateGradient ( el, edgePoint, gradPhi );

    RealType norm = sqrt ( gradPhi.normSqr() + _epsSqr );       // sqrt( nabla Phi^2 + eps^2 )
    gradPhi /= norm;

    MatType mat;

    // compute the projection: Id - (nabla Phi)/||...|| \times (nabla Phi)/||...||
    for ( int i = 0; i < ConfiguratorType::VecType::dim; i++ )
      for ( int j = 0; j < ConfiguratorType::VecType::dim; j++ )
        mat[i][j] = -gradPhi[i] * gradPhi[j];
    for ( int i = 0; i < ConfiguratorType::VecType::dim; i++ )
      mat[i][i] += 1.;

    mat.mult ( gradU, PGradU );

    return PGradU * normal;
  }

template<typename ConfiguratorType , typename BoundaryQuadratureType >
void qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::setImageReference ( const aol::Vector< RealType > &  Phi  )  [inline]

Definition at line 418 of file implicitSurfaceFEOps.h.

References qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::_discrPhi, aol::color::reset, and aol::Vector< _DataType >::size().

                                                            {
    if ( static_cast< int > ( Phi.size() ) != this->getConfigurator().getNumGlobalDofs() ) {
      cerr << "Array.size() = " << Phi.size() << " getConfigurator().getNumGlobalDofs() = " << this->getConfigurator().getNumGlobalDofs()  << endl;
      throw aol::Exception ( "IntegrateProjectionUOverBoundary: Array Phi has wrong size\n", __FILE__, __LINE__ );
    }
    if ( _discrPhi )
      delete _discrPhi;
    _discrPhi = new aol::DiscreteFunctionDefault<ConfiguratorType> ( this->getConfigurator(), Phi );
    this->reset();
  }


Member Data Documentation

template<typename ConfiguratorType , typename BoundaryQuadratureType >
const aol::DiscreteFunctionDefault<ConfiguratorType>* qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::_discrPhi [private]
template<typename ConfiguratorType , typename BoundaryQuadratureType >
ConfiguratorType::RealType qc::IntegrateProjectionUOverBoundary< ConfiguratorType, BoundaryQuadratureType >::_epsSqr [private]

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

Generated on Fri Sep 9 2011 21:09:51 for QuocMesh by doxygen 1.7.1