Sundance::SumOfIntegrals Class Reference

SumOfIntegrals represents a sum of integrals, grouped by region and quadrature rule. More...

Inheritance diagram for Sundance::SumOfIntegrals:

Sundance::ScalarExpr Sundance::ExprBase Playa::Handleable< ExprBase > Sundance::SumOfBCs

List of all members.

Public Member Functions

 SumOfIntegrals (const RCP< CellFilterStub > &region, const Expr &expr, const RCP< QuadratureFamilyStub > &quad, const WatchFlag &watch)
 Construct given an integral over a single region.
 SumOfIntegrals (const RCP< CellFilterStub > &region, const Expr &expr, const RCP< QuadratureFamilyStub > &quad, const ParametrizedCurve &curve, const WatchFlag &watch)
 Construct given an integral over a single region.
virtual ~SumOfIntegrals ()
void addTerm (const RCP< CellFilterStub > &region, const Expr &expr, const RCP< QuadratureFamilyStub > &quad, const ParametrizedCurve &paramCurve, const WatchFlag &watch, int sign)
 Add another term to this integral.
void merge (const SumOfIntegrals *other, int sign)
 Add this sum of integrals to another sum of integrals.
void multiplyByConstant (const SpatiallyConstantExpr *expr)
 Multiply all terms in the sum by a constant.
void changeSign ()
 Change the sign of all terms in the sum.
int numRQC () const
 Return the number of subregions.
const Sundance::Map
< RegionQuadCombo, Expr > & 
rqcToExprMap () const
Set< int > funcsOnRegion (const OrderedHandle< CellFilterStub > &d, const Set< int > &funcsSet) const
 Return the set of unknown or variational functions defined on region d.
bool integralHasTestFunctions (const OrderedHandle< CellFilterStub > &d) const
 Indicate whether the integral over region d contains any test functions.
RCP< CellFilterStub > nullRegion () const
 Return a null cell filter of a type consistent with the other filters in this integral.
virtual bool isIndependentOf (const Expr &u) const
 Indicate whether the expression is independent of the given functions.
virtual bool isLinearForm (const Expr &u) const
 Indicate whether the expression is linear in the given functions.
virtual bool isQuadraticForm (const Expr &u) const
 Indicate whether the expression is quadratic in the given functions.
virtual bool isLinearInTests () const
 Indicate whether the expression is nonlinear with respect to test functions.
virtual bool everyTermHasTestFunctions () const
 Indicate whether every term in the expression contains test functions.
virtual bool hasTestFunctions () const
 Indicate whether the expression contains test functions.
virtual std::ostream & toText (std::ostream &os, bool paren) const
 Write a simple text description suitable for output to a terminal.
virtual XMLObject toXML () const
 Write in XML.
virtual RCP< ExprBasegetRcp ()
 Return a safely-created RefCountPtr to the base type.
virtual bool lessThan (const ScalarExpr *other) const
 Ordering operator for use in transforming exprs to standard form.
bool hasWatchedTerm () const
 Look for a term with an active watchpoint.
int eqnSetSetupVerb () const
 Find the maximum setup verbosity of the terms.

Protected Member Functions

Expr filterSpectral (const Expr &ex) const

Private Attributes

Sundance::Map< RegionQuadCombo,
Expr
rqcToExprMap_


Detailed Description

SumOfIntegrals represents a sum of integrals, grouped by region and quadrature rule.

\[ \sum_{d=0}^{N_d-1} \left[\sum_{q=0}^{N_{q,d}-1} \int_{\Omega_d,Q_{q,d}} g_{d,q}\right] \]

Definition at line 69 of file SundanceSumOfIntegrals.hpp.


Constructor & Destructor Documentation

SumOfIntegrals::SumOfIntegrals ( const RCP< CellFilterStub > &  region,
const Expr expr,
const RCP< QuadratureFamilyStub > &  quad,
const WatchFlag watch 
)

Construct given an integral over a single region.

Definition at line 39 of file SundanceSumOfIntegrals.cpp.

References addTerm().

SumOfIntegrals::SumOfIntegrals ( const RCP< CellFilterStub > &  region,
const Expr expr,
const RCP< QuadratureFamilyStub > &  quad,
const ParametrizedCurve &  curve,
const WatchFlag watch 
)

Construct given an integral over a single region.

Definition at line 48 of file SundanceSumOfIntegrals.cpp.

References addTerm().

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

Definition at line 86 of file SundanceSumOfIntegrals.hpp.


Member Function Documentation

void SumOfIntegrals::addTerm ( const RCP< CellFilterStub > &  region,
const Expr expr,
const RCP< QuadratureFamilyStub > &  quad,
const ParametrizedCurve &  paramCurve,
const WatchFlag watch,
int  sign 
)

void SumOfIntegrals::changeSign (  ) 

Change the sign of all terms in the sum.

Definition at line 111 of file SundanceSumOfIntegrals.cpp.

References Sundance::Map< Key, Value, Compare >::put(), and rqcToExprMap_.

Referenced by Sundance::SumIntegrals::doTransform().

int SumOfIntegrals::eqnSetSetupVerb (  )  const

bool SumOfIntegrals::everyTermHasTestFunctions (  )  const [virtual]

