Public Member Functions | |
| Expr () | |
| Expr (Handleable< ExprBase > *rawPtr) | |
| Expr (const RefCountPtr< ExprBase > &smartPtr) | |
| Expr (const double &c) | |
| Expr (const std::complex< double > &c) | |
| Expr | operator+ (const Expr &other) const |
| Expr | operator- (const Expr &other) const |
| Expr | operator* (const Expr &other) const |
| Expr | operator/ (const Expr &other) const |
| Expr | operator/ (const double &other) const |
| Expr | operator/ (const std::complex< double > &other) const |
| Expr | operator- () const |
| Expr | real () const |
| Expr | imag () const |
| Expr | conj () const |
| const Expr & | operator[] (int i) const |
| int | size () const |
| int | totalSize () const |
| void | append (const Expr &expr) |
| Expr | flatten () const |
| Expr | flattenSpectral () const |
| std::string | toString () const |
| XMLObject | toXML () const |
| bool | isComplex () const |
| bool | isSpectral () const |
| bool | isTestElement () const |
| bool | isUnknownElement () const |
| void | setParameterValue (const double &value) |
| double | getParameterValue () const |
| bool | isIndependentOf (const Expr &u) const |
| bool | isLinearInTests () const |
| bool | everyTermHasTestFunctions () const |
| bool | hasTestFunctions () const |
| bool | isLinearForm (const Expr &u) const |
| bool | isQuadraticForm (const Expr &u) const |
| void | getUnknowns (Set< int > &unkID, Array< Expr > &unks) const |
| void | getTests (Set< int > &testID, Array< Expr > &tests) const |
| bool | lessThan (const Expr &other) const |
| bool | operator< (const Expr &other) const |
| bool | sameAs (const Expr &other) const |
| Sundance::Map< Expr, int > | getSumTree () const |
| const ScalarExpr * | scalarExpr () const |
| const FuncElementBase * | funcElement () const |
Static Public Member Functions | |
| static bool & | evaluationCachingOn () |
| static bool & | showAllParens () |
| static Expr | handle (const RCP< ExprBase > &ptr) |
| static Time & | opTimer () |
| static Time & | outputTimer () |
Private Member Functions | |
| Expr | sum (const Expr &other, int sign) const |
| Expr | multiply (const Expr &other) const |
| Expr | divide (const Expr &other) const |
| bool | tryAddComplex (const Expr &L, const Expr &R, int sign, Expr &rtn) const |
| bool | tryMultiplyComplex (const Expr &L, const Expr &R, Expr &rtn) const |
Related Functions | |
(Note that these are not member functions.) | |
| Expr | EssentialBC (const Handle< CellFilterStub > &domain, const Expr &integrand, const WatchFlag &watch=WatchFlag()) |
| Expr | EssentialBC (const Handle< CellFilterStub > &domain, const Expr &integrand, const Handle< QuadratureFamilyStub > &quad, const WatchFlag &watch=WatchFlag()) |
| Expr | EssentialBC (const Handle< CellFilterStub > &domain, const Expr &integrand, const Handle< QuadratureFamilyStub > &quad, const ParametrizedCurve &curve, const WatchFlag &watch=WatchFlag()) |
| std::ostream & | operator<< (std::ostream &os, const Expr &e) |
| Expr | operator+ (const double &a, const Expr &x) |
| Expr | operator- (const double &a, const Expr &x) |
| Expr | operator* (const double &a, const Expr &x) |
| Expr | operator/ (const double &a, const Expr &x) |
| Expr | operator+ (const std::complex< double > &a, const Expr &x) |
| Expr | operator- (const std::complex< double > &a, const Expr &x) |
| Expr | operator* (const std::complex< double > &a, const Expr &x) |
| Expr | operator/ (const std::complex< double > &a, const Expr &x) |
| Expr | Re (const Expr &a) |
| Expr | Im (const Expr &a) |
| Expr | conj (const Expr &a) |
| Expr | Complex (const Expr &real, const Expr &imag) |
| Expr | List (const Expr &a) |
| Expr | List (const Expr &a, const Expr &b) |
| Expr | List (const Expr &a, const Expr &b, const Expr &c) |
| Expr | List (const Expr &a, const Expr &b, const Expr &c, const Expr &d) |
| Expr | List (const Expr &a, const Expr &b, const Expr &c, const Expr &d, const Expr &e) |
| Expr | List (const Expr &a, const Expr &b, const Expr &c, const Expr &d, const Expr &e, const Expr &f) |
| Expr | List (const Expr &a, const Expr &b, const Expr &c, const Expr &d, const Expr &e, const Expr &f, const Expr &g) |
| Expr | List (const Expr &a, const Expr &b, const Expr &c, const Expr &d, const Expr &e, const Expr &f, const Expr &g, const Expr &h) |
| Expr | List (const Expr &a, const Expr &b, const Expr &c, const Expr &d, const Expr &e, const Expr &f, const Expr &g, const Expr &h, const Expr &i) |
| Expr | List (const Expr &a, const Expr &b, const Expr &c, const Expr &d, const Expr &e, const Expr &f, const Expr &g, const Expr &h, const Expr &i, const Expr &j) |
| Expr | FunctionalDerivative (const Expr &F, const Expr &u) |
| Expr | gradient (int dim) |
| Expr | div (const Expr &f) |
| Expr | cross (const Expr &a, const Expr &b) |
| Expr | curl (const Expr &f) |
| Expr | colonProduct (const Expr &A, const Expr &B) |
| Expr | outerProduct (const Expr &a, const Expr &b) |
| bool | isSquareMatrix (const Expr &x, int &N) |
| bool | isVector (const Expr &x, int &N) |
Elementary math functions | |
| Expr | reciprocal (const Expr &arg) |
| Expr | fabs (const Expr &arg) |
| Expr | sign (const Expr &arg) |
| Expr | exp (const Expr &arg) |
| Expr | log (const Expr &arg) |
| Expr | sqrt (const Expr &arg) |
| Expr | sin (const Expr &arg) |
| Expr | cos (const Expr &arg) |
| Expr | tan (const Expr &arg) |
| Expr | asin (const Expr &arg) |
| Expr | acos (const Expr &arg) |
| Expr | atan (const Expr &arg) |
| Expr | sinh (const Expr &arg) |
| Expr | cosh (const Expr &arg) |
| Expr | tanh (const Expr &arg) |
| Expr | asinh (const Expr &arg) |
| Expr | acosh (const Expr &arg) |
| Expr | atanh (const Expr &arg) |
User-level expression class. Expr is a handle to a reference-counted pointer to a ExprBase subtype. As such, expression copies and assignments are shallow.
Expressions can be grouped into lists with an arbitrary structure. Important special cases are scalar, vector, and tensor expressions.
// Check total size of state list int totalSize = state.totalSize(); // returns 4
Addition
Expr sum = x + y;
The operands must have identical list structures.
Subtraction
Expr diff = x - y;
The operands must have identical list structures.
Multiplication
Expr product = x * y;
The operands must have list structures such that the product can be interpreted as a scalar-vector product or as an inner product between vectors or tensors. The multiplication operator is also used to represent the application of a differential operator.
Expr quotient = x / y;
The user-level expression subtypes are listed below, along with examples of their use.
UnknownFunction - Represents an unknown function in a finite-element problem. Unknown functions can be scalar-valued or vector valued.
Example of creation of a scalar-valued unknown function:
Expr u = new UnknownFunction(new Lagrange(1));
Example of creation of a vector-valued unknown function:
TestFunction - Represents a test function in a finite-element problem. Test functions can be scalar-valued or vector valued.
Example of creation of a scalar-valued test function:
Expr v = new TestFunction(new Lagrange(1));
Example of creation of a vector-valued test function:
Derivative - Represents a spatial derivative operator. Spatial derivatives are applied using the multiplication operator.
Derivative expressions are scalar valued. However, vector differential operators can be created using the List operator. For example,
CoordExpr - Represents a coordinate functions.
Coordinate expressions are scalar valued.
Definition at line 206 of file SundanceExpr.hpp.
| Sundance::Expr::Expr | ( | ) | [inline] |
| Sundance::Expr::Expr | ( | Handleable< ExprBase > * | rawPtr | ) | [inline] |
Construct a Expr with a raw pointer to a ExprBase
Definition at line 210 of file SundanceExpr.hpp.
| Sundance::Expr::Expr | ( | const RefCountPtr< ExprBase > & | smartPtr | ) | [inline] |
Construct a Expr with a smart pointer to a ExprBase
Definition at line 210 of file SundanceExpr.hpp.
| Expr::Expr | ( | const double & | c | ) |
Construct with a constant. Creates a ConstantExpr.
Definition at line 113 of file SundanceExpr.cpp.
| Expr::Expr | ( | const std::complex< double > & | c | ) |
Construct with a complex constant. Creates a ComplexExpr.
Definition at line 117 of file SundanceExpr.cpp.
| void Expr::append | ( | const Expr & | expr | ) |
Append a new element to this list
Definition at line 685 of file SundanceExpr.cpp.
References Sundance::ListExpr::append(), and Playa::Handle< ExprBase >::ptr().
Referenced by Sundance::ListExpr::flatten(), and Sundance::ListExpr::join().
| Expr Expr::conj | ( | ) | const |
Return complex conjugate
Definition at line 827 of file SundanceExpr.cpp.
References imag(), isComplex(), real(), and size().
Referenced by conj(), and operator/().
| Expr Expr::divide | ( | const Expr & | other | ) | const [private] |
Divide two scalar expressions
Definition at line 479 of file SundanceExpr.cpp.
References Playa::Handle< PointerType >::ptr().
Referenced by operator/().
| static bool& Sundance::Expr::evaluationCachingOn | ( | ) | [inline, static] |
Turn evaluation caching on
Definition at line 338 of file SundanceExpr.hpp.
| bool Expr::everyTermHasTestFunctions | ( | ) | const |
Indicate whether every term in the expression contains test functions
Definition at line 914 of file SundanceExpr.cpp.
References Sundance::ScalarExpr::everyTermHasTestFunctions(), Playa::Handle< ExprBase >::ptr(), and scalarExpr().
Referenced by Sundance::SumOfIntegrals::everyTermHasTestFunctions().
| Expr Expr::flatten | ( | ) | const |
Flatten this list
Definition at line 712 of file SundanceExpr.cpp.
References Sundance::ListExpr::flatten(), and Playa::Handle< ExprBase >::ptr().
Referenced by Sundance::ListExpr::flatten(), Sundance::FunctionSupportResolver::flattenSpectral(), flattenSpectral(), Sundance::EquationSet::flattenSpectral(), Sundance::FunctionalEvaluator::FunctionalEvaluator(), Sundance::UserDefOp::getScalarArgs(), Sundance::EquationSet::init(), Sundance::SymbolicFuncElement::isIndependentOf(), Sundance::SymbolicFuncElement::isLinearForm(), Sundance::SymbPreprocessor::setupFwdProblem(), Sundance::SymbPreprocessor::setupSensitivities(), Sundance::SymbPreprocessor::setupVariations(), Sundance::LinearPDEConstrainedObj::solveStateAndAdjoint(), and Sundance::NonlinearPDEConstrainedObj::solveStateAndAdjoint().
| Expr Expr::flattenSpectral | ( | ) | const |
Flatten list and spectral structure
Definition at line 723 of file SundanceExpr.cpp.
References flatten(), and size().
Referenced by Sundance::LinearProblem::LinearProblem(), and Sundance::NLOp::NLOp().
| const FuncElementBase * Expr::funcElement | ( | ) | const |
Definition at line 992 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr().
| double Expr::getParameterValue | ( | ) | const |
Definition at line 857 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr(), and Sundance::Parameter::value().
| Sundance::Map< Expr, int > Expr::getSumTree | ( | ) | const |
Definition at line 206 of file SundanceExpr.cpp.
References Sundance::UnaryExpr::arg(), Playa::Handle< ExprBase >::ptr(), Sundance::Map< Key, Value, Compare >::put(), and toString().
Referenced by Sundance::ReorderSum::doTransform().
| void Expr::getTests | ( | Set< int > & | testID, |
| Array< Expr > & | tests | ||
| ) | const |
Find the test functions appearing in this expression
Definition at line 962 of file SundanceExpr.cpp.
References Sundance::Set< Key, Compare >::contains(), Sundance::FunctionIdentifier::dofID(), Sundance::FunctionWithID::fid(), Sundance::ScalarExpr::getTests(), Playa::Handle< ExprBase >::ptr(), Sundance::Set< Key, Compare >::put(), and scalarExpr().
| void Expr::getUnknowns | ( | Set< int > & | unkID, |
| Array< Expr > & | unks | ||
| ) | const |
Find the unknown functions appearing in this expression
Definition at line 938 of file SundanceExpr.cpp.
References Sundance::Set< Key, Compare >::contains(), Sundance::FunctionIdentifier::dofID(), Sundance::FunctionWithID::fid(), Sundance::ScalarExpr::getUnknowns(), Playa::Handle< ExprBase >::ptr(), Sundance::Set< Key, Compare >::put(), and scalarExpr().
| static Expr Sundance::Expr::handle | ( | const RCP< ExprBase > & | ptr | ) | [inline, static] |
Create a new handle for an existing ptr.
Definition at line 346 of file SundanceExpr.hpp.
References Expr().
Referenced by Sundance::FunctionalPolynomial::addPoly(), Sundance::ExprWithChildren::child(), Sundance::SymbolicTransformation::chooseSign(), Sundance::ReorderSum::doTransform(), Sundance::RemoveOneFromProduct::doTransform(), Sundance::RemoveUnaryMinusFromSum::doTransform(), Sundance::RemoveMinusOneFromProduct::doTransform(), Sundance::MoveConstantsToLeftOfProduct::doTransform(), Sundance::MoveConstantsToLeftOfSum::doTransform(), Sundance::MoveUnaryMinusOutsideProduct::doTransform(), Sundance::RearrangeRightSumWithConstant::doTransform(), Sundance::AssociateHungryDiffOpWithOperand::doTransform(), Sundance::RearrangeLeftSumWithConstant::doTransform(), Sundance::KillDiffOpOnConstant::doTransform(), Sundance::SumIntegrals::doTransform(), Sundance::BringConstantOutsideDiffOp::doTransform(), Sundance::DistributeSumOfDiffOps::doTransform(), Sundance::RearrangeRightProductWithConstant::doTransform(), Sundance::RearrangeLeftProductWithConstant::doTransform(), Sundance::ExprWithChildren::lessThan(), multiply(), Sundance::FunctionalPolynomial::multiplyPoly(), Sundance::FunctionalPolynomial::multiplyScalar(), sum(), and Sundance::FunctionalPolynomial::toXML().
| bool Expr::hasTestFunctions | ( | ) | const |
Indicate whether the expression contains test functions
Definition at line 905 of file SundanceExpr.cpp.
References Sundance::ScalarExpr::hasTestFunctions(), Playa::Handle< ExprBase >::ptr(), and scalarExpr().
Referenced by Sundance::SumOfIntegrals::hasTestFunctions(), and Sundance::SumOfIntegrals::integralHasTestFunctions().
| Expr Expr::imag | ( | ) | const |
Return imaginary part of a complex expression
Definition at line 804 of file SundanceExpr.cpp.
References Sundance::ComplexExpr::imag(), isComplex(), Playa::Handle< ExprBase >::ptr(), and size().
Referenced by conj(), Im(), operator-(), operator/(), and tryAddComplex().
| bool Expr::isComplex | ( | ) | const |
Definition at line 122 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr().
Referenced by Sundance::Complex(), conj(), imag(), operator-(), operator/(), real(), tryAddComplex(), and tryMultiplyComplex().
| bool Expr::isIndependentOf | ( | const Expr & | u | ) | const |
Indicate whether the expression is independent of the given functions
Definition at line 867 of file SundanceExpr.cpp.
References Sundance::ScalarExpr::isIndependentOf(), Playa::Handle< ExprBase >::ptr(), and scalarExpr().
Referenced by Sundance::SumOfIntegrals::isIndependentOf().
| bool Expr::isLinearForm | ( | const Expr & | u | ) | const |
Indicate whether the expression is linear in the given functions
Definition at line 876 of file SundanceExpr.cpp.
References Sundance::ScalarExpr::isLinearForm(), Playa::Handle< ExprBase >::ptr(), and scalarExpr().
Referenced by Sundance::SumOfIntegrals::isLinearForm().
| bool Expr::isLinearInTests | ( | ) | const |
Indicate whether the expression is nonlinear with respect to test functions
Definition at line 896 of file SundanceExpr.cpp.
References Sundance::ScalarExpr::isLinearInTests(), Playa::Handle< ExprBase >::ptr(), and scalarExpr().
Referenced by Sundance::SumOfIntegrals::isLinearInTests().
| bool Expr::isQuadraticForm | ( | const Expr & | u | ) | const |
Indicate whether the expression is quadratic in the given functions
Definition at line 886 of file SundanceExpr.cpp.
References Sundance::ScalarExpr::isQuadraticForm(), Playa::Handle< ExprBase >::ptr(), and scalarExpr().
Referenced by Sundance::SumOfIntegrals::isQuadraticForm().
| bool Expr::isSpectral | ( | ) | const |
Definition at line 129 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr().
Referenced by operator/().
| bool Expr::isTestElement | ( | ) | const |
Definition at line 922 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr().
| bool Expr::isUnknownElement | ( | ) | const |
Definition at line 930 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr().
| bool Expr::lessThan | ( | const Expr & | other | ) | const |
Comparison operator for ordering expr trees, DO NOT use for comparison of numerical values.
Definition at line 166 of file SundanceExpr.cpp.
References Sundance::ConstantExpr::lessThan(), Sundance::ScalarExpr::lessThan(), Playa::Handle< PointerType >::ptr(), Playa::Handle< ExprBase >::ptr(), and toString().
Referenced by Sundance::ReorderSum::doTransform(), Sundance::ExprWithChildren::lessThan(), operator<(), and sameAs().
| Expr Expr::multiply | ( | const Expr & | other | ) | const [private] |
Multiply two scalar expressions
Definition at line 486 of file SundanceExpr.cpp.
References Sundance::ObjectWithClassVerbosity< SymbolicTransformation >::classVerbosity(), handle(), Playa::Out::println(), Playa::Handle< PointerType >::ptr(), Playa::Handle< ExprBase >::ptr(), and toString().
Referenced by operator*().
Multiply two expressions. The operands must have list structures such that the product can be interpreted as a scalar-vector product or as an inner product between vectors or tensors. The multiplication operator is also used to represent the application of a differential operator.
Definition at line 396 of file SundanceExpr.cpp.
References multiply(), opTimer(), prodTimer(), size(), toString(), totalSize(), and tryMultiplyComplex().
Referenced by operator/().
Add two expressions. The operands must have identical list structures.
Definition at line 297 of file SundanceExpr.cpp.
References opTimer(), size(), sum(), sumTimer(), and tryAddComplex().
Subtract two expressions. The operands must have identical list structures.
Definition at line 327 of file SundanceExpr.cpp.
References opTimer(), size(), sum(), sumTimer(), and tryAddComplex().
| Expr Expr::operator- | ( | ) | const |
Unary minus operator
Definition at line 519 of file SundanceExpr.cpp.
References Sundance::UnaryExpr::arg(), imag(), isComplex(), opTimer(), real(), size(), unaryMinusTimer(), and Sundance::ConstantExpr::value().
Divide one expression by another. The right operand must be a scalar.
Definition at line 592 of file SundanceExpr.cpp.
References conj(), divide(), imag(), isComplex(), isSpectral(), opTimer(), real(), size(), and toString().
| Expr Sundance::Expr::operator/ | ( | const double & | other | ) | const [inline] |
Divide an expression by a double.
Definition at line 237 of file SundanceExpr.hpp.
References operator*().
| Expr Sundance::Expr::operator/ | ( | const std::complex< double > & | other | ) | const [inline] |
Divide an expression by a complex.
Definition at line 241 of file SundanceExpr.hpp.
References operator*().
| bool Expr::operator< | ( | const Expr & | other | ) | const |
Comparison operator for ordering expr trees, DO NOT use for comparison of numerical values.
Definition at line 161 of file SundanceExpr.cpp.
References lessThan().
| const Expr & Expr::operator[] | ( | int | i | ) | const |
List element accessor
Definition at line 651 of file SundanceExpr.cpp.
References Sundance::ListExpr::element(), Playa::Handle< PointerType >::ptr(), Playa::Handle< ExprBase >::ptr(), size(), and toString().
| static Time& Sundance::Expr::opTimer | ( | ) | [inline, static] |
Definition at line 350 of file SundanceExpr.hpp.
Referenced by operator*(), operator+(), operator-(), and operator/().
| static Time& Sundance::Expr::outputTimer | ( | ) | [inline, static] |
Definition at line 357 of file SundanceExpr.hpp.
Referenced by toString(), and toXML().
| Expr Expr::real | ( | ) | const |
Return real part of a complex expression
Definition at line 782 of file SundanceExpr.cpp.
References isComplex(), Playa::Handle< ExprBase >::ptr(), Sundance::ComplexExpr::real(), and size().
Referenced by conj(), operator-(), operator/(), Re(), and tryAddComplex().
| bool Expr::sameAs | ( | const Expr & | other | ) | const |
Equality test operator for ordering expr trees, DO NOT use for comparison of numerical values.
Definition at line 154 of file SundanceExpr.cpp.
References lessThan().
Referenced by tryMultiplyComplex().
| const ScalarExpr * Expr::scalarExpr | ( | ) | const |
Definition at line 985 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr().
Referenced by everyTermHasTestFunctions(), getTests(), getUnknowns(), hasTestFunctions(), isIndependentOf(), isLinearForm(), isLinearInTests(), and isQuadraticForm().
| void Expr::setParameterValue | ( | const double & | value | ) |
Definition at line 848 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr(), and Sundance::Parameter::setValue().
Referenced by main(), and Sundance::TransientStepProblem::step().
| static bool& Sundance::Expr::showAllParens | ( | ) | [inline, static] |
Show parentheses around every pair of operands
Definition at line 343 of file SundanceExpr.hpp.
Referenced by Sundance::BinaryExpr::toText().
| int Expr::size | ( | ) | const |
Number of elements in top level of list
Definition at line 756 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr(), and Sundance::ListExpr::size().
Referenced by Sundance::DefaultIterCallback::call(), Sundance::Complex(), Sundance::L2NormCalculator::computeNorms(), Sundance::NLOp::computeSensitivities(), conj(), Sundance::copyDiscreteFunction(), Sundance::cross(), Sundance::curl(), Sundance::describeFunction(), Sundance::div(), Sundance::EquationSet::EquationSet(), Sundance::ExprFieldWrapper::ExprFieldWrapper(), Sundance::ListExpr::flatten(), Sundance::FunctionSupportResolver::flattenSpectral(), flattenSpectral(), Sundance::EquationSet::flattenSpectral(), Sundance::FunctionSupportResolver::FunctionSupportResolver(), Sundance::getDiscreteFunctionMesh(), Sundance::getDiscreteFunctionVector(), Sundance::getDiscreteSpace(), Sundance::EvaluatableExpr::getEvalExpr(), Sundance::UserDefOp::getScalarArgs(), imag(), Sundance::L2Projector::init(), Sundance::SymbolicFuncElement::isIndependentOf(), Sundance::SymbolicFuncElement::isLinearForm(), Sundance::isSquareMatrix(), Sundance::isVector(), Sundance::ListExpr::join(), Sundance::LinearProblem::LinearProblem(), Sundance::Functional::linearVariationalProb(), Sundance::makeZeros(), Sundance::NitscheStokesNoSlipBC(), Sundance::FunctionSupportResolver::numFixedParams(), Sundance::FunctionSupportResolver::numUnkParams(), operator*(), operator+(), operator-(), operator/(), operator[](), Sundance::SymbPreprocessor::processInputFuncs(), Sundance::SymbPreprocessor::processInputParams(), real(), Sundance::setDiscreteFunctionVector(), Sundance::SymbPreprocessor::setupFwdProblem(), Sundance::SymbPreprocessor::setupSensitivities(), Sundance::LinearPDEConstrainedObj::solveStateAndAdjoint(), Sundance::NonlinearPDEConstrainedObj::solveStateAndAdjoint(), tryAddComplex(), tryMultiplyComplex(), Sundance::CToAInterpolator::updateField(), Sundance::DoublingStepController::write(), and Sundance::LinearSolveDriver::writeIntoSolutionExpr().
Add two scalar expressions
Definition at line 358 of file SundanceExpr.cpp.
References Sundance::ObjectWithClassVerbosity< SymbolicTransformation >::classVerbosity(), handle(), Playa::Out::println(), Playa::Handle< PointerType >::ptr(), Playa::Handle< ExprBase >::ptr(), and toString().
Referenced by operator+(), and operator-().
| string Expr::toString | ( | ) | const |
Definition at line 144 of file SundanceExpr.cpp.
References outputTimer(), and Playa::Handle< ExprBase >::ptr().
Referenced by Sundance::SymbolicTransformation::chooseSign(), Sundance::NLOp::computeSensitivities(), Sundance::RearrangeRightSumWithConstant::doTransform(), Sundance::RearrangeLeftSumWithConstant::doTransform(), Sundance::RearrangeRightProductWithConstant::doTransform(), Sundance::RearrangeLeftProductWithConstant::doTransform(), getSumTree(), lessThan(), multiply(), operator*(), operator/(), operator[](), Sundance::SymbPreprocessor::processInputFuncs(), Sundance::SymbPreprocessor::processInputParams(), Sundance::SymbPreprocessor::setupVariations(), sum(), Sundance::UnaryMinus::toText(), Sundance::SumOfBCs::toText(), Sundance::NonlinearUnaryOp::toText(), Sundance::UserDefOpElement::toText(), Sundance::DiffOp::toText(), and Sundance::SumOfIntegrals::toText().
| int Expr::totalSize | ( | ) | const |
Total number of elements in list.
Definition at line 769 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr(), and Sundance::ListExpr::totalSize().
Referenced by Sundance::Complex(), Sundance::isSquareMatrix(), Sundance::isVector(), and operator*().
| XMLObject Expr::toXML | ( | ) | const |
Definition at line 137 of file SundanceExpr.cpp.
References outputTimer(), and Playa::Handle< ExprBase >::ptr().
Referenced by Sundance::SumOfBCs::toXML(), Sundance::FunctionalPolynomial::toXML(), and Sundance::SumOfIntegrals::toXML().
| bool Expr::tryAddComplex | ( | const Expr & | L, |
| const Expr & | R, | ||
| int | sign, | ||
| Expr & | rtn | ||
| ) | const [private] |
Try transformations of complex addition
Definition at line 235 of file SundanceExpr.cpp.
References imag(), isComplex(), real(), size(), and trySumComplexTimer().
Referenced by operator+(), and operator-().
| bool Expr::tryMultiplyComplex | ( | const Expr & | L, |
| const Expr & | R, | ||
| Expr & | rtn | ||
| ) | const [private] |
Try transformations of complex multiplication
Definition at line 265 of file SundanceExpr.cpp.
References Im(), isComplex(), Re(), sameAs(), size(), and tryMultiplyComplexTimer().
Referenced by operator*().
| Expr colonProduct | ( | const Expr & | A, |
| const Expr & | B | ||
| ) | [related] |
Compute the colon (Frobenius) product of two matrices. The result is a scalar.
Definition at line 102 of file SundanceVectorCalculus.cpp.
Definition at line 1006 of file SundanceExpr.cpp.
Definition at line 460 of file SundanceExpr.hpp.
References conj().
Definition at line 72 of file SundanceVectorCalculus.cpp.
Definition at line 95 of file SundanceVectorCalculus.cpp.
Definition at line 60 of file SundanceVectorCalculus.cpp.
| Expr EssentialBC | ( | const Handle< CellFilterStub > & | domain, |
| const Expr & | integrand, | ||
| const WatchFlag & | watch = WatchFlag() |
||
| ) | [related] |
Referenced by main().
| Expr EssentialBC | ( | const Handle< CellFilterStub > & | domain, |
| const Expr & | integrand, | ||
| const Handle< QuadratureFamilyStub > & | quad, | ||
| const WatchFlag & | watch = WatchFlag() |
||
| ) | [related] |
| Expr EssentialBC | ( | const Handle< CellFilterStub > & | domain, |
| const Expr & | integrand, | ||
| const Handle< QuadratureFamilyStub > & | quad, | ||
| const ParametrizedCurve & | curve, | ||
| const WatchFlag & | watch = WatchFlag() |
||
| ) | [related] |
| Expr FunctionalDerivative | ( | const Expr & | F, |
| const Expr & | u | ||
| ) | [related] |
Returns an expression that evaluates the functional derivative
The functional derivatives are evaluated internally using automatic differentiation.
Because functional derivatives required for linearization and optimization are already done internally, it is unusual for explicit functional derivatives to be needed at the user level. One case where they are needed is in SUPG stabilization of conservation laws.
| F | any evaluatable expression, possibly list-valued |
| u | an unknown function or list of unknown functions |
Definition at line 50 of file SundanceVectorCalculus.cpp.
Referenced by main().
Definition at line 457 of file SundanceExpr.hpp.
References imag().
Referenced by tryMultiplyComplex().
| bool isSquareMatrix | ( | const Expr & | x, |
| int & | N | ||
| ) | [related] |
Indicate whether the given expression is a square matrix. If so, return by reference argument the size of the matrix.
A scalar is a 1 by 1 matrix.
Definition at line 164 of file SundanceVectorCalculus.cpp.
Indicate whether the given expression is a vector. If so, return by reference argument the size of the vector.
A scalar is a vector of dimension 1.
Definition at line 149 of file SundanceVectorCalculus.cpp.
Definition at line 1054 of file SundanceExpr.cpp.
Referenced by main().
Definition at line 1059 of file SundanceExpr.cpp.
Definition at line 1064 of file SundanceExpr.cpp.
Definition at line 1069 of file SundanceExpr.cpp.
| Expr List | ( | const Expr & | a, |
| const Expr & | b, | ||
| const Expr & | c, | ||
| const Expr & | d, | ||
| const Expr & | e | ||
| ) | [related] |
Definition at line 1075 of file SundanceExpr.cpp.
| Expr List | ( | const Expr & | a, |
| const Expr & | b, | ||
| const Expr & | c, | ||
| const Expr & | d, | ||
| const Expr & | e, | ||
| const Expr & | f | ||
| ) | [related] |
Definition at line 1081 of file SundanceExpr.cpp.
| Expr List | ( | const Expr & | a, |
| const Expr & | b, | ||
| const Expr & | c, | ||
| const Expr & | d, | ||
| const Expr & | e, | ||
| const Expr & | f, | ||
| const Expr & | g | ||
| ) | [related] |
Definition at line 1087 of file SundanceExpr.cpp.
| Expr List | ( | const Expr & | a, |
| const Expr & | b, | ||
| const Expr & | c, | ||
| const Expr & | d, | ||
| const Expr & | e, | ||
| const Expr & | f, | ||
| const Expr & | g, | ||
| const Expr & | h | ||
| ) | [related] |
Definition at line 1094 of file SundanceExpr.cpp.
| Expr List | ( | const Expr & | a, |
| const Expr & | b, | ||
| const Expr & | c, | ||
| const Expr & | d, | ||
| const Expr & | e, | ||
| const Expr & | f, | ||
| const Expr & | g, | ||
| const Expr & | h, | ||
| const Expr & | i | ||
| ) | [related] |
| Expr List | ( | const Expr & | a, |
| const Expr & | b, | ||
| const Expr & | c, | ||
| const Expr & | d, | ||
| const Expr & | e, | ||
| const Expr & | f, | ||
| const Expr & | g, | ||
| const Expr & | h, | ||
| const Expr & | i, | ||
| const Expr & | j | ||
| ) | [related] |
Definition at line 430 of file SundanceExpr.hpp.
Definition at line 446 of file SundanceExpr.hpp.
Definition at line 422 of file SundanceExpr.hpp.
Definition at line 438 of file SundanceExpr.hpp.
Definition at line 426 of file SundanceExpr.hpp.
Definition at line 442 of file SundanceExpr.hpp.
Definition at line 434 of file SundanceExpr.hpp.
Definition at line 450 of file SundanceExpr.hpp.
| std::ostream & operator<< | ( | std::ostream & | os, |
| const Expr & | e | ||
| ) | [related] |
Definition at line 415 of file SundanceExpr.hpp.
References Playa::Handle< PointerType >::ptr().
| Expr outerProduct | ( | const Expr & | a, |
| const Expr & | b | ||
| ) | [related] |
Compute the outer (Kronecker) product of two vectors. The result is a dim(a) by dim(b) rectangular matrix.
Definition at line 127 of file SundanceVectorCalculus.cpp.
Definition at line 454 of file SundanceExpr.hpp.
References real().
Referenced by tryMultiplyComplex().
| Expr reciprocal | ( | const Expr & | arg | ) | [related] |
"reciprocal function"