Sundance::UserDefFunctor Class Reference

Inheritance diagram for Sundance::UserDefFunctor:

Sundance::PointwiseUserDefFunctor0 Sundance::CurveExpr Sundance::PointDataExprFunctor Sundance::PointwiseUserDefFunctor1 Sundance::PointwiseUserDefFunctor2

List of all members.

Public Member Functions

 UserDefFunctor (const std::string &name, int domainDim, int rangeDim)
virtual ~UserDefFunctor ()
const std::string & name (int elemIndex) const
const std::string & name () const
virtual void evaluationCallback (int nPoints, int maxDiffOrder, const double **in, double **out) const =0
virtual void eval0 (const Array< double > &in, double *outVals) const
virtual void eval1 (const Array< double > &in, double *outVals, double *outDerivs) const
int domainDim () const
int rangeDim () const
virtual int maxOrder () const =0
void reset () const

Private Attributes

const std::string name_
Array< string > elemNames_
const int domainDim_
const int rangeDim_

Detailed Description

UserDefFunctor defines an interface for callbacks used to implement user-defined nonlinear operators in the Sundance Expr system.

Definition at line 58 of file SundanceUserDefFunctor.hpp.

Constructor & Destructor Documentation

UserDefFunctor::UserDefFunctor ( const std::string &  name,
int  domainDim,
int  rangeDim 


Definition at line 44 of file SundanceUserDefFunctor.cpp.

References domainDim_, elemNames_, name_, rangeDim_, and Sundance::toString().

virtual Sundance::UserDefFunctor::~UserDefFunctor (  )  [inline, virtual]

Definition at line 65 of file SundanceUserDefFunctor.hpp.

Member Function Documentation

int Sundance::UserDefFunctor::domainDim (  )  const [inline]

void UserDefFunctor::eval0 ( const Array< double > &  in,
double *  outVals 
) const [virtual]

Definition at line 74 of file SundanceUserDefFunctor.cpp.

References name_.

void UserDefFunctor::eval1 ( const Array< double > &  in,
double *  outVals,
double *  outDerivs 
) const [virtual]

Evaluate the expression and its derivative. The values should be put into the outVals array. The derivatives should be put into the outDerivs array, ordered with the domain index running fastest. That is,

\[ outDerivs[i*N_R + j] = \frac{\partial F_i}{\partial q_j} \]

Definition at line 80 of file SundanceUserDefFunctor.cpp.

References name_.

virtual void Sundance::UserDefFunctor::evaluationCallback ( int  nPoints,
int  maxDiffOrder,
const double **  in,
double **  out 
) const [pure virtual]

virtual int Sundance::UserDefFunctor::maxOrder (  )  const [pure virtual]

const std::string& Sundance::UserDefFunctor::name (  )  const [inline]

const std::string& Sundance::UserDefFunctor::name ( int  elemIndex  )  const [inline]

Definition at line 68 of file SundanceUserDefFunctor.hpp.

References elemNames_.

int Sundance::UserDefFunctor::rangeDim (  )  const [inline]

void Sundance::UserDefFunctor::reset (  )  const

Member Data Documentation

Definition at line 110 of file SundanceUserDefFunctor.hpp.

Referenced by domainDim(), and UserDefFunctor().

Array<string> Sundance::UserDefFunctor::elemNames_ [private]

Definition at line 109 of file SundanceUserDefFunctor.hpp.

Referenced by name(), and UserDefFunctor().

const std::string Sundance::UserDefFunctor::name_ [private]

Definition at line 108 of file SundanceUserDefFunctor.hpp.

Referenced by eval0(), eval1(), name(), and UserDefFunctor().

Definition at line 111 of file SundanceUserDefFunctor.hpp.

Referenced by rangeDim(), and UserDefFunctor().

Site Contact