QuOc

 

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode > Class Template Reference

#include <FEOpInterface.h>

Inheritance diagram for aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >:
aol::FELinOpInterface< ConfiguratorType::RealType, ConfiguratorType, FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >, IndexMode > aol::FEOpInterface< ConfiguratorType, aol::Vector< ConfiguratorType::RealType > > aol::Op< aol::Vector< ConfiguratorType::RealType >, aol::Vector< ConfiguratorType::RealType > >

List of all members.

Public Types

typedef ConfiguratorType::RealType RealType
typedef ConfiguratorType::QuadType QuadType
typedef ConfiguratorType::MatType MatType
typedef ConfiguratorType::VecType VecType

Public Member Functions

 FELinScalarWeightedSemiDiffInterface (const typename ConfiguratorType::InitType &Grid, const int IndexComponent, const bool Transpose=false, OperatorType OpType=ONTHEFLY)
 FELinScalarWeightedSemiDiffInterface (const ConfiguratorType &Config, const typename ConfiguratorType::InitType &Grid, const int IndexComponent, const bool Transpose=false, OperatorType OpType=ONTHEFLY)
RealType getCoeff (const typename ConfiguratorType::ElementType &El, int QuadPoint, const typename ConfiguratorType::DomVecType &RefCoord) const
 this function has to be provided in the implementation (derived class) of the interface
void prepareLocalMatrix (const typename ConfiguratorType::ElementType &El, Mat< ConfiguratorType::maxNumLocalDofs, ConfiguratorType::maxNumLocalDofs, RealType > &LocalMatrix) const
 this function computes the numerical quadrature of the bilinear form and saves the values locally.

Protected Member Functions

Imp & asImp ()
const Imp & asImp () const

Protected Attributes

const ConfiguratorType::InitType & _grid
const int _gradientIndex
const bool _transpose

Detailed Description

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
class aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >

provides an easy interface to matrices of the form $ \int_\Omega \phi_i \partial_k\phi_j v(x) $, where $v$ is a scalar valued function, which has to be provided by the member function getCoeff.

This class works in 2D and 3D and can be endowed with arbitrary quadrature rules.

Author:
Berkels

Definition at line 2912 of file FEOpInterface.h.


Member Typedef Documentation

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
typedef ConfiguratorType::MatType aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::MatType

Definition at line 2943 of file FEOpInterface.h.

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
typedef ConfiguratorType::QuadType aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::QuadType

Definition at line 2942 of file FEOpInterface.h.

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
typedef ConfiguratorType::RealType aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::RealType

Reimplemented in aol::WeightedSemiDiffOp< ConfiguratorType >.

Definition at line 2941 of file FEOpInterface.h.

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
typedef ConfiguratorType::VecType aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::VecType

Definition at line 2944 of file FEOpInterface.h.


Constructor & Destructor Documentation

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::FELinScalarWeightedSemiDiffInterface ( const typename ConfiguratorType::InitType &  Grid,
const int  IndexComponent,
const bool  Transpose = false,
OperatorType  OpType = ONTHEFLY 
) [inline]

Definition at line 2920 of file FEOpInterface.h.

      : FELinOpInterface < typename ConfiguratorType::RealType, ConfiguratorType,
      FELinScalarWeightedSemiDiffInterface<ConfiguratorType, Imp, IndexMode>, IndexMode > ( Grid, OpType ),
      _grid ( Grid ),
      _gradientIndex(IndexComponent),
      _transpose ( Transpose ) {  }

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::FELinScalarWeightedSemiDiffInterface ( const ConfiguratorType &  Config,
const typename ConfiguratorType::InitType &  Grid,
const int  IndexComponent,
const bool  Transpose = false,
OperatorType  OpType = ONTHEFLY 
) [inline]

Definition at line 2930 of file FEOpInterface.h.

      : FELinOpInterface < typename ConfiguratorType::RealType, ConfiguratorType,
      FELinScalarWeightedSemiDiffInterface<ConfiguratorType, Imp, IndexMode>, IndexMode > ( Config, Grid, OpType ),
      _grid ( Grid ),
      _gradientIndex(IndexComponent),
      _transpose ( Transpose ) {  }


Member Function Documentation

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
const Imp& aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::asImp (  )  const [inline, protected]
template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
RealType aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::getCoeff ( const typename ConfiguratorType::ElementType &  El,
int  QuadPoint,
const typename ConfiguratorType::DomVecType &  RefCoord 
) const [inline]

this function has to be provided in the implementation (derived class) of the interface

Reimplemented in aol::WeightedSemiDiffOp< ConfiguratorType >.

Definition at line 2947 of file FEOpInterface.h.

                                                                                         {
    throw aol::Exception ( "called the interface function", __FILE__, __LINE__ );
    return this->asImp().getCoeff ( El, QuadPoint, RefCoord );
  }

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
void aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::prepareLocalMatrix ( const typename ConfiguratorType::ElementType &  El,
Mat< ConfiguratorType::maxNumLocalDofs, ConfiguratorType::maxNumLocalDofs, RealType > &  LocalMatrix 
) const [inline]

this function computes the numerical quadrature of the bilinear form and saves the values locally.

Definition at line 2955 of file FEOpInterface.h.

                                                                                                                                                                                 {
    const int numDofs = this->getConfigurator().getNumLocalDofs ( El );
    const typename ConfiguratorType::BaseFuncSetType &bfs = this->getConfigurator().getBaseFunctionSet ( El );

    for ( int i = 0; i < numDofs; ++i ) {
      for ( int j = 0; j < numDofs; ++j ) {
        LocalMatrix[i][j] = 0.;
      }
    }

    for ( int q = 0; q < QuadType::numQuadPoints; ++q ) {
      typename ConfiguratorType::RealType coeff;
      coeff = this->asImp().getCoeff( El, q, bfs.getRefCoord( q ) );
      for ( int i = 0; i < numDofs; ++i ) {
        RealType basisi = bfs.evaluate ( i, q );
        for ( int j = 0; j < numDofs; ++j ) {
          if ( !_transpose )
            LocalMatrix[i][j] +=  basisi * ( coeff * bfs.evaluateGradient ( j, q )[_gradientIndex] ) * bfs.getWeight ( q );
          else
            LocalMatrix[j][i] +=  basisi * ( coeff * bfs.evaluateGradient ( j, q )[_gradientIndex] ) * bfs.getWeight ( q );
        }
      }
    }

    const RealType vol = this->getConfigurator().vol ( El );

    for ( int i = 0; i < numDofs; ++i ) {
      for ( int j = 0; j < numDofs; ++j ) {
        LocalMatrix[i][j] *= vol;
      }
    }
  }


Member Data Documentation

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
const int aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::_gradientIndex [protected]
template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
const ConfiguratorType::InitType& aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::_grid [protected]

Definition at line 2916 of file FEOpInterface.h.

template<typename ConfiguratorType, typename Imp, GridGlobalIndexMode IndexMode = QUOC_GRID_INDEX_MODE>
const bool aol::FELinScalarWeightedSemiDiffInterface< ConfiguratorType, Imp, IndexMode >::_transpose [protected]

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

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