Indicate whether every term in the expression contains test functions.

Reimplemented from Sundance::ScalarExpr.

Definition at line 206 of file SundanceSumOfIntegrals.cpp.

References Sundance::Expr::everyTermHasTestFunctions(), and rqcToExprMap_.

Expr SumOfIntegrals::filterSpectral ( const Expr ex  )  const [protected]

Definition at line 58 of file SundanceSumOfIntegrals.cpp.

Referenced by addTerm().

Set< int > SumOfIntegrals::funcsOnRegion ( const OrderedHandle< CellFilterStub > &  d,
const Set< int > &  funcsSet 
) const

Return the set of unknown or variational functions defined on region d.

Definition at line 123 of file SundanceSumOfIntegrals.cpp.

References Sundance::RegionQuadCombo::domain(), Playa::Handle< PointerType >::ptr(), and rqcToExprMap_.

Referenced by Sundance::FunctionSupportResolver::FunctionSupportResolver().

virtual RCP<ExprBase> Sundance::SumOfIntegrals::getRcp (  )  [inline, virtual]

Return a safely-created RefCountPtr to the base type.

Implements Playa::Handleable< ExprBase >.

Reimplemented in Sundance::SumOfBCs.

Definition at line 160 of file SundanceSumOfIntegrals.hpp.

bool SumOfIntegrals::hasTestFunctions (  )  const [virtual]

Indicate whether the expression contains test functions.

Reimplemented from Sundance::ScalarExpr.

Definition at line 229 of file SundanceSumOfIntegrals.cpp.

References Sundance::Expr::hasTestFunctions(), and rqcToExprMap_.

bool SumOfIntegrals::hasWatchedTerm (  )  const

bool SumOfIntegrals::integralHasTestFunctions ( const OrderedHandle< CellFilterStub > &  d  )  const

Indicate whether the integral over region d contains any test functions.

Definition at line 138 of file SundanceSumOfIntegrals.cpp.

References Sundance::RegionQuadCombo::domain(), Sundance::Expr::hasTestFunctions(), and rqcToExprMap_.

bool SumOfIntegrals::isIndependentOf ( const Expr u  )  const [virtual]

Indicate whether the expression is independent of the given functions.

Reimplemented from Sundance::ScalarExpr.

Definition at line 172 of file SundanceSumOfIntegrals.cpp.

References Sundance::Expr::isIndependentOf(), and rqcToExprMap_.

bool SumOfIntegrals::isLinearForm ( const Expr u  )  const [virtual]

Indicate whether the expression is linear in the given functions.

Reimplemented from Sundance::ScalarExpr.

Definition at line 183 of file SundanceSumOfIntegrals.cpp.

References Sundance::Expr::isLinearForm(), and rqcToExprMap_.

bool SumOfIntegrals::isLinearInTests (  )  const [virtual]

Indicate whether the expression is nonlinear with respect to test functions.

Reimplemented from Sundance::ScalarExpr.

Definition at line 218 of file SundanceSumOfIntegrals.cpp.

References Sundance::Expr::isLinearInTests(), and rqcToExprMap_.

bool SumOfIntegrals::isQuadraticForm ( const Expr u  )  const [virtual]

Indicate whether the expression is quadratic in the given functions.

Reimplemented from Sundance::ScalarExpr.

Definition at line 194 of file SundanceSumOfIntegrals.cpp.

References Sundance::Expr::isQuadraticForm(), and rqcToExprMap_.

bool SumOfIntegrals::lessThan ( const ScalarExpr other  )  const [virtual]

Ordering operator for use in transforming exprs to standard form.

Implements Sundance::ScalarExpr.

Definition at line 281 of file SundanceSumOfIntegrals.cpp.

References rqcToExprMap_.

void SumOfIntegrals::merge ( const SumOfIntegrals other,
int  sign 
)

void SumOfIntegrals::multiplyByConstant ( const SpatiallyConstantExpr expr  ) 

RCP< CellFilterStub > SumOfIntegrals::nullRegion (  )  const

Return a null cell filter of a type consistent with the other filters in this integral.

Definition at line 153 of file SundanceSumOfIntegrals.cpp.

References Sundance::RegionQuadCombo::domain(), and rqcToExprMap_.

Referenced by Sundance::SumIntegrals::doTransform().

int Sundance::SumOfIntegrals::numRQC (  )  const [inline]

Return the number of subregions.

Definition at line 106 of file SundanceSumOfIntegrals.hpp.

References rqcToExprMap_.

const Sundance::Map<RegionQuadCombo, Expr>& Sundance::SumOfIntegrals::rqcToExprMap (  )  const [inline]

std::ostream & SumOfIntegrals::toText ( std::ostream &  os,
bool  paren 
) const [virtual]

Write a simple text description suitable for output to a terminal.

Implements Sundance::ExprBase.

Reimplemented in Sundance::SumOfBCs.

Definition at line 242 of file SundanceSumOfIntegrals.cpp.

References rqcToExprMap_, Sundance::Expr::toString(), and Sundance::RegionQuadCombo::toString().

XMLObject SumOfIntegrals::toXML (  )  const [virtual]


Member Data Documentation

Site Contact