https://mooseframework.inl.gov
Classes | Typedefs | Enumerations | Functions | Variables
CompileTimeDerivatives Namespace Reference

Classes

class  CTAdd
 Addition operator node. More...
 
class  CTArrayRef
 Array variable value, referencing an entry in an indexable container of T types. More...
 
class  CTBase
 All compile time derivative system objects derive from this (empty) base class. More...
 
class  CTBinary
 Base class for a binary operator/function. More...
 
class  CTCompare
 Binary comparison operator node. More...
 
class  CTConditional
 Base class for a ternary functions. More...
 
class  CTDiv
 Division operator node. More...
 
class  CTIPow
 Integer exponent power operator. More...
 
class  CTMatrix
 
class  CTMul
 Multiplication operator node. More...
 
class  CTNull
 Template class to represent a "zero" value. More...
 
class  CTNullBase
 
class  CTOne
 Template class to represent a "one" value. More...
 
class  CTOneBase
 
class  CTPow
 Power operator where both base and exponent can be arbitrary operators. More...
 
class  CTRef
 Variable value, referencing a variable of type T. More...
 
class  CTStandardDeviation
 
class  CTSub
 Subtraction operator node. More...
 
struct  CTSuperType
 
struct  CTSuperType< T >
 
struct  CTSuperType< T1, T2, Ts... >
 
class  CTUnary
 Base class for a unary operator/function. More...
 
class  CTUnaryMinus
 Unary minus. More...
 
class  CTValue
 Constant value. More...
 

Typedefs

template<typename T >
using CTCleanType = typename std::remove_const< typename std::remove_reference< T >::type >::type
 
using CTTag = int
 Operators representing variable values need to be tagged. More...
 
template<typename L , typename R >
using CTCompareLess = CTCompare< CTComparisonEnum::Less, L, R >
 template aliases for the comparison operator nodes More...
 
template<typename L , typename R >
using CTCompareLessEqual = CTCompare< CTComparisonEnum::LessEqual, L, R >
 
template<typename L , typename R >
using CTCompareGreater = CTCompare< CTComparisonEnum::Greater, L, R >
 
template<typename L , typename R >
using CTCompareGreaterEqual = CTCompare< CTComparisonEnum::GreaterEqual, L, R >
 
template<typename L , typename R >
using CTCompareEqual = CTCompare< CTComparisonEnum::Equal, L, R >
 
template<typename L , typename R >
using CTCompareUnequal = CTCompare< CTComparisonEnum::Unequal, L, R >
 

Enumerations

enum  CTComparisonEnum {
  CTComparisonEnum::Less, CTComparisonEnum::LessEqual, CTComparisonEnum::Greater, CTComparisonEnum::GreaterEqual,
  CTComparisonEnum::Equal, CTComparisonEnum::Unequal
}
 

Functions

template<CTTag tag>
std::string printTag ()
 
template<typename B , typename E >
auto pow (const B &base, const E &exp)
 pow(base, exponent) function overload. More...
 
template<int E, typename B >
auto pow (const B &base)
 pow<exponent>(base) template for integer powers. More...
 
template<typename T >
auto exp (const T &)
 
template<typename T >
auto log (const T &)
 
template<typename T , class = std::enable_if_t<std::is_base_of<CTBase, T>::value>>
auto operator- (const T &arg)
 
template<typename C , typename L , typename R >
auto conditional (const C &, const L &, const R &)
 
template<typename L , typename R >
auto min (const L &left, const R &right)
 
template<typename L , typename R >
auto max (const L &left, const R &right)
 
template<CTTag tag = CTNoTag, typename T >
auto makeValue (T value)
 Helper function to build a (potentially tagged) value. More...
 
template<CTTag start_tag, typename... Values, CTTag... Tags>
auto makeValuesHelper (const std::tuple< Values... > &values, std::integer_sequence< CTTag, Tags... >)
 
template<CTTag start_tag = CTNoTag, typename... Ts>
auto makeValues (Ts... values)
 Helper function to build a list of (potentially tagged) values. More...
 
template<CTTag tag = CTNoTag, typename T >
auto makeRef (const T &ref)
 Helper function to build a tagged reference to a variable. More...
 
template<CTTag start_tag, typename... Refs, CTTag... Tags>
auto makeRefsHelper (const std::tuple< Refs... > &refs, std::integer_sequence< CTTag, Tags... >)
 
template<CTTag start_tag = CTNoTag, typename... Ts>
auto makeRefs (const Ts &... refs)
 Helper function to build a list of tagged references to variables. More...
 
