libMesh
|
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space. More...
#include <exact_solution.h>
Classes | |
struct | rebind |
Public Types | |
typedef T | value_type |
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 | norm () const -> decltype(std::norm(T())) |
auto | norm_sq () const -> decltype(std::norm(T())) |
auto | l1_norm () const |
template<> | |
auto | l1_norm () const |
template<> | |
auto | l1_norm () const |
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_stream, 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 47 of file exact_solution.h.
|
inherited |
Helper typedef for generic index programming.
Definition at line 120 of file type_vector.h.
typedef T libMesh::VectorValue< T >::value_type |
Definition at line 50 of file vector_value.h.
|
inline |
Empty constructor.
Gives the vector 0 in LIBMESH_DIM
dimensional T space.
Definition at line 150 of file vector_value.h.
|
inline |
Constructor-from-T.
By default sets higher dimensional entries to 0.
Definition at line 158 of file vector_value.h.
|
inline |
Constructor-from-scalars.
By default sets higher dimensional entries to 0.
Definition at line 170 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 187 of file vector_value.h.
|
inline |
Copy-constructor.
Definition at line 198 of file vector_value.h.
|
inline |
Copy-constructor.
Definition at line 208 of file vector_value.h.
|
inline |
Constructor that takes two TypeVector<Real>
representing the real and imaginary part as arguments.
Definition at line 216 of file vector_value.h.
|
inlineinherited |
true
if two vectors are equal to within an absolute tolerance of tol
. Definition at line 970 of file type_vector.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints(), libMesh::LocationMap< T >::find(), libMesh::Pyramid::local_singular_node(), libMesh::Elem::parent_bracketing_nodes(), VolumeTest::test_true_centroid_and_volume(), MeshTriangulationTest::testFoundCenters(), and VolumeTest::testQuad4TrueCentroid().
|
inlineinherited |
Add to this vector without creating a temporary.
Definition at line 603 of file type_vector.h.
Referenced by libMesh::FEMap::inverse_map(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::MeshTools::Modification::smooth(), and libMesh::Elem::vertex_average().
|
inlineinherited |
Add a scaled value to this vector without creating a temporary.
Definition at line 627 of file type_vector.h.
Referenced by libMesh::MeshFunction::_gradient_on_elem(), libMesh::MeshRefinement::add_node(), libMesh::HPCoarsenTest::add_projection(), assemble_cd(), assemble_stokes(), InfFERadialTest::base_point(), libMesh::Elem::coarsen(), compute_stresses(), SolidSystem::element_time_derivative(), 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::ExodusII_IO::read(), libMesh::DynaIO::read_mesh(), libMesh::HPCoarsenTest::select_refinement(), libMesh::MeshTools::Modification::smooth(), TypeVectorTestBase< VectorValue< Number > >::testVectorAddScaled(), and TypeVectorTestBase< VectorValue< Number > >::testVectorAddScaledBase().
|
inlineinherited |
Assign to this vector without creating a temporary.
Definition at line 532 of file type_vector.h.
|
inlineinherited |
Definition at line 872 of file type_vector.h.
|
inherited |
v
. Definition at line 882 of file type_vector.h.
Referenced by libMesh::TriangulatorInterface::Hole::areavec(), assemble_shell(), libMesh::InfFE< Dim, T_radial, T_map >::compute_face_functions(), libMesh::FEMap::compute_face_map(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_functions(), ContainsPointTest::containsPointTri3Helper(), libMesh::Plane::create_from_three_points(), libMesh::Quad4::has_invertible_map(), libMesh::TriangulatorInterface::MeshedHole::MeshedHole(), libMesh::Quad::quality(), libMesh::Face::quasicircumcenter(), and libMesh::Quad4::volume().
|
inlineinherited |
Definition at line 945 of file type_vector.h.
|
inherited |
Definition at line 227 of file type_vector.C.
|
inherited |
Definition at line 959 of file type_vector.h.
|
inherited |
|
inlineinherited |
Definition at line 905 of file type_vector.h.
Referenced by libMesh::Sphere::above_surface(), libMesh::TriangulatorInterface::Hole::area(), assemble_shell(), InfFERadialTest::base_point(), libMesh::InfElemBuilder::build_inf_elem(), libMesh::InfFE< Dim, T_radial, T_map >::compute_shape_functions(), libMesh::InfPrism::contains_point(), libMesh::InfHex::contains_point(), libMesh::Quad4::has_invertible_map(), libMesh::Edge4::has_invertible_map(), 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::Quad::quality(), libMesh::MeshTools::Modification::smooth(), libMesh::Sphere::surface_coords(), InfFERadialTest::testInfQuants(), InfFERadialTest::testInfQuants_numericDeriv(), TypeVectorTestBase< VectorValue< Number > >::testNormBase(), and MeshTriangulationTest::testTriangulatorRoundHole().
|
inlineinherited |
Definition at line 924 of file type_vector.h.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::InfQuad4::contains_point(), libMesh::InfPrism::contains_point(), libMesh::InfHex::contains_point(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::Edge3::has_invertible_map(), libMesh::PointLocatorNanoflann::kdtree_distance(), main(), libMesh::Face::quasicircumcenter(), libMesh::HPCoarsenTest::select_refinement(), libMesh::Sphere::Sphere(), InfFERadialTest::testInfQuants(), InfFERadialTest::testInfQuants_numericDeriv(), TypeVectorTestBase< VectorValue< Number > >::testNormSqBase(), MeshTriangulationTest::testTriangulatorRoundHole(), and libMesh::Edge3::volume().
|
inlineinherited |
Definition at line 1010 of file type_vector.h.
|
inlineinherited |
Definition at line 542 of file type_vector.h.
|
inlineinherited |
Definition at line 553 of file type_vector.h.
|
inlineinherited |
Multiply this vector by a scalar value.
Definition at line 739 of file type_vector.h.
|
inlineinherited |
Definition at line 850 of file type_vector.h.
|
inlineinherited |
Multiply this vector by a scalar value.
Definition at line 776 of file type_vector.h.
|
inlineinherited |
Add two vectors.
Definition at line 566 of file type_vector.h.
|
inlineinherited |
Add to this vector.
Definition at line 591 of file type_vector.h.
|
inlineinherited |
Subtract from this vector.
Definition at line 652 of file type_vector.h.
|
inlineinherited |
Definition at line 711 of file type_vector.h.
|
inlineinherited |
Subtract from this vector.
Definition at line 678 of file type_vector.h.
|
inlineinherited |
Divide each entry of this vector by scalar value.
Definition at line 804 of file type_vector.h.
|
inlineinherited |
Divide each entry of this vector by scalar value.
Definition at line 833 of file type_vector.h.
|
inherited |
Definition at line 148 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 90 of file type_vector.C.
|
inherited |
Definition at line 167 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 104 of file type_vector.C.
|
inline |
Assignment-from-scalar operator.
Used only to zero out vectors.
Definition at line 130 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 988 of file type_vector.h.
|
inherited |
Definition at line 186 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 119 of file type_vector.C.
|
inherited |
Definition at line 205 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 133 of file type_vector.C.
|
inherited |
|
inlineinherited |
true
if two vectors are equal to within a relative tolerance of tol
. Definition at line 979 of file type_vector.h.
Referenced by libMesh::Edge3::has_affine_map(), libMesh::Quad4::has_affine_map(), libMesh::Edge4::has_affine_map(), libMesh::Quad9::has_affine_map(), libMesh::Quad8::has_affine_map(), libMesh::Prism6::has_affine_map(), libMesh::Hex8::has_affine_map(), libMesh::Tri6::has_affine_map(), libMesh::Tri7::has_affine_map(), libMesh::Hex27::has_affine_map(), libMesh::Hex20::has_affine_map(), libMesh::Tet10::has_affine_map(), libMesh::Prism15::has_affine_map(), libMesh::Prism18::has_affine_map(), libMesh::Tet14::has_affine_map(), libMesh::Prism20::has_affine_map(), libMesh::Prism21::has_affine_map(), libMesh::Quad4::volume(), and libMesh::Tri6::volume().
|
inlineinherited |
Definition at line 158 of file type_vector.h.
|
inlineinherited |
Definition at line 164 of file type_vector.h.
|
inlineinherited |
Subtract from this vector without creating a temporary.
Definition at line 690 of file type_vector.h.
|
inlineinherited |
Subtract a scaled value from this vector without creating a temporary.
Definition at line 701 of file type_vector.h.
Referenced by libMesh::HPCoarsenTest::select_refinement().
|
inlineinherited |
Definition at line 1079 of file type_vector.h.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::compute_face_functions(), libMesh::FEMap::compute_face_map(), ContainsPointTest::containsPointTri3Helper(), libMesh::Plane::create_from_point_normal(), libMesh::Plane::create_from_three_points(), libMesh::MeshTools::Modification::distort(), libMesh::Elem::quality(), AzimuthalPeriodicBoundary::set_up_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 75 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 914 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 415 of file type_vector.h.
Referenced by libMesh::TypeTensor< T >::column(), and libMesh::TypeTensor< T >::row().