Sundance::DiscreteFunction Class Reference

Inheritance diagram for Sundance::DiscreteFunction:

Sundance::DiscreteFunctionStub Sundance::FuncWithBasis Sundance::ListExpr Sundance::ExprBase Playa::Handleable< ExprBase >

List of all members.

Public Member Functions

 DiscreteFunction (const DiscreteSpace &space, const std::string &name="")
 DiscreteFunction (const DiscreteSpace &space, const Vector< double > &vec, const std::string &name="")
 DiscreteFunction (const DiscreteSpace &space, const double &constantValue, const std::string &name="")
 DiscreteFunction (const DiscreteSpace &space, const Array< string > &names)
 DiscreteFunction (const DiscreteSpace &space, const Vector< double > &vec, const Array< string > &names)
 DiscreteFunction (const DiscreteSpace &space, const double &constantValue, const Array< string > &name)
void updateGhosts () const
void setVector (const Vector< double > &vec)
const Vector< double > & getVector () const
const DiscreteSpacediscreteSpace () const
const Meshmesh () const
const RCP< DOFMapBase > & map () const
RCP< GhostView< double > > ghostView () const
const DiscreteFunctionDatadata () const
virtual ~DiscreteFunction ()

Static Public Member Functions

static const DiscreteFunctiondiscFunc (const Expr &expr)
static DiscreteFunctiondiscFunc (Expr &expr)

Related Functions

(Note that these are not member functions.)

void updateDiscreteFunction (const Expr &newVals, Expr oldVals)
Expr copyDiscreteFunction (const Expr &u0, const string &name="")
void addVecToDiscreteFunction (Expr u, const Vector< double > &v)
Vector< double > getDiscreteFunctionVector (const Expr &u)
void setDiscreteFunctionVector (Expr u, const Vector< double > &v)
Mesh getDiscreteFunctionMesh (const Expr &u)
DiscreteSpace getDiscreteSpace (const Expr &u)

Handleable interface



RCP< DiscreteFunctionDatadata_
RCP< const MapStructuregetLocalValues (int cellDim, const Array< int > &cellLID, Array< Array< double > > &localValues) const
RCP< DiscreteFuncDataStubgetRCP (DiscreteFunctionData *ptr)


Detailed Description

DiscreteFunction represents a function that is discretized on a finite-element space.

Definition at line 51 of file SundanceDiscreteFunction.hpp.


Constructor & Destructor Documentation

Sundance::DiscreteFunction::DiscreteFunction ( const DiscreteSpace space,
const std::string &  name = "" 
)

Sundance::DiscreteFunction::DiscreteFunction ( const DiscreteSpace space,
const Vector< double > &  vec,
const std::string &  name = "" 
)

Sundance::DiscreteFunction::DiscreteFunction ( const DiscreteSpace space,
const double &  constantValue,
const std::string &  name = "" 
)

Sundance::DiscreteFunction::DiscreteFunction ( const DiscreteSpace space,
const Array< string > &  names 
)

Sundance::DiscreteFunction::DiscreteFunction ( const DiscreteSpace space,
const Vector< double > &  vec,
const Array< string > &  names 
)

Sundance::DiscreteFunction::DiscreteFunction ( const DiscreteSpace space,
const double &  constantValue,
const Array< string > &  name 
)

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

virtual destructor

Definition at line 111 of file SundanceDiscreteFunction.hpp.


Member Function Documentation

const DiscreteFunctionData* Sundance::DiscreteFunction::data (  )  const [inline]

Definition at line 107 of file SundanceDiscreteFunction.hpp.

References data_.

Referenced by Sundance::ExprFieldWrapper::ExprFieldWrapper().

DiscreteFunction * Sundance::DiscreteFunction::discFunc ( Expr expr  )  [static]

Definition at line 176 of file SundanceDiscreteFunction.cpp.

References Playa::Handle< PointerType >::ptr().

const DiscreteFunction * Sundance::DiscreteFunction::discFunc ( const Expr expr  )  [static]

const DiscreteSpace& Sundance::DiscreteFunction::discreteSpace (  )  const [inline]

RCP< const MapStructure > Sundance::DiscreteFunction::getLocalValues ( int  cellDim,
const Array< int > &  cellLID,
Array< Array< double > > &  localValues 
) const

Definition at line 152 of file SundanceDiscreteFunction.cpp.

References data_, and Sundance::getLocalValsTimer().

RCP< DiscreteFuncDataStub > Sundance::DiscreteFunction::getRCP ( DiscreteFunctionData ptr  )  [private]

Definition at line 189 of file SundanceDiscreteFunction.cpp.

const Vector<double>& Sundance::DiscreteFunction::getVector (  )  const [inline]

RCP<GhostView<double> > Sundance::DiscreteFunction::ghostView (  )  const [inline]

const RCP<DOFMapBase>& Sundance::DiscreteFunction::map (  )  const [inline]

const Mesh& Sundance::DiscreteFunction::mesh (  )  const [inline]

void Sundance::DiscreteFunction::setVector ( const Vector< double > &  vec  ) 

void Sundance::DiscreteFunction::updateGhosts (  )  const

Definition at line 146 of file SundanceDiscreteFunction.cpp.

References data_.

Referenced by Sundance::unfoldPeriodicDiscreteFunction().


Friends And Related Function Documentation

void addVecToDiscreteFunction ( Expr  u,
const Vector< double > &  v 
) [related]

Add a vector v to the vector underlying the discrete function u.

Definition at line 207 of file SundanceDiscreteFunction.cpp.

Referenced by inlineNewtonSolve(), and main().

Expr copyDiscreteFunction ( const Expr u0,
const string &  name = "" 
) [related]

Make a copy of the discrete function u0. The copy will have a shallow copy of u0's space, and a deep copy of u0's vector.

Definition at line 214 of file SundanceDiscreteFunction.cpp.

Referenced by main().

Mesh getDiscreteFunctionMesh ( const Expr u  )  [related]

Get the mesh underlying a discrete function

Definition at line 324 of file SundanceDiscreteFunction.cpp.

Vector< double > getDiscreteFunctionVector ( const Expr u  )  [related]

Get a shallow copy of the vector underlying a discrete function

Definition at line 289 of file SundanceDiscreteFunction.cpp.

Referenced by main().

DiscreteSpace getDiscreteSpace ( const Expr u  )  [related]

Get the discrete space on which a discrete function is defined

Definition at line 354 of file SundanceDiscreteFunction.cpp.

void setDiscreteFunctionVector ( Expr  u,
const Vector< double > &  v 
) [related]

Set the vector underlying a discrete function

Definition at line 252 of file SundanceDiscreteFunction.cpp.

Referenced by main().

void updateDiscreteFunction ( const Expr newVals,
Expr  oldVals 
) [related]

Replace the vector in oldVals with the vector from newVals.

Definition at line 198 of file SundanceDiscreteFunction.cpp.

Referenced by main().


Member Data Documentation

Site Contact