20 #ifndef LIBMESH_VECTOR_VALUE_H 21 #define LIBMESH_VECTOR_VALUE_H 24 #include "libmesh/type_vector.h" 25 #include "libmesh/compare_types.h" 27 #ifdef LIBMESH_HAVE_METAPHYSICL 28 #include "metaphysicl/raw_type.h" 29 #include "metaphysicl/ct_types.h" 47 class VectorValue :
public TypeVector<T>
52 template <
typename T2>
76 template <
typename Scalar1,
typename Scalar2,
typename Scalar3>
79 const Scalar1>::type & x,
82 const Scalar2>::type & y = 0,
85 const Scalar3>::type & z = 0);
94 template <
typename Scalar>
98 const Scalar>::type * sfinae =
nullptr);
104 template <
typename T2>
110 template <
typename T2>
113 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 126 template <
typename Scalar>
131 { libmesh_assert_equal_to (p, Scalar(0)); this->
zero();
return *
this; }
148 template <
typename T>
156 template <
typename T>
167 template <
typename T>
168 template <
typename Scalar1,
typename Scalar2,
typename Scalar3>
172 const Scalar1>::type & x,
175 const Scalar2>::type & y,
178 const Scalar3>::type & z) :
184 template <
typename T>
185 template <
typename Scalar>
190 const Scalar>::type * ) :
195 template <
typename T>
196 template <
typename T2>
205 template <
typename T>
206 template <
typename T2>
213 #ifdef LIBMESH_USE_COMPLEX_NUMBERS 214 template <
typename T>
225 template <
typename T>
231 template <
typename T,
typename T2>
237 template <
typename T,
typename T2>
243 template <
typename T,
typename T2>
251 #ifdef LIBMESH_HAVE_METAPHYSICL 254 template <
typename T>
262 for (
unsigned int i = 0; i < LIBMESH_DIM; ++i)
263 ret(i) = raw_value(in(i));
269 template <
typename T,
typename U>
270 struct ReplaceAlgebraicType<
libMesh::VectorValue<T>, U>
277 #endif // LIBMESH_VECTOR_VALUE_H VectorValue()
Empty constructor.
RealVectorValue RealGradient
VectorValue< typename CompareTypes< T, T2 >::supertype > supertype
VectorValue< Real > RealVectorValue
Useful typedefs to allow transparent switching between Real and Complex data types.
boostcopy::enable_if_c< ScalarTraits< Scalar >::value, VectorValue & >::type operator=(const Scalar &libmesh_dbg_var(p))
Assignment-from-scalar operator.
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space.
The libMesh namespace provides an interface to certain functionality in the library.
VectorValue< T > supertype
void zero()
Set all entries of the vector to 0.
NumberVectorValue Gradient
VectorValue< typename CompareTypes< T, T2 >::supertype > supertype
This class defines a vector in LIBMESH_DIM dimensional space of type T.
VectorValue< typename CompareTypes< T, T2 >::supertype > supertype
std::complex< Real > Complex
VectorValue< Number > NumberVectorValue