libMesh
|
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space. More...
#include <exact_solution.h>
Public Types | |
typedef T | value_type |
Helper typedef for C++98 generic programming. More... | |
typedef unsigned int | index_type |
Helper typedef for generic index programming. More... | |
Public Member Functions | |
VectorValue () | |
Empty constructor. More... | |
VectorValue (const T &x, const T &y=0, const T &z=0) | |
Constructor-from-T. More... | |
template<typename Scalar1 , typename Scalar2 , typename Scalar3 > | |
VectorValue (typename boostcopy::enable_if_c< ScalarTraits< Scalar1 >::value, const Scalar1 >::type &x, typename boostcopy::enable_if_c< ScalarTraits< Scalar2 >::value, const Scalar2 >::type &y=0, typename boostcopy::enable_if_c< ScalarTraits< Scalar3 >::value, const Scalar3 >::type &z=0) | |
Constructor-from-scalars. More... | |
template<typename Scalar > | |
VectorValue (const Scalar &x, typename boostcopy::enable_if_c< ScalarTraits< Scalar >::value, const Scalar >::type *sfinae=nullptr) | |
Constructor-from-scalar. More... | |
template<typename T2 > | |
VectorValue (const VectorValue< T2 > &p) | |
Copy-constructor. More... | |
template<typename T2 > | |
VectorValue (const TypeVector< T2 > &p) | |
Copy-constructor. More... | |
VectorValue (const TypeVector< Real > &p_re, const TypeVector< Real > &p_im) | |
Constructor that takes two TypeVector<Real> representing the real and imaginary part as arguments. More... | |
template<typename Scalar > | |
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, VectorValue & >::type | operator= (const Scalar &libmesh_dbg_var(p)) |
Assignment-from-scalar operator. More... | |
template<typename T2 > | |
void | assign (const TypeVector< T2 > &) |
Assign to this vector without creating a temporary. More... | |
const T & | operator() (const unsigned int i) const |
T & | operator() (const unsigned int i) |
const T & | slice (const unsigned int i) const |
T & | slice (const unsigned int i) |
template<typename T2 > | |
TypeVector< typename CompareTypes< T, T2 >::supertype > | operator+ (const TypeVector< T2 > &) const |
Add two vectors. More... | |
template<typename T2 > | |
const TypeVector< T > & | operator+= (const TypeVector< T2 > &) |
Add to this vector. More... | |
template<typename T2 > | |
void | add (const TypeVector< T2 > &) |
Add to this vector without creating a temporary. More... | |
template<typename T2 > | |
void | add_scaled (const TypeVector< T2 > &, const T &) |
Add a scaled value to this vector without creating a temporary. More... | |
template<typename T2 > | |
TypeVector< typename CompareTypes< T, T2 >::supertype > | operator- (const TypeVector< T2 > &) const |
Subtract from this vector. More... | |
TypeVector< T > | operator- () const |
template<typename T2 > | |
const TypeVector< T > & | operator-= (const TypeVector< T2 > &) |
Subtract from this vector. More... | |
template<typename T2 > | |
void | subtract (const TypeVector< T2 > &) |
Subtract from this vector without creating a temporary. More... | |
template<typename T2 > | |
void | subtract_scaled (const TypeVector< T2 > &, const T &) |
Subtract a scaled value from this vector without creating a temporary. More... | |
template<typename Scalar > | |
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< T, Scalar >::supertype > >::type | operator* (const Scalar &) const |
Multiply this vector by a scalar value. More... | |
template<typename T2 > | |
CompareTypes< T, T2 >::supertype | operator* (const TypeVector< T2 > &) const |
const TypeVector< T > & | operator*= (const T &) |
Multiply this vector by a scalar value. More... | |
template<typename Scalar > | |
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeVector< typename CompareTypes< T, Scalar >::supertype > >::type | operator/ (const Scalar &) const |
Divide each entry of this vector by scalar value. More... | |
const TypeVector< T > & | operator/= (const T &) |
Divide each entry of this vector by scalar value. More... | |
template<typename T2 > | |
CompareTypes< T, T2 >::supertype | contract (const TypeVector< T2 > &) const |
template<typename T2 > | |
TypeVector< typename CompareTypes< T, T2 >::supertype > | cross (const TypeVector< T2 > &v) const |
TypeVector< T > | unit () const |
auto | size () const -> decltype(std::norm(T())) |
auto | norm () const -> decltype(std::norm(T())) |
auto | size_sq () const -> decltype(std::norm(T())) |
auto | norm_sq () const -> decltype(std::norm(T())) |
bool | is_zero () const |
void | zero () |
Set all entries of the vector to 0. More... | |
bool | relative_fuzzy_equals (const TypeVector< T > &rhs, Real tol=TOLERANCE) const |
bool | absolute_fuzzy_equals (const TypeVector< T > &rhs, Real tol=TOLERANCE) const |
bool | operator== (const TypeVector< T > &rhs) const |
bool | operator!= (const TypeVector< T > &rhs) const |
bool | operator< (const TypeVector< T > &rhs) const |
template<> | |
bool | operator< (const TypeVector< Complex > &rhs) const |
bool | operator<= (const TypeVector< T > &rhs) const |
template<> | |
bool | operator<= (const TypeVector< Complex > &rhs) const |
bool | operator> (const TypeVector< T > &rhs) const |
template<> | |
bool | operator> (const TypeVector< Complex > &rhs) const |
bool | operator>= (const TypeVector< T > &rhs) const |
template<> | |
bool | operator>= (const TypeVector< Complex > &rhs) const |
void | print (std::ostream &os=libMesh::out) const |
Formatted print, by default to libMesh::out . More... | |
void | write_unformatted (std::ostream &out, const bool newline=true) const |
Unformatted print to the stream out . More... | |
Protected Attributes | |
T | _coords [LIBMESH_DIM] |
The coordinates of the TypeVector . More... | |
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space.
The typedef RealVectorValue always defines a real-valued vector, and NumberVectorValue defines a real or complex-valued vector depending on how the library was configured.
Definition at line 54 of file exact_solution.h.
|
inherited |
Helper typedef for generic index programming.
Definition at line 141 of file type_vector.h.
|
inherited |
Helper typedef for C++98 generic programming.
Definition at line 136 of file type_vector.h.
|
inline |
Empty constructor.
Gives the vector 0 in LIBMESH_DIM
dimensional T space.
Definition at line 139 of file vector_value.h.
|
inline |
Constructor-from-T.
By default sets higher dimensional entries to 0.
Definition at line 147 of file vector_value.h.
|
inline |
Constructor-from-scalars.
By default sets higher dimensional entries to 0.
Definition at line 159 of file vector_value.h.
|
inline |
Constructor-from-scalar.
Sets higher dimensional entries to 0. Necessary because for some reason the constructor-from-scalars alone is insufficient to let the compiler figure out VectorValue<Complex> v = 0;
Definition at line 176 of file vector_value.h.
|
inline |
Copy-constructor.
Definition at line 187 of file vector_value.h.
|
inline |
Copy-constructor.
Definition at line 197 of file vector_value.h.
|
inline |
Constructor that takes two TypeVector<Real>
representing the real and imaginary part as arguments.
Definition at line 205 of file vector_value.h.
|
inlineinherited |
true
if two vectors are equal to within an absolute tolerance of tol
. Definition at line 1017 of file type_vector.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::LocationMap< T >::find(), and libMesh::Elem::parent_bracketing_nodes().
|
inlineinherited |
Add to this vector without creating a temporary.
Definition at line 641 of file type_vector.h.
Referenced by libMesh::Elem::centroid(), libMesh::FEMap::inverse_map(), libMesh::LaplaceMeshSmoother::smooth(), and libMesh::MeshTools::Modification::smooth().
|
inlineinherited |
Add a scaled value to this vector without creating a temporary.
Definition at line 665 of file type_vector.h.
Referenced by libMesh::MeshRefinement::add_node(), libMesh::HPCoarsenTest::add_projection(), assemble_cd(), assemble_stokes(), libMesh::System::calculate_norm(), libMesh::Elem::coarsen(), compute_stresses(), libMesh::MeshFunction::discontinuous_gradient(), SolidSystem::element_time_derivative(), libMesh::MeshFunction::gradient(), libMesh::InfFEMap::inverse_map(), libMesh::InfFEMap::map(), libMesh::FEMap::map(), libMesh::FEMap::map_deriv(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::Elem::parent_bracketing_nodes(), libMesh::DynaIO::read_mesh(), libMesh::HPCoarsenTest::select_refinement(), libMesh::MeshTools::Modification::smooth(), and TypeVectorTestBase< VectorValue< Number > >::testVectorAddScaledBase().
|
inlineinherited |
Assign to this vector without creating a temporary.
Definition at line 570 of file type_vector.h.
|
inlineinherited |
Definition at line 910 of file type_vector.h.
|
inherited |
v
. Definition at line 920 of file type_vector.h.
Referenced by assemble_shell(), libMesh::FEXYZMap::compute_face_map(), libMesh::FEMap::compute_face_map(), ContainsPointTest::containsPointTri3Helper(), libMesh::Plane::create_from_three_points(), and libMesh::Quad4::volume().
|
inlineinherited |
|
inlineinherited |
Definition at line 955 of file type_vector.h.
Referenced by libMesh::Sphere::above_surface(), assemble_shell(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::System::calculate_norm(), libMesh::InfPrism::contains_point(), libMesh::InfHex::contains_point(), libMesh::InfFEMap::inverse_map(), libMesh::FEMap::inverse_map(), libMesh::Tri3::min_and_max_angle(), libMesh::Tet4::min_and_max_angle(), libMesh::Sphere::on_surface(), libMesh::Tri::quality(), libMesh::MeshTools::Modification::smooth(), libMesh::Sphere::surface_coords(), and TypeVectorTestBase< VectorValue< Number > >::testNormBase().
|
inlineinherited |
Definition at line 986 of file type_vector.h.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::System::calculate_norm(), libMesh::InfQuad4::contains_point(), libMesh::InfPrism::contains_point(), libMesh::InfHex::contains_point(), libMesh::ExactErrorEstimator::find_squared_element_error(), main(), libMesh::HPCoarsenTest::select_refinement(), libMesh::Sphere::Sphere(), and TypeVectorTestBase< VectorValue< Number > >::testNormSqBase().
|
inlineinherited |
Definition at line 1089 of file type_vector.h.
|
inlineinherited |
Definition at line 591 of file type_vector.h.
|
inlineinherited |
Definition at line 580 of file type_vector.h.
|
inlineinherited |
Multiply this vector by a scalar value.
Definition at line 777 of file type_vector.h.
|
inlineinherited |
Definition at line 888 of file type_vector.h.
|
inlineinherited |
Multiply this vector by a scalar value.
Definition at line 814 of file type_vector.h.
|
inlineinherited |
Add two vectors.
Definition at line 604 of file type_vector.h.
|
inlineinherited |
|
inlineinherited |
Definition at line 749 of file type_vector.h.
|
inlineinherited |
Subtract from this vector.
Definition at line 690 of file type_vector.h.
|
inlineinherited |
Subtract from this vector.
Definition at line 716 of file type_vector.h.
|
inlineinherited |
Divide each entry of this vector by scalar value.
Definition at line 842 of file type_vector.h.
|
inlineinherited |
Divide each entry of this vector by scalar value.
Definition at line 871 of file type_vector.h.
|
inherited |
Definition at line 140 of file type_vector.C.
|
inherited |
true
if this vector is "less" than rhs
.Useful for sorting. Also used for choosing some arbitrary basis function orientations.
Definition at line 82 of file type_vector.C.
|
inherited |
Definition at line 159 of file type_vector.C.
|
inherited |
true
if this vector is <= to rhs
.Useful for sorting. Also used for choosing some arbitrary constraint equation directions.
Definition at line 96 of file type_vector.C.
|
inline |
Assignment-from-scalar operator.
Used only to zero out vectors.
Definition at line 117 of file vector_value.h.
|
inlineinherited |
true
if this(i)==rhs(i) for each component of the vector.absolute_fuzzy_equals()
may be a more appropriate choice. Definition at line 1067 of file type_vector.h.
|
inherited |
Definition at line 178 of file type_vector.C.
|
inherited |
true
if this vector is "greater" than rhs
.Useful for sorting. Also used for choosing some arbitrary basis function orientations.
Definition at line 111 of file type_vector.C.
|
inherited |
Definition at line 197 of file type_vector.C.
|
inherited |
true
if this vector is >= rhs
.Useful for sorting. Also used for choosing some arbitrary constraint equation directions.
Definition at line 125 of file type_vector.C.
|
inherited |
|
inlineinherited |
true
if two vectors are equal to within a relative tolerance of tol
. Definition at line 1042 of file type_vector.h.
Referenced by libMesh::Quad4::has_affine_map(), libMesh::Prism6::has_affine_map(), libMesh::Quad9::has_affine_map(), libMesh::Quad8::has_affine_map(), libMesh::Hex8::has_affine_map(), libMesh::Hex20::has_affine_map(), libMesh::Hex27::has_affine_map(), libMesh::Prism18::has_affine_map(), libMesh::Prism15::has_affine_map(), libMesh::Quad4::volume(), and libMesh::Tri6::volume().
|
inlineinherited |
Definition at line 944 of file type_vector.h.
Referenced by libMesh::DofMap::allgather_recursive_constraints(), assemble_poisson(), libMesh::DofMap::get_info(), libMesh::InfFEMap::inverse_map(), libMesh::FEInterface::inverse_map(), libMesh::Parallel::sync_dofobject_data_by_xyz(), and SlitMeshRefinedSystemTest::testRestart().
|
inlineinherited |
Definition at line 975 of file type_vector.h.
|
inlineinherited |
Definition at line 180 of file type_vector.h.
|
inlineinherited |
Definition at line 174 of file type_vector.h.
|
inlineinherited |
Subtract from this vector without creating a temporary.
Definition at line 728 of file type_vector.h.
|
inlineinherited |
Subtract a scaled value from this vector without creating a temporary.
Definition at line 739 of file type_vector.h.
Referenced by libMesh::HPCoarsenTest::select_refinement().
|
inlineinherited |
Definition at line 1158 of file type_vector.h.
Referenced by libMesh::FEXYZMap::compute_face_map(), libMesh::FEMap::compute_face_map(), ContainsPointTest::containsPointTri3Helper(), libMesh::Plane::create_from_point_normal(), libMesh::Plane::create_from_three_points(), libMesh::MeshTools::Modification::distort(), AzimuthalPeriodicBoundary::get_rotation_matrix(), and libMesh::Sphere::unit_normal().
|
inherited |
Unformatted print to the stream out
.
Simply prints the elements of the vector separated by spaces. Also prints a newline by default, however, this behavior can be controlled with the newline
parameter.
Definition at line 65 of file type_vector.C.
Referenced by libMesh::InfElemBuilder::build_inf_elem(), and libMesh::TecplotIO::write_ascii().
|
inlineinherited |
Set all entries of the vector to 0.
Definition at line 964 of file type_vector.h.
Referenced by libMesh::VectorValue< Real >::operator=(), libMesh::TypeVector< Real >::operator=(), and TypeVectorTestBase< VectorValue< Number > >::testZeroBase().
|
protectedinherited |
The coordinates of the TypeVector
.
Definition at line 445 of file type_vector.h.
Referenced by libMesh::TypeTensor< T >::row().