Public Member Functions | Static Public Member Functions | Related Functions
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 62 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 122 of file SundanceDiscreteFunction.hpp.


Member Function Documentation

Definition at line 118 of file SundanceDiscreteFunction.hpp.

References data_.

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

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

Definition at line 187 of file SundanceDiscreteFunction.cpp.

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

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

Definition at line 163 of file SundanceDiscreteFunction.cpp.

References data_, and Sundance::getLocalValsTimer().

Definition at line 200 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)

Definition at line 157 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 218 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 225 of file SundanceDiscreteFunction.cpp.

Referenced by main().

Mesh getDiscreteFunctionMesh ( const Expr u) [related]

Get the mesh underlying a discrete function

Definition at line 335 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 300 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 365 of file SundanceDiscreteFunction.cpp.

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

Set the vector underlying a discrete function

Definition at line 263 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 209 of file SundanceDiscreteFunction.cpp.

Referenced by main().


Member Data Documentation

Site Contact