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) |
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
Expr sum = x + y;
Expr diff = x - y;
Expr product = x * y;
Expr quotient = x / y;
The user-level expression subtypes are listed below, along with examples of their use.
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:
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:
Definition at line 195 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 199 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 199 of file SundanceExpr.hpp.
Expr::Expr | ( | const double & | c | ) |
Construct with a constant. Creates a ConstantExpr.
Definition at line 102 of file SundanceExpr.cpp.
Expr::Expr | ( | const std::complex< double > & | c | ) |
Construct with a complex constant. Creates a ComplexExpr.
Definition at line 106 of file SundanceExpr.cpp.
void Expr::append | ( | const Expr & | expr | ) |
Append a new element to this list
Definition at line 674 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 816 of file SundanceExpr.cpp.
References imag(), isComplex(), real(), and size().
Referenced by conj(), and operator/().
Divide two scalar expressions
Definition at line 468 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 327 of file SundanceExpr.hpp.
bool Expr::everyTermHasTestFunctions | ( | ) | const |
Indicate whether every term in the expression contains test functions
Definition at line 903 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 701 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(), and Sundance::SymbPreprocessor::setupVariations().
Expr Expr::flattenSpectral | ( | ) | const |
Flatten list and spectral structure
Definition at line 712 of file SundanceExpr.cpp.
References flatten(), and size().
Referenced by Sundance::LinearProblem::LinearProblem(), and Sundance::NLOp::NLOp().
const FuncElementBase * Expr::funcElement | ( | ) | const |
double Expr::getParameterValue | ( | ) | const |
Definition at line 846 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr(), and Sundance::Parameter::value().
Sundance::Map< Expr, int > Expr::getSumTree | ( | ) | const |
Definition at line 195 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().
Find the test functions appearing in this expression
Definition at line 951 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().
Find the unknown functions appearing in this expression
Definition at line 927 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().
Create a new handle for an existing ptr.
Definition at line 335 of file SundanceExpr.hpp.
References Expr().
Referenced by Sundance::FunctionalPolynomial::addPoly(), Sundance::ExprWithChildren::child(), Sundance::SymbolicTransformation::chooseSign(), Sundance::SumIntegrals::doTransform(), Sundance::RearrangeLeftSumWithConstant::doTransform(), Sundance::RearrangeRightSumWithConstant::doTransform(), Sundance::RemoveUnaryMinusFromSum::doTransform(), Sundance::MoveConstantsToLeftOfSum::doTransform(), Sundance::ReorderSum::doTransform(), Sundance::RearrangeLeftProductWithConstant::doTransform(), Sundance::RearrangeRightProductWithConstant::doTransform(), Sundance::DistributeSumOfDiffOps::doTransform(), Sundance::BringConstantOutsideDiffOp::doTransform(), Sundance::KillDiffOpOnConstant::doTransform(), Sundance::AssociateHungryDiffOpWithOperand::doTransform(), Sundance::MoveUnaryMinusOutsideProduct::doTransform(), Sundance::MoveConstantsToLeftOfProduct::doTransform(), Sundance::RemoveMinusOneFromProduct::doTransform(), Sundance::RemoveOneFromProduct::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 894 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 793 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 111 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 856 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 865 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 885 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 875 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 118 of file SundanceExpr.cpp.
References Playa::Handle< ExprBase >::ptr().
Referenced by operator/().
bool Expr::isTestElement | ( | ) | const |
bool Expr::isUnknownElement | ( | ) | const |
bool Expr::lessThan | ( | const Expr & | other | ) | const |
Comparison operator for ordering expr trees, DO NOT use for comparison of numerical values.
Definition at line 155 of file SundanceExpr.cpp.
References Playa::Handle< PointerType >::ptr(), Playa::Handle< ExprBase >::ptr(), and toString().
Referenced by Sundance::ReorderSum::doTransform(), Sundance::ExprWithChildren::lessThan(), operator<(), and sameAs().
Multiply two scalar expressions
Definition at line 475 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 385 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 286 of file SundanceExpr.cpp.
References opTimer(), size(), sum(), sumTimer(), and tryAddComplex().
Expr Expr::operator- | ( | ) | const |
Unary minus operator
Definition at line 508 of file SundanceExpr.cpp.
References Sundance::UnaryExpr::arg(), imag(), isComplex(), opTimer(), real(), size(), unaryMinusTimer(), and Sundance::ConstantExpr::value().
Subtract two expressions. The operands must have identical list structures.
Definition at line 316 of file SundanceExpr.cpp.
References opTimer(), size(), sum(), sumTimer(), and tryAddComplex().
Expr Sundance::Expr::operator/ | ( | const std::complex< double > & | other | ) | const [inline] |
Divide an expression by a complex.
Definition at line 230 of file SundanceExpr.hpp.
References operator*().
Expr Sundance::Expr::operator/ | ( | const double & | other | ) | const [inline] |
Divide an expression by a double.
Definition at line 226 of file SundanceExpr.hpp.
References operator*().
Divide one expression by another. The right operand must be a scalar.
Definition at line 581 of file SundanceExpr.cpp.
References conj(), divide(), imag(), isComplex(), isSpectral(), opTimer(), real(), size(), and toString().
bool Expr::operator< | ( | const Expr & | other | ) | const |
Comparison operator for ordering expr trees, DO NOT use for comparison of numerical values.
Definition at line 150 of file SundanceExpr.cpp.
References lessThan().
const Expr & Expr::operator[] | ( | int | i | ) | const |
List element accessor
Definition at line 640 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 339 of file SundanceExpr.hpp.
Referenced by operator*(), operator+(), operator-(), and operator/().
static Time& Sundance::Expr::outputTimer | ( | ) | [inline, static] |
Expr Expr::real | ( | ) | const |
Return real part of a complex expression
Definition at line 771 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 143 of file SundanceExpr.cpp.
References lessThan().
Referenced by tryMultiplyComplex().
const ScalarExpr * Expr::scalarExpr | ( | ) | const |
Definition at line 974 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 837 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 332 of file SundanceExpr.hpp.
Referenced by Sundance::BinaryExpr::toText().
int Expr::size | ( | ) | const |
Number of elements in top level of list
Definition at line 745 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::NonlinearPDEConstrainedObj::solveStateAndAdjoint(), Sundance::LinearPDEConstrainedObj::solveStateAndAdjoint(), tryAddComplex(), tryMultiplyComplex(), Sundance::CToAInterpolator::updateField(), Sundance::DoublingStepController::write(), and Sundance::LinearSolveDriver::writeIntoSolutionExpr().
Add two scalar expressions
Definition at line 347 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 133 of file SundanceExpr.cpp.
References outputTimer(), and Playa::Handle< ExprBase >::ptr().
Referenced by Sundance::SymbolicTransformation::chooseSign(), Sundance::NLOp::computeSensitivities(), Sundance::RearrangeLeftSumWithConstant::doTransform(), Sundance::RearrangeRightSumWithConstant::doTransform(), Sundance::RearrangeLeftProductWithConstant::doTransform(), Sundance::RearrangeRightProductWithConstant::doTransform(), getSumTree(), lessThan(), multiply(), operator*(), operator/(), operator[](), Sundance::SymbPreprocessor::processInputFuncs(), Sundance::SymbPreprocessor::processInputParams(), Sundance::SymbPreprocessor::setupVariations(), sum(), Sundance::UserDefOpElement::toText(), Sundance::UnaryMinus::toText(), Sundance::SumOfIntegrals::toText(), Sundance::SumOfBCs::toText(), Sundance::NonlinearUnaryOp::toText(), and Sundance::DiffOp::toText().
int Expr::totalSize | ( | ) | const |
Total number of elements in list.
Definition at line 758 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 126 of file SundanceExpr.cpp.
References outputTimer(), and Playa::Handle< ExprBase >::ptr().
Referenced by Sundance::SumOfIntegrals::toXML(), Sundance::SumOfBCs::toXML(), and Sundance::FunctionalPolynomial::toXML().
Try transformations of complex addition
Definition at line 224 of file SundanceExpr.cpp.
References imag(), isComplex(), real(), size(), and trySumComplexTimer().
Referenced by operator+(), and operator-().
Try transformations of complex multiplication
Definition at line 254 of file SundanceExpr.cpp.
References Im(), isComplex(), Re(), sameAs(), size(), and tryMultiplyComplexTimer().
Referenced by operator*().
Compute the colon (Frobenius) product of two matrices. The result is a scalar.
Definition at line 91 of file SundanceVectorCalculus.cpp.
Definition at line 995 of file SundanceExpr.cpp.
Definition at line 61 of file SundanceVectorCalculus.cpp.
Definition at line 84 of file SundanceVectorCalculus.cpp.
Definition at line 49 of file SundanceVectorCalculus.cpp.
Expr EssentialBC | ( | const Handle< CellFilterStub > & | domain, | |
const Expr & | integrand, | |||
const Handle< QuadratureFamilyStub > & | quad, | |||
const ParametrizedCurve & | curve, | |||
const WatchFlag & | watch = WatchFlag() | |||
) | [related] |
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 WatchFlag & | watch = WatchFlag() | |||
) | [related] |
Referenced by main().
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 |
Expr gradient | ( | int | dim | ) | [related] |
Definition at line 446 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 153 of file SundanceVectorCalculus.cpp.
bool isVector | ( | const Expr & | x, | |
int & | N | |||
) | [related] |
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 138 of file SundanceVectorCalculus.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, | |||
const Expr & | j | |||
) | [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 | |||
) | [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 | |||
) | [related] |
Definition at line 1083 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 1076 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 1070 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 1064 of file SundanceExpr.cpp.
Definition at line 1058 of file SundanceExpr.cpp.
Definition at line 1053 of file SundanceExpr.cpp.
Definition at line 1048 of file SundanceExpr.cpp.
Definition at line 435 of file SundanceExpr.hpp.
Definition at line 419 of file SundanceExpr.hpp.
Definition at line 427 of file SundanceExpr.hpp.
Definition at line 411 of file SundanceExpr.hpp.
Definition at line 431 of file SundanceExpr.hpp.
Definition at line 415 of file SundanceExpr.hpp.
Definition at line 439 of file SundanceExpr.hpp.
Definition at line 423 of file SundanceExpr.hpp.
std::ostream & operator<< | ( | std::ostream & | os, | |
const Expr & | e | |||
) | [related] |
Compute the outer (Kronecker) product of two vectors. The result is a dim(a) by dim(b) rectangular matrix.
Definition at line 116 of file SundanceVectorCalculus.cpp.
Definition at line 443 of file SundanceExpr.hpp.
References real().
Referenced by tryMultiplyComplex().