Enumerations | |
| enum class | ComputeType { value , derivative } |
Functions | |
| FactorizedRankTwoTensorOperatorMapUnary (log, log(eigval)) | |
| FactorizedRankTwoTensorOperatorMapDerivativeUnary (dlog, log(eigval), 1/eigval) | |
| FactorizedRankTwoTensorOperatorMapUnary (exp, exp(eigval)) | |
| FactorizedRankTwoTensorOperatorMapDerivativeUnary (dexp, exp(eigval), exp(eigval)) | |
| FactorizedRankTwoTensorOperatorMapUnary (sqrt, sqrt(eigval)) | |
| FactorizedRankTwoTensorOperatorMapDerivativeUnary (dsqrt, sqrt(eigval), pow(eigval, -1./2.)/2.) | |
| FactorizedRankTwoTensorOperatorMapUnary (cbrt, cbrt(eigval)) | |
| FactorizedRankTwoTensorOperatorMapDerivativeUnary (dcbrt, cbrt(eigval), pow(eigval, -2./3.)/3.) | |
| FactorizedRankTwoTensorOperatorMapBinary (pow, pow(eigval, arg)) | |
| FactorizedRankTwoTensorOperatorMapDerivativeBinary (dpow, pow(eigval, arg), arg *pow(eigval, arg - 1)) | |
| Real | poly1Log (Real x, Real tol, unsigned int derivative_order) |
| Real | poly2Log (Real x, Real tol, unsigned int derivative_order) |
| Real | poly3Log (Real x, Real tol, unsigned int derivative_order) |
| Real | poly4Log (Real x, Real tol, unsigned int derivative_order) |
| Real | taylorLog (Real x) |
| Point | barycentricToCartesian2D (const Point &p0, const Point &p1, const Point &p2, const Real b0, const Real b1, const Real b2) |
| Evaluate Cartesian coordinates of any center point of a triangle given Barycentric coordinates of center point and Cartesian coordinates of triangle's vertices. | |
| Point | barycentricToCartesian3D (const Point &p0, const Point &p1, const Point &p2, const Point &p3, const Real b0, const Real b1, const Real b2, const Real b3) |
| Evaluate Cartesian coordinates of any center point of a tetrahedron given Barycentric coordinates of center point and Cartesian coordinates of tetrahedon's vertices. | |
| Point | circumcenter2D (const Point &p0, const Point &p1, const Point &p2) |
| Evaluate circumcenter of a triangle given three arbitrary points. | |
| Point | circumcenter3D (const Point &p0, const Point &p1, const Point &p2, const Point &p3) |
| Evaluate circumcenter of a tetrahedrom given four arbitrary points. | |
| template<typename T > | |
| T | round (T x) |
| template<typename T > | |
| T | sign (T x) |
| template<typename T > | |
| T | pow (T x, int e) |
| template<typename T > | |
| T | heavyside (T x) |
| template<typename T > | |
| T | regularizedHeavyside (const T &x, Real smoothing_length) |
| template<typename T > | |
| T | regularizedHeavysideDerivative (const T &x, Real smoothing_length) |
| template<typename T > | |
| T | positivePart (T x) |
| template<typename T > | |
| T | negativePart (T x) |
| template<typename T , typename T2 , typename T3 , typename std::enable_if< libMesh::ScalarTraits< T >::value &&libMesh::ScalarTraits< T2 >::value &&libMesh::ScalarTraits< T3 >::value, int >::type = 0> | |
| void | addScaled (const T &a, const T2 &b, T3 &result) |
| template<typename T , typename T2 , typename T3 , typename std::enable_if< libMesh::ScalarTraits< T >::value, int >::type = 0> | |
| void | addScaled (const T &scalar, const libMesh::NumericVector< T2 > &numeric_vector, libMesh::NumericVector< T3 > &result) |
| template<typename T , typename T2 , template< typename > class W, template< typename > class W2, typename std::enable_if< std::is_same< typename W< T >::index_type, unsigned int >::value &&std::is_same< typename W2< T2 >::index_type, unsigned int >::value, int >::type = 0> | |
| libMesh::CompareTypes< T, T2 >::supertype | dotProduct (const W< T > &a, const W2< T2 > &b) |
| template<typename T > | |
| auto | normSquared (const T &value) |
Return the square of the Euclidean (L2) norm of value. | |
| template<typename T > | |
| auto | norm (const T &value) |
Return the Euclidean (L2) norm of value. | |
| template<typename C , typename T , typename R = typename libMesh::CompareTypes<typename C::value_type, T>::supertype> | |
| R | poly (const C &c, const T x, const bool derivative=false) |
| Evaluate a polynomial with the coefficients c at x. | |
| template<typename C , typename T , typename R = typename libMesh::CompareTypes<typename C::value_type, T>::supertype> | |
| R | polynomial (const C &c, const T x) |
| Evaluate a polynomial with the coefficients c at x. | |
| template<typename C , typename T , typename R = typename libMesh::CompareTypes<typename C::value_type, T>::supertype> | |
| R | polynomialDerivative (const C &c, const T x) |
| Returns the derivative of polynomial(c, x) with respect to x. | |
| template<typename T , typename T2 > | |
| T | clamp (const T &x, T2 lowerlimit, T2 upperlimit) |
| template<typename T , typename T2 > | |
| T | smootherStep (T x, T2 start, T2 end, bool derivative=false) |
| template<ComputeType compute_type, typename X , typename S , typename E > | |
| auto | smootherStep (const X &x, const S &start, const E &end) |
| template<typename T > | |
| void | mooseSetToZero (T &v) |
| Helper function templates to set a variable to zero. | |
| template<typename T > | |
| void | mooseSetToZero (T *&) |
| template<> | |
| void | mooseSetToZero (std::vector< Real > &vec) |
| std::vector< std::vector< unsigned int > > | multiIndex (unsigned int dim, unsigned int order) |
| generate a complete multi index table for given dimension and order i.e. | |
| template<ComputeType compute_type, typename X , typename X1 , typename X2 , typename Y1 , typename Y2 > | |
| auto | linearInterpolation (const X &x, const X1 &x1, const X2 &x2, const Y1 &y1, const Y2 &y2) |
| template<typename T1 , typename T2 > | |
| std::size_t | euclideanMod (T1 dividend, T2 divisor) |
| perform modulo operator for Euclidean division that ensures a non-negative result | |
| template<typename T > | |
| T | gradName (const T &base_prop_name) |
| automatic prefixing for naming material properties based on gradients of coupled variables/functors | |
| template<typename T > | |
| T | timeDerivName (const T &base_prop_name) |
| automatic prefixing for naming material properties based on time derivatives of coupled variables/functors | |
| void | kron (RealEigenMatrix &product, const RealEigenMatrix &mat_A, const RealEigenMatrix &mat_B) |
| Computes the Kronecker product of two matrices. | |
| template<> | |
| void | mooseSetToZero< RankFourTensor > (RankFourTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADRankFourTensor > (ADRankFourTensor &v) |
| template<> | |
| void | mooseSetToZero< RankFourTensorTempl< Real > > (RankFourTensorTempl< Real > &v) |
| template<> | |
| void | mooseSetToZero< RankFourTensorTempl< ADReal > > (RankFourTensorTempl< ADReal > &v) |
| template<> | |
| void | mooseSetToZero< RankThreeTensorTempl< Real > > (RankThreeTensorTempl< Real > &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< RankThreeTensorTempl< ADReal > > (RankThreeTensorTempl< ADReal > &v) |
| template<> | |
| void | mooseSetToZero< RankThreeTensor > (RankThreeTensor &v) |
| template<> | |
| void | mooseSetToZero< ADRankThreeTensor > (ADRankThreeTensor &v) |
| template<> | |
| void | mooseSetToZero< RankTwoTensor > (RankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADRankTwoTensor > (ADRankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< RankTwoTensor > (RankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADRankTwoTensor > (ADRankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< SymmetricRankFourTensor > (SymmetricRankFourTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADSymmetricRankFourTensor > (ADSymmetricRankFourTensor &v) |
| template<> | |
| void | mooseSetToZero< SymmetricRankFourTensorTempl< Real > > (SymmetricRankFourTensorTempl< Real > &v) |
| template<> | |
| void | mooseSetToZero< SymmetricRankFourTensorTempl< ADReal > > (SymmetricRankFourTensorTempl< ADReal > &v) |
| template<> | |
| void | mooseSetToZero< SymmetricRankTwoTensor > (SymmetricRankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADSymmetricRankTwoTensor > (ADSymmetricRankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< SymmetricRankTwoTensor > (SymmetricRankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADSymmetricRankTwoTensor > (ADSymmetricRankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| Real | plainLog (Real x, unsigned int derivative_order) |
| template<> | |
| void | mooseSetToZero< RankFourTensor > (RankFourTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADRankFourTensor > (ADRankFourTensor &v) |
| template<> | |
| void | mooseSetToZero< RankThreeTensor > (RankThreeTensor &v) |
| template<> | |
| void | mooseSetToZero< ADRankThreeTensor > (ADRankThreeTensor &v) |
| template<> | |
| void | mooseSetToZero< RankTwoTensor > (RankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADRankTwoTensor > (ADRankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< SymmetricRankFourTensor > (SymmetricRankFourTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADSymmetricRankFourTensor > (ADSymmetricRankFourTensor &v) |
| template<> | |
| void | mooseSetToZero< SymmetricRankTwoTensor > (SymmetricRankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
| template<> | |
| void | mooseSetToZero< ADSymmetricRankTwoTensor > (ADSymmetricRankTwoTensor &v) |
| Helper function template specialization to set an object to zero. | |
Variables | |
| static constexpr Real | sqrt2 = 1.4142135623730951 |
| std::sqrt is not constexpr, so we add sqrt(2) as a constant (used in Mandel notation) | |
|
strong |
| Enumerator | |
|---|---|
| value | |
| derivative | |
Definition at line 399 of file MathUtils.h.
| void MathUtils::addScaled | ( | const T & | a, |
| const T2 & | b, | ||
| T3 & | result | ||
| ) |
Definition at line 176 of file MathUtils.h.
Referenced by BDF2::computeTimeDerivativeHelper(), and NewmarkBeta::computeTimeDerivativeHelper().
| void MathUtils::addScaled | ( | const T & | scalar, |
| const libMesh::NumericVector< T2 > & | numeric_vector, | ||
| libMesh::NumericVector< T3 > & | result | ||
| ) |
Definition at line 186 of file MathUtils.h.
| Point MathUtils::barycentricToCartesian2D | ( | const Point & | p0, |
| const Point & | p1, | ||
| const Point & | p2, | ||
| const Real | b0, | ||
| const Real | b1, | ||
| const Real | b2 | ||
| ) |
Evaluate Cartesian coordinates of any center point of a triangle given Barycentric coordinates of center point and Cartesian coordinates of triangle's vertices.
| p0,p1,p2 | are the three non-collinear vertices in Cartesian coordinates |
| b0,b1,b2 | is the center point in barycentric coordinates with b0+b1+b2=1, e.g. (1/3,1/3,1/3) for a centroid |
Definition at line 217 of file MathUtils.C.
Referenced by circumcenter2D().
| Point MathUtils::barycentricToCartesian3D | ( | const Point & | p0, |
| const Point & | p1, | ||
| const Point & | p2, | ||
| const Point & | p3, | ||
| const Real | b0, | ||
| const Real | b1, | ||
| const Real | b2, | ||
| const Real | b3 | ||
| ) |
Evaluate Cartesian coordinates of any center point of a tetrahedron given Barycentric coordinates of center point and Cartesian coordinates of tetrahedon's vertices.
| p0,p1,p2,p3 | are the three non-coplanar vertices in Cartesian coordinates |
| b0,b1,b2,b3 | is the center point in barycentric coordinates with b0+b1+b2+b3=1, e.g. (1/4,1/4,1/4,1/4) for a centroid. |
Definition at line 237 of file MathUtils.C.
Referenced by circumcenter3D().
| Point MathUtils::circumcenter2D | ( | const Point & | p0, |
| const Point & | p1, | ||
| const Point & | p2 | ||
| ) |
Evaluate circumcenter of a triangle given three arbitrary points.
| p0,p1,p2 | are the three non-collinear vertices in Cartesian coordinates |
Definition at line 260 of file MathUtils.C.
| Point MathUtils::circumcenter3D | ( | const Point & | p0, |
| const Point & | p1, | ||
| const Point & | p2, | ||
| const Point & | p3 | ||
| ) |
Evaluate circumcenter of a tetrahedrom given four arbitrary points.
| p0,p1,p2,p3 | are the four non-coplanar vertices in Cartesian coordinates |
Definition at line 289 of file MathUtils.C.
| T MathUtils::clamp | ( | const T & | x, |
| T2 | lowerlimit, | ||
| T2 | upperlimit | ||
| ) |
Definition at line 370 of file MathUtils.h.
| libMesh::CompareTypes< T, T2 >::supertype MathUtils::dotProduct | ( | const W< T > & | a, |
| const W2< T2 > & | b | ||
| ) |
Definition at line 202 of file MathUtils.h.
Referenced by ADKernelGradTempl< T >::computeResidual(), and ADKernelGradTempl< T >::computeResidualsForJacobian().
| std::size_t MathUtils::euclideanMod | ( | T1 | dividend, |
| T2 | divisor | ||
| ) |
perform modulo operator for Euclidean division that ensures a non-negative result
| dividend | dividend of the modulo operation |
| divisor | divisor of the modulo operation |
Definition at line 495 of file MathUtils.h.
Referenced by MooseMeshElementConversionUtils::convertPyramid5Elem(), MooseMeshElementConversionUtils::createUnitTet4FromHex8(), and MooseMeshElementConversionUtils::createUnitTet4FromPrism6().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| T MathUtils::gradName | ( | const T & | base_prop_name | ) |
automatic prefixing for naming material properties based on gradients of coupled variables/functors
Definition at line 506 of file MathUtils.h.
Referenced by GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl().
| T MathUtils::heavyside | ( | T | x | ) |
Definition at line 121 of file MathUtils.h.
| void MathUtils::kron | ( | RealEigenMatrix & | product, |
| const RealEigenMatrix & | mat_A, | ||
| const RealEigenMatrix & | mat_B | ||
| ) |
Computes the Kronecker product of two matrices.
| product | Reference to the product matrix |
| mat_A | Reference to the first matrix |
| mat_B | Reference to the other matrix |
Definition at line 17 of file MathUtils.C.
| auto MathUtils::linearInterpolation | ( | const X & | x, |
| const X1 & | x1, | ||
| const X2 & | x2, | ||
| const Y1 & | y1, | ||
| const Y2 & | y2 | ||
| ) |
Definition at line 478 of file MathUtils.h.
|
inline |
Definition at line 451 of file MathUtils.h.
|
inline |
Helper function templates to set a variable to zero.
Specializations may have to be implemented (for examples see RankTwoTensor, RankFourTensor).
The default for non-pointer types is to assign zero. This should either do something sensible, or throw a compiler error. Otherwise the T type is designed badly.
Definition at line 433 of file MathUtils.h.
Referenced by MaterialBase::getGenericZeroMaterialProperty(), MaterialPropertyInterface::getGenericZeroMaterialProperty(), and MaterialBase::getGenericZeroMaterialPropertyByName().
|
inline |
Definition at line 444 of file MathUtils.h.
| void MathUtils::mooseSetToZero< ADRankFourTensor > | ( | ADRankFourTensor & | v | ) |
Definition at line 24 of file RankFourTensor.C.
| void MathUtils::mooseSetToZero< ADRankFourTensor > | ( | ADRankFourTensor & | v | ) |
Definition at line 24 of file RankFourTensor.C.
| void MathUtils::mooseSetToZero< ADRankThreeTensor > | ( | ADRankThreeTensor & | v | ) |
Definition at line 25 of file RankThreeTensor.C.
| void MathUtils::mooseSetToZero< ADRankThreeTensor > | ( | ADRankThreeTensor & | v | ) |
Definition at line 25 of file RankThreeTensor.C.
| void MathUtils::mooseSetToZero< ADRankTwoTensor > | ( | ADRankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 25 of file RankTwoTensor.C.
| void MathUtils::mooseSetToZero< ADRankTwoTensor > | ( | ADRankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 25 of file RankTwoTensor.C.
| void MathUtils::mooseSetToZero< ADRankTwoTensor > | ( | ADRankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 25 of file RankTwoTensor.C.
| void MathUtils::mooseSetToZero< ADSymmetricRankFourTensor > | ( | ADSymmetricRankFourTensor & | v | ) |
Definition at line 24 of file SymmetricRankFourTensor.C.
| void MathUtils::mooseSetToZero< ADSymmetricRankFourTensor > | ( | ADSymmetricRankFourTensor & | v | ) |
Definition at line 24 of file SymmetricRankFourTensor.C.
| void MathUtils::mooseSetToZero< ADSymmetricRankTwoTensor > | ( | ADSymmetricRankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 25 of file SymmetricRankTwoTensor.C.
| void MathUtils::mooseSetToZero< ADSymmetricRankTwoTensor > | ( | ADSymmetricRankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 25 of file SymmetricRankTwoTensor.C.
| void MathUtils::mooseSetToZero< ADSymmetricRankTwoTensor > | ( | ADSymmetricRankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 25 of file SymmetricRankTwoTensor.C.
| void MathUtils::mooseSetToZero< RankFourTensor > | ( | RankFourTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file RankFourTensor.C.
| void MathUtils::mooseSetToZero< RankFourTensor > | ( | RankFourTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file RankFourTensor.C.
| void MathUtils::mooseSetToZero< RankFourTensorTempl< ADReal > > | ( | RankFourTensorTempl< ADReal > & | v | ) |
| void MathUtils::mooseSetToZero< RankFourTensorTempl< Real > > | ( | RankFourTensorTempl< Real > & | v | ) |
| void MathUtils::mooseSetToZero< RankThreeTensor > | ( | RankThreeTensor & | v | ) |
Definition at line 18 of file RankThreeTensor.C.
| void MathUtils::mooseSetToZero< RankThreeTensor > | ( | RankThreeTensor & | v | ) |
Definition at line 18 of file RankThreeTensor.C.
| void MathUtils::mooseSetToZero< RankThreeTensorTempl< ADReal > > | ( | RankThreeTensorTempl< ADReal > & | v | ) |
| void MathUtils::mooseSetToZero< RankThreeTensorTempl< Real > > | ( | RankThreeTensorTempl< Real > & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
| void MathUtils::mooseSetToZero< RankTwoTensor > | ( | RankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file RankTwoTensor.C.
| void MathUtils::mooseSetToZero< RankTwoTensor > | ( | RankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file RankTwoTensor.C.
| void MathUtils::mooseSetToZero< RankTwoTensor > | ( | RankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file RankTwoTensor.C.
| void MathUtils::mooseSetToZero< SymmetricRankFourTensor > | ( | SymmetricRankFourTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file SymmetricRankFourTensor.C.
| void MathUtils::mooseSetToZero< SymmetricRankFourTensor > | ( | SymmetricRankFourTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file SymmetricRankFourTensor.C.
| void MathUtils::mooseSetToZero< SymmetricRankFourTensorTempl< ADReal > > | ( | SymmetricRankFourTensorTempl< ADReal > & | v | ) |
| void MathUtils::mooseSetToZero< SymmetricRankFourTensorTempl< Real > > | ( | SymmetricRankFourTensorTempl< Real > & | v | ) |
| void MathUtils::mooseSetToZero< SymmetricRankTwoTensor > | ( | SymmetricRankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file SymmetricRankTwoTensor.C.
| void MathUtils::mooseSetToZero< SymmetricRankTwoTensor > | ( | SymmetricRankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file SymmetricRankTwoTensor.C.
| void MathUtils::mooseSetToZero< SymmetricRankTwoTensor > | ( | SymmetricRankTwoTensor & | v | ) |
Helper function template specialization to set an object to zero.
Needed by DerivativeMaterialInterface
Definition at line 18 of file SymmetricRankTwoTensor.C.
| std::vector< std::vector< unsigned int > > MathUtils::multiIndex | ( | unsigned int | dim, |
| unsigned int | order | ||
| ) |
generate a complete multi index table for given dimension and order i.e.
given dim = 2, order = 2, generated table will have the following content 0 0 1 0 0 1 2 0 1 1 0 2 The first number in each entry represents the order of the first variable, i.e. x; The second number in each entry represents the order of the second variable, i.e. y. Multiplication is implied between numbers in each entry, i.e. 1 1 represents x^1 * y^1
| dim | dimension of the multi-index, here dim = mesh dimension |
| order | generate the multi-index up to certain order |
Definition at line 186 of file MathUtils.C.
| T MathUtils::negativePart | ( | T | x | ) |
Definition at line 163 of file MathUtils.h.
| auto MathUtils::norm | ( | const T & | value | ) |
Return the Euclidean (L2) norm of value.
For dual number types, differentiating std::sqrt at a zero argument produces a NaN derivative (d(sqrt(x))/dx = 1 / (2 * sqrt(x))), so this short-circuits to a literal zero whenever value is (fuzzy) zero.
| value | The scalar, container, or rank 1/2 tensor to take the norm of |
value Definition at line 273 of file MathUtils.h.
| auto MathUtils::normSquared | ( | const T & | value | ) |
Return the square of the Euclidean (L2) norm of value.
Recurses into containers using the same MooseUtils::Has_size trait as MooseUtils::isZero, and into rank 1 and rank 2 tensors component by component. Composed entirely of sums and products, this is safe to call unconditionally on dual number types, including at zero.
| value | The scalar, container, or rank 1/2 tensor to take the squared norm of |
value Definition at line 232 of file MathUtils.h.
Referenced by norm(), and normSquared().
| Real MathUtils::plainLog | ( | Real | x, |
| unsigned int | derivative_order | ||
| ) |
Definition at line 28 of file MathUtils.C.
Referenced by poly1Log(), poly2Log(), poly3Log(), and poly4Log().
| R MathUtils::poly | ( | const C & | c, |
| const T | x, | ||
| const bool | derivative = false |
||
| ) |
Evaluate a polynomial with the coefficients c at x.
Note that the Polynomial form is c[0]*x^s + c[1]*x^(s-1) + c[2]*x^(s-2) + ... + c[s-2]*x^2 + c[s-1]*x + c[s] where s = c.size()-1 , which is counter intuitive!
This function will be DEPRECATED soon (10/22/2020)
The coefficient container type can be any container that provides an index operator [] and a .size() method (e.g. std::vector, std::array). The return type is the supertype of the container value type and the argument x. The supertype is the type that can represent both number types.
Definition at line 298 of file MathUtils.h.
| Real MathUtils::poly1Log | ( | Real | x, |
| Real | tol, | ||
| unsigned int | derivative_order | ||
| ) |
Definition at line 49 of file MathUtils.C.
| Real MathUtils::poly2Log | ( | Real | x, |
| Real | tol, | ||
| unsigned int | derivative_order | ||
| ) |
Definition at line 76 of file MathUtils.C.
| Real MathUtils::poly3Log | ( | Real | x, |
| Real | tol, | ||
| unsigned int | derivative_order | ||
| ) |
Definition at line 104 of file MathUtils.C.
| Real MathUtils::poly4Log | ( | Real | x, |
| Real | tol, | ||
| unsigned int | derivative_order | ||
| ) |
Definition at line 133 of file MathUtils.C.
| R MathUtils::polynomial | ( | const C & | c, |
| const T | x | ||
| ) |
Evaluate a polynomial with the coefficients c at x.
Note that the Polynomial form is c[0] + c[1] * x + c[2] * x^2 + ... The coefficient container type can be any container that provides an index operator [] and a .size() method (e.g. std::vector, std::array). The return type is the supertype of the container value type and the argument x. The supertype is the type that can represent both number types.
Definition at line 333 of file MathUtils.h.
| R MathUtils::polynomialDerivative | ( | const C & | c, |
| const T | x | ||
| ) |
Returns the derivative of polynomial(c, x) with respect to x.
Definition at line 354 of file MathUtils.h.
| T MathUtils::positivePart | ( | T | x | ) |
Definition at line 156 of file MathUtils.h.
| T MathUtils::pow | ( | T | x, |
| int | e | ||
| ) |
Definition at line 92 of file MathUtils.h.
Referenced by SurfaceMeshGeneratorBase::elementSatisfiesRequirements(), ProjectedStatefulMaterialNodalPatchRecoveryTempl< T, is_ad >::evaluateBasisFunctions(), PolynomialFit::fillMatrix(), AdvancedExtruderGenerator::radialExpansionRatio(), BicubicInterpolation::sample2ndDerivative(), BicubicInterpolation::sampleDerivative(), BicubicInterpolation::sampleInternal(), BicubicInterpolation::sampleValueAndDerivativesInternal(), and PseudoTimestep::timestepEXP().
| T MathUtils::regularizedHeavyside | ( | const T & | x, |
| Real | smoothing_length | ||
| ) |
Definition at line 128 of file MathUtils.h.
| T MathUtils::regularizedHeavysideDerivative | ( | const T & | x, |
| Real | smoothing_length | ||
| ) |
Definition at line 143 of file MathUtils.h.
| T MathUtils::round | ( | T | x | ) |
Definition at line 78 of file MathUtils.h.
| T MathUtils::sign | ( | T | x | ) |
Definition at line 85 of file MathUtils.h.
Referenced by PiecewiseConstant::value().
| auto MathUtils::smootherStep | ( | const X & | x, |
| const S & | start, | ||
| const E & | end | ||
| ) |
Definition at line 407 of file MathUtils.h.
| T MathUtils::smootherStep | ( | T | x, |
| T2 | start, | ||
| T2 | end, | ||
| bool | derivative = false |
||
| ) |
Definition at line 381 of file MathUtils.h.
| Real MathUtils::taylorLog | ( | Real | x | ) |
Definition at line 172 of file MathUtils.C.
| T MathUtils::timeDerivName | ( | const T & | base_prop_name | ) |
automatic prefixing for naming material properties based on time derivatives of coupled variables/functors
Definition at line 517 of file MathUtils.h.
Referenced by GenericFunctorMaterialTempl< is_ad >::GenericFunctorMaterialTempl(), and GenericVectorFunctorMaterialTempl< is_ad >::GenericVectorFunctorMaterialTempl().
|
staticconstexpr |
std::sqrt is not constexpr, so we add sqrt(2) as a constant (used in Mandel notation)
Definition at line 26 of file MathUtils.h.
Referenced by SymmetricRankTwoTensorTempl< T >::d2thirdInvariant(), SymmetricRankTwoTensorTempl< T >::ddet(), SymmetricRankTwoTensorTempl< T >::det(), SymmetricRankTwoTensorTempl< T >::dthirdInvariant(), SymmetricRankTwoTensorTempl< T >::inverse(), SymmetricRankTwoTensorTempl< T >::mandelFactor(), SymmetricRankFourTensorTempl< T >::rotationMatrix(), SymmetricRankTwoTensorTempl< T >::thirdInvariant(), and SymmetricRankTwoTensorTempl< T >::timesTranspose().