template<CTTag tag = CTNoTag, typename T , typename I >
auto makeRef (const T &ref, const I &idx)
 Helper function to build a tagged reference to a vector/array entry. More...
 
 CT_OPERATOR_BINARY (+, CTAdd) CT_OPERATOR_BINARY(-
 
CTSub CT_OPERATOR_BINARY CTMul CT_OPERATOR_BINARY (/, CTDiv) CT_OPERATOR_BINARY(<
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CT_OPERATOR_BINARY (<=, CTCompareLessEqual) CT_OPERATOR_BINARY(>
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CT_OPERATOR_BINARY (>=, CTCompareGreaterEqual) CT_OPERATOR_BINARY(
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual CT_OPERATOR_BINARY (!=, CTCompareUnequal) CT_SIMPLE_UNARY_FUNCTION(exp
 Macro for implementing a simple unary function overload. More...
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual exp (_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(log
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template D< dtag > ()/_arg) CT_SIMPLE_UNARY_FUNCTION(sin
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template cos (_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(cos
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sin (_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tan
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template pow< 2 > (tan(_arg))+1.0) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(sqrt
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt (_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template pow< 2 > (tanh(_arg))) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(sinh
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template cosh (_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(cosh
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template sinh (_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(erf
 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * exp (-pow< 2 >(_arg))/sqrt(libMesh
 Macro for implementing a simple binary function overload. More...
 
 CT_SIMPLE_BINARY_FUNCTION_CLASS (atan2,(-_left *_right.template D< dtag >()+_left.template D< dtag >() *_right)/(pow< 2 >(_left)+pow< 2 >(_right))) CT_SIMPLE_BINARY_FUNCTION_FUNC(atan2) template< typename T
 
template<CTTag start_tag, typename T , CTTag... Tags>
auto makeStandardDeviationHelper (const T &f, std::integer_sequence< CTTag, Tags... >)
 
template<CTTag start_tag, typename T , int N>
auto makeStandardDeviation (const T &f, const CTMatrix< Real, N, N > covariance)
 Helper function to build a standard deviation object for a function with N parameters with consecutive tags starting at start_tag, and an NxN covariance matrix for said parameters. More...
 

Variables

constexpr CTTag CTNoTag = std::numeric_limits<CTTag>::max()
 
int N
 

Typedef Documentation

◆ CTCleanType

template<typename T >
using CompileTimeDerivatives::CTCleanType = typedef typename std::remove_const<typename std::remove_reference<T>::type>::type

Definition at line 41 of file CompileTimeDerivatives.h.

◆ CTCompareEqual

template<typename L , typename R >
using CompileTimeDerivatives::CTCompareEqual = typedef CTCompare<CTComparisonEnum::Equal, L, R>

Definition at line 659 of file CompileTimeDerivatives.h.

◆ CTCompareGreater

template<typename L , typename R >
using CompileTimeDerivatives::CTCompareGreater = typedef CTCompare<CTComparisonEnum::Greater, L, R>

Definition at line 655 of file CompileTimeDerivatives.h.

◆ CTCompareGreaterEqual

template<typename L , typename R >
using CompileTimeDerivatives::CTCompareGreaterEqual = typedef CTCompare<CTComparisonEnum::GreaterEqual, L, R>

Definition at line 657 of file CompileTimeDerivatives.h.

◆ CTCompareLess

template<typename L , typename R >
using CompileTimeDerivatives::CTCompareLess = typedef CTCompare<CTComparisonEnum::Less, L, R>

template aliases for the comparison operator nodes

Definition at line 651 of file CompileTimeDerivatives.h.

◆ CTCompareLessEqual

template<typename L , typename R >
using CompileTimeDerivatives::CTCompareLessEqual = typedef CTCompare<CTComparisonEnum::LessEqual, L, R>

Definition at line 653 of file CompileTimeDerivatives.h.

◆ CTCompareUnequal

template<typename L , typename R >
using CompileTimeDerivatives::CTCompareUnequal = typedef CTCompare<CTComparisonEnum::Unequal, L, R>

Definition at line 661 of file CompileTimeDerivatives.h.

◆ CTTag

Operators representing variable values need to be tagged.

The tag identifies the object when a compile time derivative is taken. We use a type that can be supplied as a template argument. int does the trick.

Definition at line 66 of file CompileTimeDerivatives.h.

Enumeration Type Documentation

◆ CTComparisonEnum

Function Documentation

◆ conditional()

template<typename C , typename L , typename R >
auto CompileTimeDerivatives::conditional ( const C &  condition,
const L &  left,
const R &  right 
)

Definition at line 262 of file CompileTimeDerivatives.h.

Referenced by CompileTimeDerivatives::CTConditional< C, L, R >::D().

263 {
264  return CTConditional<C, L, R>(condition, left, right);
265 }

◆ cos()

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template CompileTimeDerivatives::cos ( _arg  )

◆ cosh()

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template CompileTimeDerivatives::cosh ( _arg  )

◆ CT_OPERATOR_BINARY() [1/5]

CompileTimeDerivatives::CT_OPERATOR_BINARY ( ,
CTAdd   
)

◆ CT_OPERATOR_BINARY() [2/5]

CTSub CT_OPERATOR_BINARY CTMul CompileTimeDerivatives::CT_OPERATOR_BINARY ( ,
CTDiv   
)

◆ CT_OPERATOR_BINARY() [3/5]

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CompileTimeDerivatives::CT_OPERATOR_BINARY ( <=  ,
CTCompareLessEqual   
)

◆ CT_OPERATOR_BINARY() [4/5]

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CompileTimeDerivatives::CT_OPERATOR_BINARY ( >=  ,
CTCompareGreaterEqual   
)

◆ CT_OPERATOR_BINARY() [5/5]

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual CompileTimeDerivatives::CT_OPERATOR_BINARY ( ,
CTCompareUnequal   
)

Macro for implementing a simple unary function overload.

No function specific optimizations are possible. The parameters are the function name and the expression that returns the derivative of the function.

◆ CT_SIMPLE_BINARY_FUNCTION_CLASS()

CompileTimeDerivatives::CT_SIMPLE_BINARY_FUNCTION_CLASS ( atan2  ,
(-_left *_right.template D< dtag >()+ _left.template D< dtag >() *_right)/(pow< 2 >(_left)+pow< 2 >(_right))   
)

◆ D< dtag >()

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template CompileTimeDerivatives::D< dtag > ( )

◆ exp() [1/3]

template<typename T >
auto CompileTimeDerivatives::exp ( const T &  )

◆ exp() [2/3]

◆ exp() [3/3]

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * CompileTimeDerivatives::exp ( -pow< 2 >  _arg)

Macro for implementing a simple binary function overload.

No function specific optimizations are possible. The parameters are the function name and the expression that returns the derivative of the function.

Definition at line 861 of file CompileTimeDerivatives.h.

871  : public CTBinary<L, R> \
872  { \
873  public: \
874  CTF##name(L left, R right) : CTBinary<L, R>(left, right) {} \
875  auto operator()() const { return std::name(_left(), _right()); } \
876  template <CTTag dtag> \
877  auto D() const \
878  { \
879  return derivative; \
880  } \
881  std::string print() const { return #name "(" + _left.print() + ", " + _right.print() + ")"; } \
882  constexpr static int precedence() { return 2; } \
883  using typename CTBinary<L, R>::ResultType; \
884  using CTBinary<L, R>::_left; \
885  using CTBinary<L, R>::_right; \
886  };
std::string name(const ElemQuality q)

◆ log()

template<typename T >
auto CompileTimeDerivatives::log ( const T &  )

◆ makeRef() [1/2]

template<CTTag tag = CTNoTag, typename T >
auto CompileTimeDerivatives::makeRef ( const T &  ref)

Helper function to build a tagged reference to a variable.

Definition at line 367 of file CompileTimeDerivatives.h.

368 {
369  return CTRef<tag, T>(ref);
370 }

◆ makeRef() [2/2]

template<CTTag tag = CTNoTag, typename T , typename I >
auto CompileTimeDerivatives::makeRef ( const T &  ref,
const I &  idx 
)

Helper function to build a tagged reference to a vector/array entry.

Definition at line 430 of file CompileTimeDerivatives.h.

431 {
432  return CTArrayRef<tag, T, I>(ref, idx);
433 }
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)

◆ makeRefs()

template<CTTag start_tag = CTNoTag, typename... Ts>
auto CompileTimeDerivatives::makeRefs ( const Ts &...  refs)

Helper function to build a list of tagged references to variables.

Definition at line 387 of file CompileTimeDerivatives.h.

388 {
389  return makeRefsHelper<start_tag>(std::tie(refs...),
390  std::make_integer_sequence<CTTag, sizeof...(refs)>{});
391 }
int CTTag
Operators representing variable values need to be tagged.

◆ makeRefsHelper()

template<CTTag start_tag, typename... Refs, CTTag... Tags>
auto CompileTimeDerivatives::makeRefsHelper ( const std::tuple< Refs... > &  refs,
std::integer_sequence< CTTag, Tags... >   
)

Definition at line 374 of file CompileTimeDerivatives.h.

375 {
376  if constexpr (start_tag == CTNoTag)
377  return std::make_tuple(CTRef<CTNoTag, Refs>(std::get<Tags>(refs))...);
378  else
379  return std::make_tuple(CTRef<Tags + start_tag, Refs>(std::get<Tags>(refs))...);
380 }

◆ makeStandardDeviation()

template<CTTag start_tag, typename T , int N>
auto CompileTimeDerivatives::makeStandardDeviation ( const T &  f,
const CTMatrix< Real, N, N covariance 
)

Helper function to build a standard deviation object for a function with N parameters with consecutive tags starting at start_tag, and an NxN covariance matrix for said parameters.

Definition at line 969 of file CompileTimeDerivatives.h.

970 {
971  return CTStandardDeviation(
972  makeStandardDeviationHelper<start_tag>(f, std::make_integer_sequence<CTTag, N>{}),
973  covariance);
974 }

◆ makeStandardDeviationHelper()

template<CTTag start_tag, typename T , CTTag... Tags>
auto CompileTimeDerivatives::makeStandardDeviationHelper ( const T &  f,
std::integer_sequence< CTTag, Tags... >   
)

Definition at line 958 of file CompileTimeDerivatives.h.

959 {
960  return std::make_tuple(f.template D<Tags + start_tag>()...);
961 }

◆ makeValue()

template<CTTag tag = CTNoTag, typename T >
auto CompileTimeDerivatives::makeValue ( value)

Helper function to build a (potentially tagged) value.

Definition at line 309 of file CompileTimeDerivatives.h.

Referenced by pow().

310 {
311  return CTValue<tag, T>(value);
312 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ makeValues()

template<CTTag start_tag = CTNoTag, typename... Ts>
auto CompileTimeDerivatives::makeValues ( Ts...  values)

Helper function to build a list of (potentially tagged) values.

Definition at line 329 of file CompileTimeDerivatives.h.

330 {
331  return makeValuesHelper<start_tag>(std::tuple(values...),
332  std::make_integer_sequence<CTTag, sizeof...(values)>{});
333 }
int CTTag
Operators representing variable values need to be tagged.

◆ makeValuesHelper()

template<CTTag start_tag, typename... Values, CTTag... Tags>
auto CompileTimeDerivatives::makeValuesHelper ( const std::tuple< Values... > &  values,
std::integer_sequence< CTTag, Tags... >   
)

Definition at line 316 of file CompileTimeDerivatives.h.

317 {
318  if constexpr (start_tag == CTNoTag)
319  return std::make_tuple(CTValue<CTNoTag, Values>(std::get<Tags>(values))...);
320  else
321  return std::make_tuple(CTValue<Tags + start_tag, Values>(std::get<Tags>(values))...);
322 }

◆ max()

template<typename L , typename R >
auto CompileTimeDerivatives::max ( const L &  left,
const R &  right 
)

Definition at line 276 of file CompileTimeDerivatives.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), GridPartitioner::_do_partition(), MaterialPropertyStorage::addProperty(), MooseMesh::addQuadratureNode(), Moose::MFEM::EquationSystem::ApplyEssentialBCs(), MultiAppNearestNodeTransfer::bboxMinDistance(), MultiAppGeneralFieldTransfer::bboxMinDistance(), MooseMesh::buildElemIDInfo(), Moose::Builder::setVectorParameter< CLIArgString, std::string >(), TimedSubdomainModifier::buildFromFile(), MultiAppGeneralFieldNearestLocationTransfer::buildKDTrees(), ImageMeshGenerator::buildMesh2D(), ImageMesh::buildMesh2D(), ImageMeshGenerator::buildMesh3D(), ImageMesh::buildMesh3D(), MooseMesh::buildPRefinementAndCoarseningMaps(), Assembly::bumpAllQRuleOrder(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), MultiAppGeneralFieldTransfer::cacheIncomingInterpVals(), DefaultMultiAppFixedPointConvergence::checkConvergence(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), PostprocessorInterface::checkParam(), Checkpoint::Checkpoint(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), Moose::commonAdaptivityParams(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), SolutionTimeAdaptiveDT::computeDT(), TransientMultiApp::computeDT(), ComboMarker::computeElementMarker(), QuadraturePointMarker::computeElementMarker(), HistogramVectorPostprocessor::computeHistogram(), Moose::FV::computeMinMaxValue(), FEProblemBase::computeMultiAppsDT(), ArrayDGDiffusion::computeQpJacobian(), DGDiffusion::computeQpJacobian(), DGFunctionDiffusionDirichletBC::computeQpJacobian(), ADDGDiffusion::computeQpResidual(), DGDiffusion::computeQpResidual(), DGFunctionDiffusionDirichletBC::computeQpResidual(), ElementExtremeMaterialPropertyTempl< is_ad >::computeQpValue(), NonlinearSystemBase::computeScaling(), ElementUOAux::computeValue(), BoundsBase::computeValue(), RinglebMeshGenerator::computexy(), RinglebMesh::computexy(), TimesEnableControl::conditionMet(), Moose::FV::containerInterpolate(), Coupleable::Coupleable(), Coupleable::coupled(), CylindricalGridDivision::CylindricalGridDivision(), MooseMesh::detectOrthogonalDimRanges(), ExtraElementIntegerDivision::divisionIndex(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ExtraIDIntegralVectorPostprocessor::elementValue(), MultiAppGeneralFieldNearestLocationTransfer::evaluateInterpValuesNearestNode(), MultiAppGeneralFieldTransfer::examineLocalValueConflicts(), LimitChainControl::execute(), ElementMaxLevelPostProcessor::execute(), ScalarVariable::execute(), NodalMaxValue::execute(), MultiAppPostprocessorTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), PIDTransientControl::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), FindValueOnLine::execute(), VectorMemoryUsage::execute(), MultiAppNearestNodeTransfer::execute(), TimeExtremeValue::execute(), MultiAppReporterTransfer::executeFromMultiapp(), MultiAppReporterTransfer::executeToMultiapp(), MultiAppTransfer::extendBoundingBoxes(), LayeredExtremumMaterialProperty::extreme_value(), FileRangeBuilder::FileRangeBuilder(), MultiAppGeometricInterpolationTransfer::fillSourceInterpolationPoints(), NearestNodeNumberUO::finalize(), LayeredExtremumMaterialProperty::finalize(), Moose::findContactPoint(), BreakMeshByBlockGeneratorBase::findFreeBoundaryId(), MultiAppUserObjectTransfer::findSubAppToTransferFrom(), ElementGenerator::generate(), ExtraNodesetGenerator::generate(), FillBetweenCurvesGenerator::generate(), FillBetweenSidesetsGenerator::generate(), BreakMeshByBlockGenerator::generate(), GeneratedMeshGenerator::generate(), RefineBlockGenerator::generate(), RefineSidesetGenerator::generate(), XYZDelaunayGenerator::generate(), XYDelaunayGenerator::generate(), DiffusionFV::getAdditionalRMParams(), MooseMesh::getBlocksMaxDimension(), MultiApp::getBoundingBox(), LayeredBase::getBounds(), PostprocessorInterface::getDefaultPostprocessorValueByName(), BoundsBase::getDoFIndex(), ElemSideNeighborLayersTester::getElementalValueLong(), MultiAppTransfer::getFromBoundingBoxes(), MooseMeshUtils::getIDFromName(), NEML2Action::getLongestMOOSEName(), FEProblemBase::getMaxQps(), MultiAppGeneralFieldTransfer::getMaxToProblemsBBoxDimensions(), Positions::getMinDistanceBetweenPositions(), MooseMeshUtils::getNextFreeSubdomainID(), Times::getNextTime(), MooseEnumBase::getNextValidID(), MultiAppGeneralFieldTransfer::getRestrictedFromBoundingBoxes(), CompositionDT::getSequenceSteppersNextTime(), MooseUtils::getTermWidth(), VectorPostprocessorReductionValue::getValue(), PropertyReadFile::getVoronoiData(), ElementGroupCentroidPositions::id(), NonlinearEigen::init(), LazyCoupleable::init(), ExtremeValueBase< SideVariablePostprocessor >::initialize(), ElementStatistics::initialize(), NodalStatistics::initialize(), NodalMaxValueId::initialize(), NodalMaxValue::initialize(), PseudoTimestep::initialize(), NearestNodeNumberUO::initialize(), DefaultMultiAppFixedPointConvergence::initialize(), MeshDivisionFunctorReductionVectorPostprocessor::initialize(), FunctorExtremaPositions::initialize(), ElementExtremeMaterialPropertyTempl< is_ad >::initialize(), LayeredExtremumMaterialProperty::initialize(), MultiAppReporterTransfer::initialSetup(), FEProblemBase::initialSetup(), ArrayDGDiffusion::initQpResidual(), SystemBase::initSolutionState(), ValueCache< T >::insert(), Moose::FV::interpCoeffsAndAdvected(), Moose::FV::interpolate(), MultiAppGeometricInterpolationTransfer::interpolateTargetPoints(), MatrixTools::inverse(), FillBetweenPointVectorsTools::isClosedLoop(), PostprocessorInterface::isDefaultPostprocessorValueByName(), MaxVarNDofsPerElem::join(), MaxVarNDofsPerNode::join(), NanoflannMeshSubdomainAdaptor< Dim >::kdtree_distance(), NanoflannMeshSubdomainAdaptor< Dim >::kdtree_get_pt(), Moose::FV::MinModLimiter< T >::limit(), Moose::FV::QUICKLimiter< T >::limit(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), MultiAppGeneralFieldTransfer::locatePointReceivers(), ErrorFractionMarker::markerSetup(), GeometricSearchData::maxPatchPercentage(), NearestNodeNumberUO::meshChanged(), geom_utils::minDistanceToPoints(), MultiAppReporterTransfer::MultiAppReporterTransfer(), NearestPointAverage::nearestPointIndex(), NearestPointIntegralVariablePostprocessor::nearestPointIndex(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::nearestUserObject(), MooseUtils::LIFOBuffer< T >::newEnd(), MooseLinearVariableFV< Real >::oldestSolutionStateRequested(), MooseVariableFV< Real >::oldestSolutionStateRequested(), MooseVariableFE< Real >::oldestSolutionStateRequested(), MaxVarNDofsPerElem::onElement(), MaxVarNDofsPerNode::onNode(), NearestNodeThread::operator()(), PenetrationThread::operator()(), Moose::FV::Limiter< T >::operator()(), Console::output(), PIDChainControl::PIDChainControl(), geom_utils::pointOnEdge(), SolutionUserObjectBase::pointValueWrapper(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenProblem::postScaleEigenVector(), DefaultMultiAppFixedPointConvergence::preExecute(), MooseMesh::prepare(), FormattedTable::printCSV(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), PicardSolve::printFixedPointConvergenceHistory(), CommandLine::printUsage(), MooseMeshXYCuttingUtils::quasiTriElementsFixer(), rankConfig(), ValueCache< T >::rebuildTree(), RefineBlockGenerator::recursive_refine(), RefineSidesetGenerator::recursive_refine(), CoarsenBlockGenerator::recursiveCoarsen(), RedistributeProperties::redistribute(), Moose::FV::Limiter< T >::rf_grad(), FVRelationshipManagerInterface::setRMParamsAdvection(), FVRelationshipManagerInterface::setRMParamsDiffusion(), MultiAppVariableValueSamplePostprocessorTransfer::setupPostprocessorCommunication(), TimePeriodBase::setupTimes(), Output::setWallTimeIntervalFromCommandLineParam(), SymmetricRankTwoTensorTempl< Real >::sin3Lode(), RankTwoTensorTempl< Real >::sin3Lode(), VariadicTable< Ts >::size_columns(), SmootherChainControl::SmootherChainControl(), NonlinearSystem::solve(), ElementStatistics::threadJoin(), NodalStatistics::threadJoin(), NodalMaxValue::threadJoin(), ElementMaxLevelPostProcessor::threadJoin(), ElementExtremeMaterialPropertyTempl< is_ad >::threadJoin(), TimeExtremeValue::TimeExtremeValue(), TimePeriod::TimePeriod(), EqualValueBoundaryConstraint::updateConstrainedNodes(), EqualValueBoundaryConstraint::validParams(), InversePowerMethod::validParams(), ErrorToleranceMarker::validParams(), PeriodicFunction::validParams(), LimitChainControl::validParams(), MultiAppReporterTransfer::validParams(), FunctionDT::validParams(), PIDTransientControl::validParams(), CylindricalGridDivision::validParams(), BoundingValueElementDamper::validParams(), BoundingValueNodalDamper::validParams(), FixedPointSolve::validParams(), TransientBase::validParams(), Output::validParams(), Sampler::validParams(), and MultiApp::validParams().

277 {
278  return CTConditional<decltype(left > right), L, R>(left > right, left, right);
279 }

◆ min()

template<typename L , typename R >
auto CompileTimeDerivatives::min ( const L &  left,
const R &  right 
)

Definition at line 269 of file CompileTimeDerivatives.h.

Referenced by HierarchicalGridPartitioner::_do_partition(), GridPartitioner::_do_partition(), MooseMesh::buildElemIDInfo(), NonlinearSystemBase::computeDamping(), ConstantDT::computeDT(), LogConstantDT::computeDT(), TransientMultiApp::computeDT(), HistogramVectorPostprocessor::computeHistogram(), Moose::FV::computeMinMaxValue(), FEProblemBase::computeMultiAppsDT(), LowerBoundNodalKernel::computeQpResidual(), UpperBoundNodalKernel::computeQpResidual(), ElementExtremeMaterialPropertyTempl< is_ad >::computeQpValue(), Moose::FV::containerInterpolate(), MooseMesh::detectOrthogonalDimRanges(), LimitChainControl::execute(), PseudoTimestep::execute(), MultiAppPostprocessorTransfer::execute(), PIDTransientControl::execute(), FindValueOnLine::execute(), TimeExtremeValue::execute(), LayeredExtremumMaterialProperty::extreme_value(), BreakMeshByBlockGenerator::generate(), MultiApp::getBoundingBox(), LayeredBase::getBounds(), MultiAppTransfer::getFromBoundingBoxes(), MooseMeshUtils::getIDFromName(), MultiAppGeneralFieldTransfer::getMaxToProblemsBBoxDimensions(), Positions::getMinDistanceBetweenPositions(), ValueCache< T >::getNeighbors(), MultiAppGeneralFieldTransfer::getRestrictedFromBoundingBoxes(), NonlinearEigen::init(), ElementStatistics::initialize(), NodalStatistics::initialize(), MeshDivisionFunctorReductionVectorPostprocessor::initialize(), ValueCache< T >::insert(), Moose::FV::interpCoeffsAndAdvected(), Moose::FV::interpolate(), MooseUtils::levenshteinDist(), Moose::FV::MinModLimiter< T >::limit(), Moose::FV::SOULimiter< T >::limit(), Moose::FV::QUICKLimiter< T >::limit(), IterationAdaptiveDT::limitDTByFunction(), MooseMeshXYCuttingUtils::lineRemoverCutElemTri(), ErrorFractionMarker::markerSetup(), geom_utils::minDistanceToPoints(), SecondaryNeighborhoodThread::operator()(), Moose::FV::Limiter< T >::operator()(), geom_utils::pointOnEdge(), CompositionDT::produceCompositionDT(), rankConfig(), ValueCache< T >::rebuildTree(), MaterialBase::registerPropName(), MaterialPropertyStorage::shallowSwapData(), MaterialPropertyStorage::shallowSwapDataBack(), SymmetricRankTwoTensorTempl< Real >::sin3Lode(), RankTwoTensorTempl< Real >::sin3Lode(), ElementStatistics::threadJoin(), NodalStatistics::threadJoin(), ElementExtremeMaterialPropertyTempl< is_ad >::threadJoin(), PseudoTimestep::timestepSER(), MooseUtils::tokenize(), Moose::LibtorchArtificialNeuralNetTrainer< SamplerType >::train(), and ReferenceResidualConvergence::updateReferenceResidual().

270 {
271  return CTConditional<decltype(left < right), L, R>(left < right, left, right);
272 }

◆ operator-()

template<typename T , class = std::enable_if_t<std::is_base_of<CTBase, T>::value>>
auto CompileTimeDerivatives::operator- ( const T &  arg)

Definition at line 183 of file CompileTimeDerivatives.h.

184 {
185  return CTUnaryMinus<T>(arg);
186 }

◆ pow() [1/2]

template<typename B , typename E >
auto CompileTimeDerivatives::pow ( const B base,
const E &  exp 
)

pow(base, exponent) function overload.

Definition at line 715 of file CompileTimeDerivatives.h.

Referenced by CompileTimeDerivatives::CTPow< L, R >::D(), and CompileTimeDerivatives::CTIPow< B, E >::D().

716 {
717  if constexpr (std::is_base_of<CTBase, B>::value && std::is_base_of<CTBase, E>::value)
718  return CTPow(base, exp);
719  else if constexpr (std::is_base_of<CTBase, E>::value)
720  return CTPow(makeValue(base), exp);
721  else if constexpr (std::is_base_of<CTBase, B>::value)
722  return CTPow(base, makeValue(exp));
723  else
724  return CTPow(makeValue(base), makeValue(exp));
725 }
auto makeValue(T value)
Helper function to build a (potentially tagged) value.
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * exp(-pow< 2 >(_arg))/sqrt(libMesh
Macro for implementing a simple binary function overload.

◆ pow() [2/2]

template<int E, typename B >
auto CompileTimeDerivatives::pow ( const B base)

pow<exponent>(base) template for integer powers.

Definition at line 777 of file CompileTimeDerivatives.h.

778 {
779  if constexpr (std::is_base_of<CTBase, B>::value)
780  return CTIPow<B, E>(base);
781  else
782  return CTIPow<CTValue<CTNoTag, B>, E>(makeValue(base));
783 }
auto makeValue(T value)
Helper function to build a (potentially tagged) value.

◆ pow< 2 >() [1/2]

◆ pow< 2 >() [2/2]

◆ printTag()

template<CTTag tag>
std::string CompileTimeDerivatives::printTag ( )

Definition at line 71 of file CompileTimeDerivatives.h.

72 {
73  if constexpr (tag == CTNoTag)
74  return "";
75  else
76  return Moose::stringify(tag);
77 }
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64

◆ sin()

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * CompileTimeDerivatives::sin ( _arg  )

◆ sinh()

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template CompileTimeDerivatives::sinh ( _arg  )

◆ sqrt()

CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * CompileTimeDerivatives::sqrt ( _arg  )

Referenced by RinglebMeshGenerator::arhopj(), RinglebMesh::arhopj(), ConcentricCircleMesh::buildMesh(), CircularBoundaryCorrectionGenerator::circularCenterCalculator(), CylindricalAverage::computeDistance(), Assembly::computeFaceMap(), TransfiniteMeshGenerator::computeMidPoint(), TransfiniteMeshGenerator::computeRadius(), FEProblemBase::computeResidualL2Norm(), Assembly::computeSinglePointMapAD(), VectorMagnitudeAux::computeValue(), VectorVariableMagnitudeAux::computeValue(), RinglebMeshGenerator::computexy(), RinglebMesh::computexy(), PseudoTimestep::currentResidualNorm(), RankTwoTensorTempl< Real >::d2sin3Lode(), SymmetricRankTwoTensorTempl< Real >::dsin3Lode(), RankTwoTensorTempl< Real >::dsin3Lode(), PointwiseRenormalizeVector::execute(), NodalNormalsEvaluator::execute(), InternalSideIndicatorBase::finalize(), ConcentricCircleMeshGenerator::generate(), AnnularMeshGenerator::generate(), AdvancedExtruderGenerator::generate(), CircularBoundaryCorrectionGenerator::generateRadialCorrectionFactor(), Positions::getMinDistanceBetweenPositions(), ElementArrayL2Norm::getValue(), ElementL2Norm::getValue(), ElementL2Error::getValue(), ElementL2Difference::getValue(), ElementSidesL2Norm::getValue(), ElementL2FunctorErrorTempl< is_ad >::getValue(), NodalL2Error::getValue(), ElementVectorL2Error::getValue(), ElementH1SemiError::getValue(), NodalL2Norm::getValue(), ScalarL2Error::getValue(), RankThreeTensorTempl< T >::L2norm(), SymmetricRankFourTensorTempl< T >::L2norm(), RankFourTensorTempl< T >::L2norm(), SymmetricRankTwoTensorTempl< Real >::L2norm(), RankTwoTensorTempl< Real >::L2norm(), geom_utils::minDistanceToPoints(), MonotoneCubicInterpolation::modify_derivs(), MortarSegmentHelper::MortarSegmentHelper(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::nearestUserObject(), ColumnMajorMatrixTempl< Real >::norm(), ThreadedRadialAverageLoop::operator()(), MultiAppCoordTransform::operator()(), CompileTimeDerivatives::CTStandardDeviation< Ds >::operator()(), DistributedRectilinearMeshGenerator::paritionSquarely(), PointReduction::perpendicularDistance(), EigenProblem::postScaleEigenVector(), EigenProblem::preScaleEigenVector(), Transient::relativeSolutionDifferenceNorm(), RotationMatrix::rotVecToZ(), SymmetricRankTwoTensorTempl< Real >::sin3Lode(), RankTwoTensorTempl< Real >::sin3Lode(), ReferenceResidualConvergence::updateReferenceResidual(), Axisymmetric2D3DSolutionFunction::value(), PiecewiseBilinear::valueInternal(), AuxiliarySystem::variableWiseRelativeSolutionDifferenceNorm(), VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl(), and Console::writeVariableNorms().

Variable Documentation

◆ CTNoTag

constexpr CTTag CompileTimeDerivatives::CTNoTag = std::numeric_limits<CTTag>::max()

Definition at line 67 of file CompileTimeDerivatives.h.

Referenced by makeRefsHelper(), makeValuesHelper(), and printTag().

◆ N

int CompileTimeDerivatives::N

Definition at line 908 of file CompileTimeDerivatives.h.

Referenced by RankTwoTensorTempl< Real >::addIa(), Assembly::computeFaceMap(), RankFourTensorTempl< T >::contraction(), RankTwoTensorTempl< Real >::contraction(), RankFourTensorTempl< T >::contractionIj(), RankFourTensorTempl< T >::contractionKl(), SymmetricRankTwoTensorTempl< Real >::d2secondInvariant(), RankTwoTensorTempl< Real >::d2secondInvariant(), RankTwoTensorTempl< Real >::d2sin3Lode(), RankTwoTensorTempl< Real >::d2symmetricEigenvalues(), SymmetricRankTwoTensorTempl< Real >::d2thirdInvariant(), RankTwoTensorTempl< Real >::d2thirdInvariant(), dataLoad(), dataStore(), DMCreateMatrix_Moose(), RankThreeTensorTempl< T >::doubleContraction(), SymmetricRankTwoTensorTempl< Real >::doubleContraction(), RankTwoTensorTempl< Real >::dsymmetricEigenvalues(), NEML2ModelExecutor::extractOutputs(), CompileTimeDerivativesMaterialInternal::details::factorial(), RankFourTensorTempl< T >::fillAntisymmetricFromInputVector(), RankTwoTensorTempl< Real >::fillColumn(), RankThreeTensorTempl< T >::fillFromPlaneNormal(), RankFourTensorTempl< T >::fillGeneralIsotropic(), RankFourTensorTempl< T >::fillGeneralOrthotropicFromInputVector(), RankTwoTensorTempl< Real >::fillRealTensor(), RankTwoTensorTempl< Real >::fillRow(), SymmetricRankFourTensorTempl< T >::fillSymmetric21FromInputVector(), RankTwoTensorTempl< Real >::genRandomTensor(), TrilinearInterpolation::getCornerIndices(), BilinearInterpolation::getNeighborIndices(), PiecewiseMultiInterpolation::getNeighborIndices(), Moose::FV::greenGaussGradient(), SymmetricRankTwoTensorTempl< Real >::initialContraction(), RankTwoTensorTempl< Real >::initialContraction(), MooseUtils::StaticallyAllocatedSet< T, N >::insert(), LineSegment::intersect(), RankFourTensorTempl< T >::invSymm(), SymmetricRankFourTensorTempl< T >::invSymm(), SymmetricRankFourTensorTempl< T >::isIsotropic(), RankFourTensorTempl< T >::isIsotropic(), SymmetricRankFourTensorTempl< T >::isSymmetric(), RankFourTensorTempl< T >::isSymmetric(), SymmetricRankTwoTensorTempl< Real >::L2norm(), MaterialRankTwoTensorAuxTempl< T, is_ad >::MaterialRankTwoTensorAuxTempl(), MaterialRealVectorValueAuxTempl< T, is_ad, is_functor >::MaterialRealVectorValueAuxTempl(), MooseUtils::SemidynamicVector< T, N, value_init >::max_size(), RankTwoTensorTempl< Real >::mixedProductJkI(), RankThreeTensorTempl< T >::mixedProductRankFour(), multiIndexHelper(), NodalPatchRecovery::nChooseK(), CompileTimeDerivativesMaterialInternal::details::num_derivatives(), SymmetricRankFourTensorTempl< T >::operator RankFourTensorTempl< T >(), SymmetricRankTwoTensorTempl< Real >::operator!=(), RankThreeTensorTempl< T >::operator*(), SymmetricRankFourTensorTempl< T >::operator*(), RankFourTensorTempl< T >::operator*(), SymmetricRankTwoTensorTempl< Real >::operator*(), SymmetricRankTwoTensorTempl< Real >::operator*=(), SymmetricRankTwoTensorTempl< Real >::operator+(), SymmetricRankTwoTensorTempl< Real >::operator+=(), SymmetricRankTwoTensorTempl< Real >::operator-(), SymmetricRankTwoTensorTempl< Real >::operator-=(), SymmetricRankTwoTensorTempl< Real >::operator/(), SymmetricRankTwoTensorTempl< Real >::operator/=(), RankThreeTensorTempl< T >::operator=(), SymmetricRankTwoTensorTempl< Real >::operator=(), RankTwoTensorTempl< Real >::operator=(), SymmetricRankTwoTensorTempl< Real >::operator==(), RankTwoTensorTempl< Real >::operator==(), SymmetricRankTwoTensorTempl< Real >::outerProduct(), RankTwoTensorTempl< Real >::outerProduct(), SymmetricRankTwoTensorTempl< Real >::positiveProjectionEigenDecomposition(), RankTwoTensorTempl< Real >::positiveProjectionEigenDecomposition(), RankThreeTensorTempl< T >::print(), RankTwoTensorTempl< Real >::print(), SymmetricRankFourTensorTempl< T >::print(), RankFourTensorTempl< T >::print(), SymmetricRankTwoTensorTempl< Real >::print(), SymmetricRankFourTensorTempl< T >::printReal(), RankFourTensorTempl< T >::printReal(), SymmetricRankTwoTensorTempl< Real >::printReal(), RankFourTensorTempl< T >::RankFourTensorTempl(), RankThreeTensorTempl< T >::RankThreeTensorTempl(), RankTwoTensorTempl< Real >::RankTwoTensorTempl(), RankThreeTensorTempl< T >::rotate(), RankFourTensorTempl< T >::rotate(), RankTwoTensorTempl< Real >::rotate(), RankTwoTensorTempl< Real >::selfOuterProduct(), RankFourTensorTempl< T >::singleProductI(), RankFourTensorTempl< T >::singleProductJ(), RankFourTensorTempl< T >::singleProductK(), RankFourTensorTempl< T >::singleProductL(), NestedSolveTempl< is_ad >::sizeItems(), RankFourTensorTempl< T >::sum3x3(), SymmetricRankFourTensorTempl< T >::SymmetricRankFourTensorTempl(), RankTwoTensorTempl< Real >::times(), RankFourTensorTempl< T >::transposeIj(), RankFourTensorTempl< T >::transposeKl(), SymmetricRankFourTensorTempl< T >::transposeMajor(), RankFourTensorTempl< T >::transposeMajor(), RankFourTensorTempl< T >::tripleProductIjk(), RankFourTensorTempl< T >::tripleProductIjl(), RankFourTensorTempl< T >::tripleProductIkl(), RankFourTensorTempl< T >::tripleProductJkl(), MetaPhysicL::RawType< SymmetricRankFourTensorTempl< T > >::value(), MetaPhysicL::RawType< SymmetricRankTwoTensorTempl< T > >::value(), MetaPhysicL::RawType< RankFourTensorTempl< T > >::value(), RankTwoTensorTempl< Real >::vectorOuterProduct(), and SymmetricRankTwoTensorTempl< Real >::zero().