#include <exact_solution.h>
Public Types | |
typedef T | value_type |
typedef std::tuple< unsigned int, unsigned int > | index_type |
Public Member Functions | |
TensorValue () | |
TensorValue (const T xx, const T xy=0, const T xz=0, const T yx=0, const T yy=0, const T yz=0, const T zx=0, const T zy=0, const T zz=0) | |
template<typename Scalar > | |
TensorValue (const Scalar xx, const Scalar xy=0, const Scalar xz=0, const Scalar yx=0, const Scalar yy=0, const Scalar yz=0, const Scalar zx=0, const Scalar zy=0, typename boostcopy::enable_if_c< ScalarTraits< Scalar >::value, const Scalar >::type zz=0) | |
template<typename T2 > | |
TensorValue (const TypeVector< T2 > &vx) | |
template<typename T2 > | |
TensorValue (const TypeVector< T2 > &vx, const TypeVector< T2 > &vy) | |
template<typename T2 > | |
TensorValue (const TypeVector< T2 > &vx, const TypeVector< T2 > &vy, const TypeVector< T2 > &vz) | |
template<typename T2 > | |
TensorValue (const TensorValue< T2 > &p) | |
template<typename T2 > | |
TensorValue (const TypeTensor< T2 > &p) | |
TensorValue (const TypeTensor< Real > &p_re, const TypeTensor< Real > &p_im) | |
template<typename Scalar > | |
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TensorValue & >::type | operator= (const Scalar &libmesh_dbg_var(p)) |
template<typename T2 > | |
void | assign (const TypeTensor< T2 > &) |
const T & | operator() (const unsigned int i, const unsigned int j) const |
T & | operator() (const unsigned int i, const unsigned int j) |
ConstTypeTensorColumn< T > | slice (const unsigned int i) const |
TypeTensorColumn< T > | slice (const unsigned int i) |
TypeVector< T > | row (const unsigned int r) const |
template<typename T2 > | |
TypeTensor< typename CompareTypes< T, T2 >::supertype > | operator+ (const TypeTensor< T2 > &) const |
template<typename T2 > | |
const TypeTensor< T > & | operator+= (const TypeTensor< T2 > &) |
template<typename T2 > | |
void | add (const TypeTensor< T2 > &) |
template<typename T2 > | |
void | add_scaled (const TypeTensor< T2 > &, const T) |
template<typename T2 > | |
TypeTensor< typename CompareTypes< T, T2 >::supertype > | operator- (const TypeTensor< T2 > &) const |
TypeTensor< T > | operator- () const |
template<typename T2 > | |
const TypeTensor< T > & | operator-= (const TypeTensor< T2 > &) |
template<typename T2 > | |
void | subtract (const TypeTensor< T2 > &) |
template<typename T2 > | |
void | subtract_scaled (const TypeTensor< T2 > &, const T) |
template<typename Scalar > | |
auto | operator* (const Scalar scalar) const -> typename boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeTensor< decltype(T() *scalar)>>::type |
template<typename T2 > | |
TypeTensor< T > | operator* (const TypeTensor< T2 > &) const |
template<typename T2 > | |
TypeVector< typename CompareTypes< T, T2 >::supertype > | operator* (const TypeVector< T2 > &) const |
template<typename Scalar , typename boostcopy::enable_if_c< ScalarTraits< Scalar >::value, int >::type = 0> | |
const TypeTensor< T > & | operator*= (const Scalar factor) |
template<typename T2 > | |
const TypeTensor< T > & | operator*= (const TypeTensor< T2 > &) |
template<typename Scalar > | |
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeTensor< typename CompareTypes< T, Scalar >::supertype > >::type | operator/ (const Scalar) const |
const TypeTensor< T > & | operator/= (const T) |
template<typename T2 > | |
CompareTypes< T, T2 >::supertype | contract (const TypeTensor< T2 > &) const |
TypeTensor< T > | transpose () const |
TypeTensor< T > | inverse () const |
void | solve (const TypeVector< T > &b, TypeVector< T > &x) const |
Real | size () const |
Real | norm () const |
Real | size_sq () const |
Real | norm_sq () const |
T | det () const |
T | tr () const |
void | zero () |
bool | operator== (const TypeTensor< T > &rhs) const |
bool | operator< (const TypeTensor< T > &rhs) const |
template<> | |
bool | operator< (const TypeTensor< Real > &rhs) const |
template<> | |
bool | operator< (const TypeTensor< Complex > &rhs) const |
bool | operator> (const TypeTensor< T > &rhs) const |
template<> | |
bool | operator> (const TypeTensor< Real > &rhs) const |
template<> | |
bool | operator> (const TypeTensor< Complex > &rhs) const |
void | print (std::ostream &os=libMesh::out) const |
void | write_unformatted (std::ostream &out, const bool newline=true) const |
Protected Attributes | |
T | _coords [LIBMESH_DIM *LIBMESH_DIM] |
This class defines a tensor in LIBMESH_DIM dimensional Real or Complex space. The typedef RealTensorValue always defines a real-valued tensor, and NumberTensorValue defines a real or complex-valued tensor depending on how the library was configured.
Definition at line 52 of file exact_solution.h.
|
inherited |
Helper typedef for generic index programming
Definition at line 121 of file type_tensor.h.
|
inherited |
Helper typedef for C++98 generic programming.
Definition at line 116 of file type_tensor.h.
|
inline |
Empty constructor. Gives the tensor 0 in LIBMESH_DIM
dimensional T space.
Definition at line 156 of file tensor_value.h.
|
inlineexplicit |
Constructor-from-T. By default sets higher dimensional entries to 0.
Definition at line 165 of file tensor_value.h.
|
inlineexplicit |
Constructor-from-scalars. By default sets higher dimensional entries to 0.
Definition at line 182 of file tensor_value.h.
|
inline |
Constructor. Takes 1 row vector for LIBMESH_DIM=1
Definition at line 212 of file tensor_value.h.
|
inline |
Constructor. Takes 2 row vectors for LIBMESH_DIM=2
Definition at line 222 of file tensor_value.h.
|
inline |
Constructor. Takes 3 row vectors for LIBMESH_DIM=3
Definition at line 233 of file tensor_value.h.
|
inline |
Copy-constructor.
Definition at line 202 of file tensor_value.h.
|
inline |
Copy-constructor.
Definition at line 245 of file tensor_value.h.
|
inline |
Constructor that takes two TypeTensor<Real>
representing the real and imaginary part as arguments.
Definition at line 254 of file tensor_value.h.
|
inlineinherited |
Add to this tensor without creating a temporary.
Definition at line 797 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords.
|
inlineinherited |
Add a scaled tensor to this tensor without creating a temporary.
Definition at line 808 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords.
Referenced by libMesh::HPCoarsenTest::add_projection(), libMesh::System::calculate_norm(), libMesh::MeshFunction::hessian(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::System::point_hessian(), and libMesh::HPCoarsenTest::select_refinement().
|
inlineinherited |
Assign to this tensor without creating a temporary.
Definition at line 668 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords.
|
inlineinherited |
Multiply 2 tensors together to return a scalar, i.e. The tensors may contain different numeric types. Also known as the "double inner product" or "double dot product" of tensors.
Multiply 2 tensors together, i.e. sum Aij*Bij. The tensors may be of different types.
Definition at line 1204 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords.
Referenced by libMesh::HPCoarsenTest::add_projection(), libMesh::TensorTools::inner_product(), and libMesh::HPCoarsenTest::select_refinement().
|
inlineinherited |
Because these are 3x3 tensors at most, we don't do an LU decomposition like DenseMatrix does.
Definition at line 1237 of file type_tensor.h.
Referenced by libMesh::Sphere::Sphere().
|
inlineinherited |
Definition at line 1037 of file type_tensor.h.
References A.
|
inlineinherited |
Definition at line 1228 of file type_tensor.h.
References libMesh::TensorTools::norm_sq().
Referenced by libMesh::System::calculate_norm().
|
inlineinherited |
Definition at line 1299 of file type_tensor.h.
References libMesh::TensorTools::norm_sq(), and libMesh::Real.
Referenced by libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::System::calculate_norm(), libMesh::ExactErrorEstimator::find_squared_element_error(), and libMesh::HPCoarsenTest::select_refinement().
|
inlineinherited |
Definition at line 678 of file type_tensor.h.
|
inlineinherited |
Definition at line 697 of file type_tensor.h.
|
inlineinherited |
Multiply this tensor by a scalar value.
Definition at line 922 of file type_tensor.h.
|
inlineinherited |
Multiply 2 tensors together, i.e. matrix-matrix product. The tensors may contain different numeric types.
Definition at line 1169 of file type_tensor.h.
|
inlineinherited |
Multiply this tensor by a vector, i.e. matrix-vector product. The tensor and vector may contain different numeric types.
Definition at line 1154 of file type_tensor.h.
|
inlineinherited |
Multiply this tensor by a scalar value in place.
Definition at line 259 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords.
|
inlineinherited |
Multiply this tensor by a tensor value in place
Definition at line 1183 of file type_tensor.h.
|
inlineinherited |
Add another tensor to this tensor.
Definition at line 751 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords.
|
inlineinherited |
|
inlineinherited |
Subtract a tensor from this tensor.
Definition at line 821 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords.
|
inlineinherited |
Definition at line 888 of file type_tensor.h.
|
inlineinherited |
Subtract from this tensor.
Definition at line 855 of file type_tensor.h.
|
inlineinherited |
Divide each entry of this tensor by a scalar value.
Definition at line 972 of file type_tensor.h.
|
inlineinherited |
Divide each entry of this tensor by a scalar value.
Definition at line 1137 of file type_tensor.h.
|
inherited |
Definition at line 113 of file type_tensor.C.
|
inherited |
Definition at line 146 of file type_tensor.C.
|
inherited |
true
if this tensor is "less" than another. Useful for sorting.
|
inline |
Assignment-from-scalar operator. Used only to zero out tensors.
Definition at line 135 of file tensor_value.h.
References libMesh::TypeTensor< T >::zero().
|
inlineinherited |
true
if two tensors are equal, false
otherwise. Definition at line 1311 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords, std::abs(), and libMesh::TOLERANCE.
|
inherited |
Definition at line 129 of file type_tensor.C.
|
inherited |
Definition at line 166 of file type_tensor.C.
|
inherited |
true
if this tensor is "greater" than another.
|
inherited |
Formatted print to a stream which defaults to libMesh::out
.
Definition at line 39 of file type_tensor.C.
|
inlineinherited |
Definition at line 737 of file type_tensor.h.
References libMesh::TypeVector< T >::_coords.
|
inlineinherited |
Definition at line 1217 of file type_tensor.h.
|
inlineinherited |
Definition at line 1288 of file type_tensor.h.
References libMesh::TensorTools::norm_sq().
|
inlineinherited |
Definition at line 717 of file type_tensor.h.
|
inlineinherited |
Definition at line 727 of file type_tensor.h.
|
inlineinherited |
Solve the 2x2 or 3x3 system of equations A*x = b for x by directly inverting A and multiplying it by b.
x
vector. Definition at line 1086 of file type_tensor.h.
|
inlineinherited |
Subtract from this tensor without creating a temporary.
Definition at line 867 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords.
|
inlineinherited |
Subtract a scaled value from this tensor without creating a temporary.
Definition at line 878 of file type_tensor.h.
References libMesh::TypeTensor< T >::_coords.
Referenced by libMesh::HPCoarsenTest::select_refinement().
|
inlineinherited |
|
inlineinherited |
Definition at line 1007 of file type_tensor.h.
|
inherited |
Unformatted print to the stream out
. Simply prints the elements of the tensor separated by spaces and newlines.
Definition at line 83 of file type_tensor.C.
|
inlineinherited |
Set all entries of the tensor to 0.
Definition at line 1277 of file type_tensor.h.
Referenced by libMesh::TensorValue< T >::operator=(), and libMesh::TypeTensor< T >::operator=().
|
protectedinherited |
The coordinates of the TypeTensor
Definition at line 438 of file type_tensor.h.
Referenced by libMesh::TypeTensor< T >::add(), libMesh::TypeTensor< T >::add_scaled(), libMesh::TypeTensor< T >::assign(), libMesh::TypeTensor< T >::contract(), libMesh::TypeTensor< T >::operator*=(), libMesh::TypeTensor< T >::operator+(), libMesh::TypeTensor< T >::operator-(), libMesh::TypeTensor< T >::operator==(), libMesh::TypeTensor< T >::subtract(), libMesh::TypeTensor< T >::subtract_scaled(), and libMesh::TypeTensor< T >::TypeTensor().