QuOc

 

Public Types | Public Member Functions | Private Attributes

nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType > Class Template Reference

#include <narrowBandBoundaryIntegration.h>

Inheritance diagram for nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >:
nb::BoundaryIntegrationInterface< ConfiguratorType, SubGridType, aol::Vector< ConfiguratorType::RealType >, ConfiguratorType::Dim, BoundaryQuadratureType, IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType > > aol::Op< aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType > >

List of all members.

Public Types

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

Public Member Functions

 IntegrateMCMGradUOverBoundary (const ConfiguratorType &config, SubGridType &subGrid, RealType Epsilon)
 ~IntegrateMCMGradUOverBoundary ()
void setImageReference (const aol::Vector< RealType > &Phi)
RealType integrandAtQuadPoint (const aol::Vector< RealType > &arg, const VecType &normal, const ElementType &el, const VecType edgePoint) const
 computes $ \frac{\nabla \Phi}{\| \nabla \Phi \|} \cdot n $

Private Attributes

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

Detailed Description

template<typename ConfiguratorType, typename BoundaryQuadratureType, typename SubGridType>
class nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >

This class computes the following integral:

\[ \int_{\partial\Omega} \frac{\nabla \Phi}{\| \nabla \Phi \|} \cdot n \vartheta da \]

Definition at line 239 of file narrowBandBoundaryIntegration.h.


Member Typedef Documentation

template<typename ConfiguratorType , typename BoundaryQuadratureType , typename SubGridType >
typedef ConfiguratorType::ElementType nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >::ElementType

Definition at line 249 of file narrowBandBoundaryIntegration.h.

template<typename ConfiguratorType , typename BoundaryQuadratureType , typename SubGridType >
typedef ConfiguratorType::RealType nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >::RealType

Definition at line 248 of file narrowBandBoundaryIntegration.h.

template<typename ConfiguratorType , typename BoundaryQuadratureType , typename SubGridType >
typedef ConfiguratorType::VecType nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >::VecType

Definition at line 250 of file narrowBandBoundaryIntegration.h.


Constructor & Destructor Documentation

template<typename ConfiguratorType , typename BoundaryQuadratureType , typename SubGridType >
nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >::IntegrateMCMGradUOverBoundary ( const ConfiguratorType &  config,
SubGridType &  subGrid,
RealType  Epsilon 
) [inline]

Definition at line 252 of file narrowBandBoundaryIntegration.h.

      : BoundaryIntegrationInterface < ConfiguratorType, SubGridType, aol::Vector<RealType>,
      ConfiguratorType::Dim, BoundaryQuadratureType,
      IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType> > ( config, subGrid ),
      _epsSqr ( Epsilon*Epsilon ), _discrPhiOld( NULL ) {}

template<typename ConfiguratorType , typename BoundaryQuadratureType , typename SubGridType >
nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >::~IntegrateMCMGradUOverBoundary (  )  [inline]

Member Function Documentation

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

computes $ \frac{\nabla \Phi}{\| \nabla \Phi \|} \cdot n $

Definition at line 273 of file narrowBandBoundaryIntegration.h.

References nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >::_discrPhiOld, nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >::_epsSqr, and aol::DiscreteFunctionDefault< ConfiguratorType >::evaluateGradient().

                                                                                         {
    if ( !_discrPhiOld ) {
      throw aol::Exception ( "IntegrateMCMGradUOverBoundary::integrandAtQuadPoint: set image first!", __FILE__, __LINE__ );
    }                                   
                                    
    // compute gradient of boundaryfunction @ edgePt
    aol::DiscreteFunctionDefault<ConfiguratorType> discrPhi ( this->_grid, arg );
    VecType gradPhi, gradPhiOld;
    discrPhi.evaluateGradient ( el, edgePoint, gradPhi );
    _discrPhiOld->evaluateGradient ( el, edgePoint, gradPhiOld );
    
    RealType norm = sqrt ( gradPhiOld.normSqr() + _epsSqr );       // sqrt( nabla PhiOld^2 + eps^2 )
    gradPhi /= norm;

    return gradPhi * normal;
  }

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

Definition at line 262 of file narrowBandBoundaryIntegration.h.

References nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >::_discrPhiOld, and aol::Vector< _DataType >::size().

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


Member Data Documentation

template<typename ConfiguratorType , typename BoundaryQuadratureType , typename SubGridType >
ConfiguratorType::RealType nb::IntegrateMCMGradUOverBoundary< ConfiguratorType, BoundaryQuadratureType, SubGridType >::_epsSqr [private]

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

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