23 #include "libmesh/numeric_vector.h" 28 using namespace Moose;
32 template <
typename OutputType>
37 params.
set<
bool>(
"fv") =
true;
40 params.template addParam<bool>(
41 "two_term_boundary_expansion",
43 "Whether to use a two-term Taylor expansion to calculate boundary face values. " 44 "If the two-term expansion is used, then the boundary face value depends on the " 45 "adjoining cell center gradient, which itself depends on the boundary face value. " 46 "Consequently an implicit solve is used to simultaneously solve for the adjoining cell " 47 "center gradient and boundary face value(s).");
48 MooseEnum face_interp_method(
"average skewness-corrected",
"average");
49 params.template addParam<MooseEnum>(
"face_interp_method",
51 "Switch that can select between face interpolation methods.");
52 params.template addParam<bool>(
53 "cache_cell_gradients",
true,
"Whether to cache cell gradients or re-compute them.");
57 "ElementSideNeighborLayers",
62 unsigned short layers = 1;
63 if (obj_params.
get<
MooseEnum>(
"face_interp_method") ==
"skewness-corrected")
66 rm_params.
set<
unsigned short>(
"layers") = layers;
71 template <
typename OutputType>
74 _solution(this->_sys.currentSolution()),
81 _grad_phi_face_neighbor(
87 _two_term_boundary_expansion(this->isParamValid(
"two_term_boundary_expansion")
88 ? this->template getParam<bool>(
"two_term_boundary_expansion")
90 _cache_cell_gradients(this->isParamValid(
"cache_cell_gradients")
91 ? this->template getParam<bool>(
"cache_cell_gradients")
94 _element_data = std::make_unique<MooseVariableDataFV<OutputType>>(
96 _neighbor_data = std::make_unique<MooseVariableDataFV<OutputType>>(
101 const auto & interp_method = this->
template getParam<MooseEnum>(
"face_interp_method");
102 if (interp_method ==
"average")
104 else if (interp_method ==
"skewness-corrected")
111 template <
typename OutputType>
115 _element_data->clearDofIndices();
118 template <
typename OutputType>
125 template <
typename OutputType>
129 return _element_data->getElementalValue(elem,
Moose::Old,
idx);
132 template <
typename OutputType>
139 template <
typename OutputType>
143 _element_data->insert(residual);
146 template <
typename OutputType>
153 template <
typename OutputType>
157 _element_data->add(residual);
160 template <
typename OutputType>
164 return _element_data->dofValues();
167 template <
typename OutputType>
171 return _element_data->dofValuesOld();
174 template <
typename OutputType>
178 return _element_data->dofValuesOlder();
181 template <
typename OutputType>
185 return _element_data->dofValuesPreviousNL();
188 template <
typename OutputType>
192 return _neighbor_data->dofValues();
195 template <
typename OutputType>
199 return _neighbor_data->dofValuesOld();
202 template <
typename OutputType>
206 return _neighbor_data->dofValuesOlder();
209 template <
typename OutputType>
213 return _neighbor_data->dofValuesPreviousNL();
216 template <
typename OutputType>
220 return _element_data->dofValuesDot();
223 template <
typename OutputType>
227 return _element_data->dofValuesDotDot();
230 template <
typename OutputType>
234 return _element_data->dofValuesDotOld();
237 template <
typename OutputType>
241 return _element_data->dofValuesDotDotOld();
244 template <
typename OutputType>
248 return _neighbor_data->dofValuesDot();
251 template <
typename OutputType>
255 return _neighbor_data->dofValuesDotDot();
258 template <
typename OutputType>
262 return _neighbor_data->dofValuesDotOld();
265 template <
typename OutputType>
269 return _neighbor_data->dofValuesDotDotOld();
272 template <
typename OutputType>
276 return _element_data->dofValuesDuDotDu();
279 template <
typename OutputType>
283 return _element_data->dofValuesDuDotDotDu();
286 template <
typename OutputType>
290 return _neighbor_data->dofValuesDuDotDu();
293 template <
typename OutputType>
297 return _neighbor_data->dofValuesDuDotDotDu();
300 template <
typename OutputType>
304 _element_data->prepareIC();
307 template <
typename OutputType>
312 _element_data->computeValues();
315 template <
typename OutputType>
320 _element_data->computeValues();
323 template <
typename OutputType>
328 _neighbor_data->computeValues();
331 template <
typename OutputType>
336 _neighbor_data->computeValues();
339 template <
typename OutputType>
346 const auto facetype = fi.
faceType(std::make_pair(this->number(), this->sys().number()));
351 _element_data->computeValuesFace(fi);
352 _neighbor_data->computeValuesFace(fi);
355 _element_data->computeValuesFace(fi);
357 _neighbor_data->computeValuesFace(fi);
359 mooseError(
"robert wrote broken MooseVariableFV code");
362 template <
typename OutputType>
367 mooseAssert(this->_dof_indices.size() == 1,
"Wrong size for dof indices");
368 OutputType
value = (*this->_sys.currentSolution())(this->_dof_indices[0]);
372 template <
typename OutputType>
379 template <
typename OutputType>
383 mooseError(
"FV variables do not support setNodalValue");
386 template <
typename OutputType>
390 _element_data->setDofValue(
value, index);
393 template <
typename OutputType>
397 _element_data->setDofValues(values);
400 template <
typename OutputType>
407 template <
typename OutputType>
408 std::pair<bool, const FVDirichletBCBase *>
412 if (
auto it = _boundary_id_to_dirichlet_bc.find(bnd_id);
413 it != _boundary_id_to_dirichlet_bc.end())
414 return {
true, it->second};
416 return {
false,
nullptr};
419 template <
typename OutputType>
420 std::pair<bool, std::vector<const FVFluxBC *>>
424 if (
auto it = _boundary_id_to_flux_bc.find(bnd_id); it != _boundary_id_to_flux_bc.end())
425 return {
true, it->second};
427 return std::make_pair(
false, std::vector<const FVFluxBC *>());
430 template <
typename OutputType>
435 "The elem shall exist! This typically occurs when the " 436 "user wants to evaluate non-existing elements (nullptr) at physical boundaries.");
438 this->hasBlocks(elem->subdomain_id()),
439 "The variable should be defined on the element's subdomain! This typically occurs when the " 440 "user wants to evaluate the elements right next to the boundary of two variables (block " 441 "boundary). The subdomain which is queried: " +
442 Moose::stringify(this->activeSubdomains()) +
" the subdomain of the element " +
443 std::to_string(elem->subdomain_id()));
448 this->_dof_indices.size() == 1,
449 "There should only be one dof-index for a constant monomial variable on any given element");
457 const auto & global_soln =
459 ? *this->_sys.currentSolution()
464 if (ADReal::do_derivatives && state.
state == 0 &&
465 this->_sys.number() == this->_subproblem.currentNlSysNum())
471 template <
typename OutputType>
477 const auto & pr = getDirichletBC(fi);
483 template <
typename OutputType>
486 const Elem *
const libmesh_dbg_var(elem),
489 mooseAssert(isDirichletBoundaryFace(fi, elem, state),
490 "This function should only be called on Dirichlet boundary faces.");
492 const auto & diri_pr = getDirichletBC(fi);
494 mooseAssert(diri_pr.first,
495 "This functor should only be called if we are on a Dirichlet boundary face.");
502 template <
typename OutputType>
505 const Elem *
const elem,
508 if (isDirichletBoundaryFace(fi, elem, state))
511 return !this->isInternalFace(fi);
514 template <
typename OutputType>
517 const bool two_term_expansion,
518 const bool correct_skewness,
519 const Elem * elem_to_extrapolate_from,
523 isExtrapolatedBoundaryFace(fi, elem_to_extrapolate_from, state) || !two_term_expansion,
524 "We allow Dirichlet boundary conditions to call this method. However, the only way to " 525 "ensure we don't have infinite recursion, with Green Gauss gradients calling back to the " 526 "Dirichlet boundary condition calling back to this method, is to do a one term expansion");
529 bool elem_to_extrapolate_from_is_fi_elem;
530 std::tie(elem_to_extrapolate_from, elem_to_extrapolate_from_is_fi_elem) =
531 [
this, &fi, elem_to_extrapolate_from]() -> std::pair<const Elem *, bool>
533 if (elem_to_extrapolate_from)
535 return {elem_to_extrapolate_from, elem_to_extrapolate_from == fi.
elemPtr()};
538 const auto [elem_guaranteed_to_have_dofs,
540 elem_guaranteed_to_have_dofs_is_fi_elem] =
546 return {elem_guaranteed_to_have_dofs, elem_guaranteed_to_have_dofs_is_fi_elem};
550 if (two_term_expansion)
552 const Point vector_to_face = elem_to_extrapolate_from_is_fi_elem
555 boundary_value = adGradSln(elem_to_extrapolate_from, state, correct_skewness) * vector_to_face +
556 getElemValue(elem_to_extrapolate_from, state);
559 boundary_value = getElemValue(elem_to_extrapolate_from, state);
561 return boundary_value;
564 template <
typename OutputType>
568 const bool correct_skewness)
const 570 mooseAssert(!this->isInternalFace(fi),
571 "A boundary face value has been requested on an internal face.");
573 if (isDirichletBoundaryFace(fi,
nullptr, state))
574 return getDirichletBoundaryFaceValue(fi,
nullptr, state);
575 else if (isExtrapolatedBoundaryFace(fi,
nullptr, state))
576 return getExtrapolatedBoundaryFaceValue(
577 fi, _two_term_boundary_expansion, correct_skewness,
nullptr, state);
582 template <
typename OutputType>
583 const VectorValue<ADReal> &
586 const bool correct_skewness)
const 590 if (_cache_cell_gradients && !correct_skewness && state.
state == 0)
592 auto it = _elem_to_grad.find(elem);
594 if (it != _elem_to_grad.end())
599 ElemArg({elem, correct_skewness}), state, *
this, _two_term_boundary_expansion, this->_mesh);
601 if (_cache_cell_gradients && !correct_skewness && state.
state == 0)
603 auto pr = _elem_to_grad.emplace(elem, std::move(grad));
604 mooseAssert(pr.second,
"Insertion should have just happened.");
605 return pr.first->second;
609 _temp_cell_gradient = std::move(grad);
610 return _temp_cell_gradient;
614 template <
typename OutputType>
618 const bool correct_skewness)
const 620 const bool var_defined_on_elem = this->hasBlocks(fi.
elem().subdomain_id());
621 const Elem *
const elem_one = var_defined_on_elem ? &fi.
elem() : fi.
neighborPtr();
622 const Elem *
const elem_two = var_defined_on_elem ? fi.
neighborPtr() : &fi.
elem();
624 const VectorValue<ADReal> elem_one_grad = adGradSln(elem_one, state, correct_skewness);
629 if (elem_two && this->hasBlocks(elem_two->subdomain_id()))
631 const VectorValue<ADReal> & elem_two_grad = adGradSln(elem_two, state, correct_skewness);
637 return elem_one_grad;
640 template <
typename OutputType>
644 const bool correct_skewness)
const 646 const bool var_defined_on_elem = this->hasBlocks(fi.
elem().subdomain_id());
647 const Elem *
const elem = &fi.
elem();
650 const bool is_internal_face = this->isInternalFace(fi);
652 const ADReal side_one_value = (!is_internal_face && !var_defined_on_elem)
653 ? getBoundaryFaceValue(fi, state, correct_skewness)
654 : getElemValue(elem, state);
655 const ADReal side_two_value = (var_defined_on_elem && !is_internal_face)
656 ? getBoundaryFaceValue(fi, state, correct_skewness)
657 : getElemValue(neighbor, state);
660 this->isInternalFace(fi)
668 auto face_grad = ((side_two_value - side_one_value) / delta) * fi.
eCN();
671 if (this->_mesh.dimension() > 1)
675 const auto & interpolated_gradient = uncorrectedAdGradSln(fi, state, correct_skewness);
676 face_grad += interpolated_gradient - (interpolated_gradient * fi.
eCN()) * fi.
eCN();
682 template <
typename OutputType>
686 if (!_dirichlet_map_setup)
687 determineBoundaryToDirichletBCMap();
688 if (!_flux_map_setup)
689 determineBoundaryToFluxBCMap();
694 template <
typename OutputType>
701 template <
typename OutputType>
705 _elem_to_grad.clear();
708 template <
typename OutputType>
712 unsigned int state = 0;
713 state =
std::max(state, _element_data->oldestSolutionStateRequested());
714 state =
std::max(state, _neighbor_data->oldestSolutionStateRequested());
718 template <
typename OutputType>
722 _element_data->clearDofIndices();
723 _neighbor_data->clearDofIndices();
726 template <
typename OutputType>
731 mooseAssert(fi,
"The face information must be non-null");
732 if (isDirichletBoundaryFace(*fi, face.
face_side, state))
733 return getDirichletBoundaryFaceValue(*fi, face.
face_side, state);
734 else if (isExtrapolatedBoundaryFace(*fi, face.
face_side, state))
736 bool two_term_boundary_expansion = _two_term_boundary_expansion;
740 two_term_boundary_expansion =
false;
741 return getExtrapolatedBoundaryFaceValue(
746 mooseAssert(this->isInternalFace(*fi),
747 "We must be either Dirichlet, extrapolated, or internal");
752 template <
typename OutputType>
756 const auto & node_to_elem_map = this->_mesh.nodeToElemMap();
757 const auto & elem_ids = libmesh_map_find(node_to_elem_map, node_arg.
node->
id());
760 mooseAssert(elem_ids.size(),
"There should always be at least one element connected to a node");
761 for (
const auto elem_id : elem_ids)
763 const Elem *
const elem = this->_mesh.queryElemPtr(elem_id);
764 mooseAssert(elem,
"We should have this element available");
765 if (!this->hasBlocks(elem->subdomain_id()))
769 const auto weight = 1 / (*node_arg.
node - elem->vertex_average()).
norm();
770 sum +=
weight * (*this)(elem_point, state);
776 template <
typename OutputType>
780 mooseError(
"evaluateDot not implemented for this class of finite volume variables");
787 const Elem *
const elem = elem_arg.
elem;
788 mooseAssert(state.
state == 0,
789 "We dot not currently support any time derivative evaluations other than for the " 790 "current time-step");
792 "A time derivative is being requested but we do not have a time integrator so we'll " 793 "have no idea how to compute it");
799 "There should only be one dof-index for a constant monomial variable on any given element");
806 if (ADReal::do_derivatives && state.
state == 0 &&
821 mooseAssert(fi,
"The face information must be non-null");
827 "If we are an extrapolated boundary face, then our FunctorBase::checkFace method " 828 "should have assigned a non-null element that we are defined on");
837 "We must be either Dirichlet, extrapolated, or internal");
838 return Moose::FV::interpolate<ADReal, FunctorEvaluationKind::Dot>(*
this, face, state);
849 template <
typename OutputType>
853 _element_data->prepareAux();
854 _neighbor_data->prepareAux();
857 template <
typename OutputType>
861 mooseAssert(!Threads::in_threads,
862 "This routine has not been implemented for threads. Please query this routine before " 863 "a threaded region or contact a MOOSE developer to discuss.");
865 _boundary_id_to_dirichlet_bc.clear();
866 std::vector<FVDirichletBCBase *> bcs;
872 const auto base_query = this->_subproblem.getMooseApp()
875 .template condition<AttribSystem>(
"FVDirichletBC")
876 .
template condition<AttribThread>(_tid)
877 .template condition<AttribVar>(_var_num)
878 .
template condition<AttribSysNum>(this->_sys.number());
880 for (
const auto bnd_id : this->_mesh.getBoundaryIDs())
882 auto base_query_copy = base_query;
883 base_query_copy.template condition<AttribBoundaries>(std::set<BoundaryID>({bnd_id}))
885 mooseAssert(bcs.size() <= 1,
"cannot have multiple dirichlet BCs on the same boundary");
887 _boundary_id_to_dirichlet_bc.emplace(bnd_id, bcs[0]);
890 _dirichlet_map_setup =
true;
893 template <
typename OutputType>
897 mooseAssert(!Threads::in_threads,
898 "This routine has not been implemented for threads. Please query this routine before " 899 "a threaded region or contact a MOOSE developer to discuss.");
901 _boundary_id_to_flux_bc.clear();
902 std::vector<const FVFluxBC *> bcs;
908 const auto base_query = this->_subproblem.getMooseApp()
911 .template condition<AttribSystem>(
"FVFluxBC")
912 .
template condition<AttribThread>(_tid)
913 .template condition<AttribVar>(_var_num)
914 .
template condition<AttribSysNum>(this->_sys.number());
916 for (
const auto bnd_id : this->_mesh.getBoundaryIDs())
918 auto base_query_copy = base_query;
919 base_query_copy.template condition<AttribBoundaries>(std::set<BoundaryID>({bnd_id}))
922 _boundary_id_to_flux_bc.emplace(bnd_id, bcs);
925 _flux_map_setup =
true;
928 template <
typename OutputType>
932 _element_data->sizeMatrixTagData();
933 _neighbor_data->sizeMatrixTagData();
void initDofIndices(T &data, const Elem &elem)
const Elem *const & elem() const
Return the current element.
Moose::FV::InterpMethod _face_interp_method
Decides if an average or skewed corrected average is used for the face interpolation.
const DoFValue & dofValues() const override
dof values getters
const DoFValue & dofValuesPreviousNLNeighbor() const override
void determineBoundaryToFluxBCMap()
Setup the boundary to Flux BC map.
const std::set< BoundaryID > & boundaryIDs() const
Const getter for every associated boundary ID.
virtual void computeNeighborValues() override
Compute values at quadrature points for the neighbor.
const DoFValue & dofValuesOld() const override
virtual void prepareAux() override final
void clearDofIndices() override
Clear out the dof indices.
Class for stuff related to variables.
ADReal _ad_real_dummy
A dummy ADReal variable.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
const libMesh::Elem * face_side
A member that can be used to indicate whether there is a sidedness to this face.
virtual unsigned int currentNlSysNum() const =0
std::unique_ptr< MooseVariableDataFV< OutputType > > _neighbor_data
Holder for all the data associated with the neighbor element.
const MooseArray< libMesh::Number > & dofValuesDuDotDu() const override
std::tuple< const Elem *, const Elem *, bool > determineElemOneAndTwo(const FaceInfo &fi, const FVVar &var)
This utility determines element one and element two given a FaceInfo fi and variable var...
const Elem & elem() const
libMesh::VectorValue< T > greenGaussGradient(const ElemArg &elem_arg, const StateArg &state_arg, const FunctorBase< T > &functor, const bool two_term_boundary_expansion, const MooseMesh &mesh, const bool force_green_gauss=false)
Compute a cell gradient using the method of Green-Gauss.
void determineBoundaryToDirichletBCMap()
Setup the boundary to Dirichlet BC map.
const Point & faceCentroid() const
Returns the coordinates of the face centroid.
Base class for finite volume Dirichlet boundaray conditions.
bool correct_skewness
Whether to perform skew correction.
virtual void sizeMatrixTagData() override
Size data structures related to matrix tagging.
OutputTools< OutputType >::OutputGradient getGradient(const Elem *elem) const
Compute the variable gradient value at a point on an element.
virtual void insertLower(libMesh::NumericVector< libMesh::Number > &vector) override
Insert the currently cached degree of freedom values for a lower-dimensional element into the provide...
ValueType evaluate(const ElemArg &elem, const StateArg &) const override final
Evaluate the functor with a given element.
const DoFValue & dofValuesDotDotOld() const override
const Point & neighborCentroid() const
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
virtual void add(libMesh::NumericVector< libMesh::Number > &vector) override
Add the currently cached degree of freedom values into the provided vector.
virtual void prepareIC() override
Prepare the initial condition.
libMesh::CompareTypes< T, T2 >::supertype linearInterpolation(const T &value1, const T2 &value2, const FaceInfo &fi, const bool one_is_elem, const InterpMethod interp_method=InterpMethod::Average)
A simple linear interpolation of values between cell centers to a cell face.
const DoFValue & dofValuesDotOld() const override
DualNumber< Real, DNDerivativeType, true > ADReal
const libMesh::Node * node
The node which defines our location in space.
std::pair< bool, std::vector< const FVFluxBC * > > getFluxBCs(const FaceInfo &fi) const
ADReal getElemValue(const Elem *elem, const StateArg &state) const
Get the solution value for the provided element and seed the derivative for the corresponding dof ind...
auto max(const L &left, const R &right)
std::vector< dof_id_type > _dof_indices
DOF indices.
Moose::DOFType< Real >::type OutputData
const DoFValue & dofValuesDotDot() const override
virtual bool isDirichletBoundaryFace(const FaceInfo &fi, const Elem *elem, const Moose::StateArg &state) const
Determine whether a specified face side is a Dirichlet boundary face.
static InputParameters validParams()
OutputData getElementalValueOld(const Elem *elem, unsigned int idx=0) const
Get the old value of this variable on an element.
bool isInternalFace(const FaceInfo &) const
Returns true if the face is an internal face.
This data structure is used to store geometric and variable related metadata about each cell face in ...
std::pair< bool, const FVDirichletBCBase * > getDirichletBC(const FaceInfo &fi) const
MooseVariableFV(const InputParameters ¶meters)
void libmesh_ignore(const Args &...)
OutputType getValue(const Elem *elem) const
Note: const monomial is always the case - higher order solns are reconstructed - so this is simpler f...
const MooseArray< libMesh::Number > & dofValuesDuDotDotDu() const override
const MooseArray< libMesh::Number > & dofValuesDuDotDuNeighbor() const override
void clearCaches()
clear finite volume caches
const Elem * neighborPtr() const
const Point & elemCentroid() const
Returns the element centroids of the elements on the elem and neighbor sides of the face...
virtual VectorValue< ADReal > uncorrectedAdGradSln(const FaceInfo &fi, const StateArg &state, const bool correct_skewness=false) const
Retrieve (or potentially compute) the uncorrected gradient on the provided face.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::unique_ptr< MooseVariableDataFV< OutputType > > _element_data
Holder for all the data associated with the "main" element.
SubProblem & _subproblem
Problem this variable is part of.
A structure defining a "face" evaluation calling argument for Moose functors.
const FaceInfo * fi
a face information object which defines our location in space
virtual void computeADTimeDerivatives(ADReal &ad_u_dot, const dof_id_type &dof, ADReal &ad_u_dot_dot) const =0
method for computing local automatic differentiation time derivatives
const Real & dt() const
Returns the time step size.
const DoFValue & dofValuesDotNeighbor() const override
SystemBase & _sys
System this variable is part of.
SolutionIterationType iteration_type
The solution iteration type, e.g. time or nonlinear.
virtual NumericVector< Number > * solutionUDot()
typename MooseVariableField< OutputType >::OutputData OutputData
const DoFValue & dofValuesOlderNeighbor() const override
registerMooseObject("MooseApp", MooseVariableFVReal)
const libMesh::Elem * elem
virtual void jacobianSetup() override
const MooseArray< libMesh::Number > & dofValuesDuDotDotDuNeighbor() const override
virtual void setLowerDofValues(const DenseVector< OutputData > &values) override
Set local DOF values for a lower dimensional element and evaluate the values on quadrature points...
const DoFValue & dofValuesPreviousNL() const override
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
virtual void computeFaceValues(const FaceInfo &fi) override
Initializes/computes variable values from the solution vectors for the face represented by fi...
bool isExtrapolatedBoundaryFace(const FaceInfo &fi, const Elem *elem, const Moose::StateArg &state) const override
Returns whether this is an extrapolated boundary face.
Moose::FV::LimiterType limiter_type
a limiter which defines how the functor evaluated on either side of the face should be interpolated t...
void clearAllDofIndices() final
A structure that is used to evaluate Moose functors logically at an element/cell center.
Moose::VarKindType _var_kind
Variable type (see MooseTypes.h)
typename MooseVariableField< OutputType >::DoFValue DoFValue
Argument for requesting functor evaluation at a quadrature point location in an element.
const DoFValue & dofValuesOldNeighbor() const override
unsigned int number() const
Gets the number of this system.
virtual void setDofValue(const OutputData &value, unsigned int index) override
Degree of freedom value setters.
std::string stringify(const T &t)
conversion to string
virtual ADReal getExtrapolatedBoundaryFaceValue(const FaceInfo &fi, bool two_term_expansion, bool correct_skewness, const Elem *elem_side_to_extrapolate_from, const StateArg &state) const
Retrieves an extrapolated boundary value for the provided face.
const Elem * elemPtr() const
virtual ADReal boundaryValue(const FaceInfo &fi, const Moose::StateArg &state) const =0
const DoFValue & dofValuesDotOldNeighbor() const override
const DoFValue & dofValuesOlder() const override
(gc*elem+(1-gc)*neighbor)+gradient*(rf-rf')
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const DoFValue & dofValuesDotDotOldNeighbor() const override
DotType dot(const ElemArg &elem, const StateArg &state) const
Same as their evaluateDot overloads with the same arguments but allows for caching implementation...
const Point & eCN() const
subdomain_id_type subdomain_id() const
virtual void setNodalValue(const OutputType &value, unsigned int idx=0) override
Assembly & _assembly
Assembly data.
Moose::ADType< OutputType >::type ValueType
virtual void insert(libMesh::NumericVector< libMesh::Number > &vector) override
Insert the currently cached degree of freedom values into the provided vector.
const DoFValue & dofValuesNeighbor() const override
ADReal getBoundaryFaceValue(const FaceInfo &fi, const StateArg &state, bool correct_skewness=false) const
Retrieve the solution value at a boundary face.
const Elem *const & neighbor() const
Return the neighbor element.
const TimeIntegrator *const _time_integrator
the time integrator used for computing time derivatives
static InputParameters validParams()
virtual ADReal getDirichletBoundaryFaceValue(const FaceInfo &fi, const Elem *elem, const Moose::StateArg &state) const
Retrieves a Dirichlet boundary value for the provided face.
State argument for evaluating functors.
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
virtual const OutputTools< T >::VariableSecond & second()
The second derivative of the variable this object is operating on.
virtual void computeElemValues() override
Initializes/computes variable values from the solution vectors for the current element being operated...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
OutputData getElementalValue(const Elem *elem, unsigned int idx=0) const
Get the current value of this variable on an element.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
virtual void residualSetup() override
virtual void setDofValues(const DenseVector< OutputData > &values) override
Set local DOF values and evaluate the values on quadrature points.
bool elem_is_upwind
a boolean which states whether the face information element is upwind of the face ...
virtual void computeElemValuesFace() override
Compute values at facial quadrature points.
OutputData getElementalValueOlder(const Elem *elem, unsigned int idx=0) const
Get the older value of this variable on an element.
const DoFValue & dofValuesDot() const override
const libMesh::Elem * elem
The element.
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)
Provides interpolation of face values for non-advection-specific purposes (although it can/will still...
virtual void computeNeighborValuesFace() override
Compute values at facial quadrature points for the neighbor.
DotType evaluateDot(const ElemArg &elem, const StateArg &) const override final
Evaluate the functor time derivative with a given element.
unsigned int oldestSolutionStateRequested() const override final
The oldest solution state that is requested for this variable (0 = current, 1 = old, 2 = older, etc).
Moose::ShapeType< Real >::type OutputShape
unsigned int state
The state.
const DoFValue & dofValuesDotDotNeighbor() const override
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const
Returns which side(s) the given variable-system number pair is defined on for this face...
const ADTemplateVariableGradient< OutputType > & adGradSln() const override
AD grad solution getter.