13 #include "libmesh/compare_types.h" 14 #include "libmesh/type_tensor.h" 15 #include "libmesh/tensor_tools.h" 16 #include "libmesh/dense_matrix.h" 17 #include "libmesh/elem.h" 18 #include "libmesh/point.h" 24 template <typename T, typename T2, typename std::enable_if<ScalarTraits<T>::value,
int>::type = 0>
35 template <
typename T,
typename T2>
43 template <
typename T,
typename Map>
69 using PrimitiveType =
typename MetaPhysicL::ReplaceAlgebraicType<
75 const auto dim = _mesh.dimension();
81 const Elem *
const elem = elem_arg.
elem;
90 const FaceInfo *
const fi = _mesh.faceInfo(
99 const auto flux_contrib = normal * (face_value * area_vector);
102 sum_normal_flux(i) += flux_contrib(i);
104 n_x_Sf(i,
j) += product(i,
j);
115 result(i) = dense_result(i);
120 mooseError(
"Cell center reconstruction is not implemented!");
123 template <
typename T,
typename Map>
130 template <
typename T,
typename Map>
136 return libmesh_map_find(*
this, fi->
id());
143 mooseError(
"Attempted to evaluate FaceCenteredMapFunctor '",
145 "' with an element subdomain id of '",
147 fi->
neighborPtr() ?
" or neighbor subdomain id of '" +
150 "' but that subdomain id is not one of the subdomain ids the functor is " 154 mooseError(
"Attempted access into FaceCenteredMapFunctor '",
156 "' with a key that does not yet exist in the map. Make sure to fill your " 157 "FaceCenteredMapFunctor for all elements you will attempt to access later.");
164 std::unordered_map<dof_id_type, ADRealVectorValue>>;
166 std::unordered_map<dof_id_type, RealVectorValue>>;
bool elemHasFaceInfo(const Elem &elem, const Elem *const neighbor)
TypeTensor< typename CompareTypes< T, T2 >::supertype > outer_product(const TypeVector< T > &a, const TypeVector< T2 > &b)
A functor whose evaluation relies on querying a map where the keys are face info ids and the values c...
VectorValue< Real > RealVectorValue
void mooseError(Args &&... args)
const Elem & elem() const
static constexpr std::size_t dim
TypeVector< typename CompareTypes< T, T2 >::supertype > outer_product(const T &a, const TypeVector< T2 > &b)
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
ValueType evaluate(const FaceInfo *const fi) const
Evaluate the face functor using a FaceInfo argument.
const Elem * neighborPtr() const
unsigned int which_neighbor_am_i(const Elem *e) const
const libMesh::Elem * elem
const Point & normal() const
virtual unsigned int n_sides() const=0
const Elem * neighbor_ptr(unsigned int i) const
subdomain_id_type subdomain_id() const
IntRange< T > make_range(T beg, T end)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
void cholesky_solve(const DenseVector< T2 > &b, DenseVector< T2 > &x)