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"
24template <typename T, typename T2, typename std::enable_if<ScalarTraits<T>::value,
int>::type = 0>
35template <
typename T,
typename T2>
43template <
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);
123 mooseError(
"Cell center reconstruction is not implemented!");
127template <
typename T,
typename Map>
134template <
typename T,
typename Map>
138 auto it = this->find(fi->
id());
139 if (it == this->end())
144 mooseError(
"Attempted to evaluate FaceCenteredMapFunctor '",
146 "' with an element subdomain id of '",
148 fi->
neighborPtr() ?
" or neighbor subdomain id of '" +
151 "' but that subdomain id is not one of the subdomain ids the functor is "
155 mooseError(
"Attempted access into FaceCenteredMapFunctor '",
157 "' with a key that does not yet exist in the map. Make sure to fill your "
158 "FaceCenteredMapFunctor for all elements you will attempt to access later.");
167 std::unordered_map<dof_id_type, ADRealVectorValue>>;
169 std::unordered_map<dof_id_type, RealVectorValue>>;
void mooseError(Args &&... args)
T evaluate(Real, const Point &)
A functor whose evaluation relies on querying a map where the keys are face info ids and the values c...
ValueType evaluate(const FaceInfo *const fi) const
Evaluate the face functor using a FaceInfo argument.
const Point & normal() const
const Elem & elem() const
const Elem * neighborPtr() const
void cholesky_solve(const DenseVector< T2 > &b, DenseVector< T2 > &x)
unsigned int which_neighbor_am_i(const Elem *e) const
subdomain_id_type subdomain_id() const
virtual unsigned int n_sides() const=0
const Elem * neighbor_ptr(unsigned int i) const
bool elemHasFaceInfo(const Elem &elem, const Elem *const neighbor)
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...
VectorValue< Real > RealVectorValue
TypeTensor< typename CompareTypes< T, T2 >::supertype > outer_product(const TypeVector< T > &a, const TypeVector< T2 > &b)
IntRange< T > make_range(T beg, T end)
const libMesh::Elem * elem