dune-pdelab  2.5-dev
Public Types | Public Member Functions | Related Functions | List of all members
Dune::PDELab::TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimR > Class Template Reference

GridFunction implemented by a member function of some class. More...

#include <dune/pdelab/function/memberadaptor.hh>

Inheritance diagram for Dune::PDELab::TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimR >:
Inheritance graph

Public Types

typedef GridFunctionTraits< GV, RF, dimR, FieldVector< RF, dimR > > Traits
 export traits class More...
 
typedef GridFunctionTag ImplementationTag
 
typedef GridFunctionTraits< GV, RF, dimR, FieldVector< RF, dimR > > ::GridViewType GridViewType
 Type of the GridView. More...
 

Public Member Functions

 TwoArgsMemberFunctionToGridFunctionAdaptor (const Class &obj_, Member member_, const GV &gv_)
 Construct an adaptor object. More...
 
void evaluate (const typename Traits::ElementType &e, const typename Traits::DomainType &x, typename Traits::RangeType &y) const
 
const GV & getGridView () const
 get reference to the internal gridview. More...
 
Output::DataSetType dataSetType () const
 Return the data set type of this function. More...
 
void setDataSetType (Output::DataSetType dataSetType)
 Set the data set type of this function. More...
 

Related Functions

(Note that these are not member functions.)

template<class RF , std::size_t dimRange, class GV , class Class , class Member >
TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimRange > makeTwoArgsMemberFunctionToGridFunctionAdaptor (const Class &obj, Member member, const GV &gv)
 easy construction of a TwoArgsMemberFunctionToGridFunctionAdaptor More...
 

Detailed Description

template<class Member, class Class, class GV, class RF, std::size_t dimR = 1>
class Dune::PDELab::TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimR >

GridFunction implemented by a member function of some class.

Template Parameters
MemberMember function pointer type.
ClassType of the class containing the member.
GVThe type of the GridView
RFThe type of the range field
dimRangeThe dimension of the Range.

The member function must support the signature

(obj.*member)(typename GV::template Codim<0>::Entity &e,
const FieldVector<typename GV::ctype, GV::dimension> &xl) const;

The return value should be something assignable to FieldVector<RF,dimRange>.

Member Typedef Documentation

§ GridViewType

typedef GridFunctionTraits< GV, RF, dimR, FieldVector< RF, dimR > > ::GridViewType Dune::PDELab::GridFunctionBase< GridFunctionTraits< GV, RF, dimR, FieldVector< RF, dimR > > , TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimR > >::GridViewType
inherited

Type of the GridView.

§ ImplementationTag

typedef GridFunctionTag Dune::PDELab::GridFunctionBase< GridFunctionTraits< GV, RF, dimR, FieldVector< RF, dimR > > , TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimR > >::ImplementationTag
inherited

§ Traits

template<class Member , class Class , class GV , class RF , std::size_t dimR = 1>
typedef GridFunctionTraits< GV, RF, dimR, FieldVector<RF, dimR> > Dune::PDELab::TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimR >::Traits

export traits class

Constructor & Destructor Documentation

§ TwoArgsMemberFunctionToGridFunctionAdaptor()

template<class Member , class Class , class GV , class RF , std::size_t dimR = 1>
Dune::PDELab::TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimR >::TwoArgsMemberFunctionToGridFunctionAdaptor ( const Class &  obj_,
Member  member_,
const GV &  gv_ 
)
inline

Construct an adaptor object.

Parameters
obj_Class object to call the member function on.
member_Member function pointer to the member to use.
gv_The GridView to use.

This class store the obj_ and gv_ references internally and becomes invalid when they become invalid.

Member Function Documentation

§ dataSetType()

Output::DataSetType Dune::PDELab::GridFunctionOutputParameters::dataSetType ( ) const
inlineinherited

Return the data set type of this function.

§ evaluate()

template<class Member , class Class , class GV , class RF , std::size_t dimR = 1>
void Dune::PDELab::TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimR >::evaluate ( const typename Traits::ElementType e,
const typename Traits::DomainType x,
typename Traits::RangeType y 
) const
inline

§ getGridView()

template<class Member , class Class , class GV , class RF , std::size_t dimR = 1>
const GV& Dune::PDELab::TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimR >::getGridView ( ) const
inline

get reference to the internal gridview.

§ setDataSetType()

void Dune::PDELab::GridFunctionOutputParameters::setDataSetType ( Output::DataSetType  dataSetType)
inlineinherited

Set the data set type of this function.

Friends And Related Function Documentation

§ makeTwoArgsMemberFunctionToGridFunctionAdaptor()

template<class RF , std::size_t dimRange, class GV , class Class , class Member >
TwoArgsMemberFunctionToGridFunctionAdaptor< Member, Class, GV, RF, dimRange > makeTwoArgsMemberFunctionToGridFunctionAdaptor ( const Class &  obj,
Member  member,
const GV &  gv 
)
related

easy construction of a TwoArgsMemberFunctionToGridFunctionAdaptor

The only required template parameters are RF and dimRange, all other template parameters can be deduced automatically.


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