https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MooseLinearVariableFV.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11#include "TimeIntegrator.h"
12#include "NonlinearSystemBase.h"
13#include "DisplacedSystem.h"
14#include "SystemBase.h"
15#include "LinearSystem.h"
16#include "AuxiliarySystem.h"
17#include "FEProblemBase.h"
18#include "SubProblem.h"
19#include "Assembly.h"
20#include "MathFVUtils.h"
21#include "FVUtils.h"
22#include "FVFluxBC.h"
23#include "FVDirichletBCBase.h"
26#include "FVGradientMethod.h"
27
28#include "libmesh/numeric_vector.h"
29
30#include <climits>
31#include <typeinfo>
32
33using namespace Moose;
34
36
37template <typename OutputType>
40{
42 params.set<bool>("fv") = true;
43 params.set<MooseEnum>("family") = "MONOMIAL";
44 params.set<MooseEnum>("order") = "CONSTANT";
45 params.addParam<GradientMethodName>(
46 "gradient_method",
47 "green-gauss",
48 "Default gradient computation method to register when a consumer requests gradients from "
49 "this variable. This may be a built-in method name like 'green-gauss' or "
50 "'green-gauss-venkatakrishnan', or the name of an object in [FVGradientMethods].");
51 // A finite volume variable is always a CONSTANT MONOMIAL, whose basis has no p-refined
52 // counterpart, so the p-refinement parameters are fixed here and hidden from the user
53 params.set<bool>("p_refinement") = false;
54 params.suppressParameter<bool>("p_refinement");
55 params.suppressParameter<bool>("disable_p_refinement");
56 return params;
57}
58
59template <typename OutputType>
61 : MooseVariableField<OutputType>(parameters),
62 _needs_cell_gradients(false),
63 _linear_system(dynamic_cast<LinearSystem *>(&this->_sys)),
64 _auxiliary_system(dynamic_cast<AuxiliarySystem *>(&this->_sys)),
65 _gradient_reader(nullptr),
66 _default_gradient_method_name(this->template getParam<GradientMethodName>("gradient_method")),
67 _sys_num(this->_sys.number()),
68 _solution(this->_sys.currentSolution()),
69 // The following members are needed to be able to interface with the postprocessor and
70 // auxiliary systems
71 _phi(this->_assembly.template fePhi<OutputShape>(this->_fe_type)),
72 _grad_phi(this->_assembly.template feGradPhi<OutputShape>(this->_fe_type)),
73 _phi_face(this->_assembly.template fePhiFace<OutputShape>(this->_fe_type)),
74 _grad_phi_face(this->_assembly.template feGradPhiFace<OutputShape>(this->_fe_type)),
75 _phi_face_neighbor(this->_assembly.template fePhiFaceNeighbor<OutputShape>(this->_fe_type)),
76 _grad_phi_face_neighbor(
77 this->_assembly.template feGradPhiFaceNeighbor<OutputShape>(this->_fe_type)),
78 _phi_neighbor(this->_assembly.template fePhiNeighbor<OutputShape>(this->_fe_type)),
79 _grad_phi_neighbor(this->_assembly.template feGradPhiNeighbor<OutputShape>(this->_fe_type))
80{
82 this->paramError("solver_sys",
83 "The assigned system is not a linear or an auxiliary system! Linear variables "
84 "can only be assigned to linear or auxiliary systems!");
85 _element_data = std::make_unique<MooseVariableDataLinearFV<OutputType>>(
87 _neighbor_data = std::make_unique<MooseVariableDataLinearFV<OutputType>>(
89
90 if (libMesh::n_threads() > 1)
91 mooseError("MooseLinearVariableFV does not support threading at the moment!");
92}
93
94template <typename OutputType>
97{
98 const auto & reader = requestCellGradients(_default_gradient_method_name, oldest_state);
99
100 _gradient_reader = &reader;
101 return reader;
102}
103
104template <typename OutputType>
105void
107{
108 requestCellGradients();
109}
110
111template <typename OutputType>
113MooseLinearVariableFV<OutputType>::requestCellGradients(const GradientMethodName & method_name,
114 const unsigned int oldest_state)
115{
116 const auto & method = _linear_system ? _linear_system->resolveFVGradientMethod(method_name)
117 : _auxiliary_system->resolveFVGradientMethod(method_name);
118
119 return requestCellGradients(method, oldest_state);
120}
121
122template <typename OutputType>
125 const unsigned int oldest_state)
126{
127 _needs_cell_gradients = true;
128 _oldest_gradient_state_requested = std::max(_oldest_gradient_state_requested, oldest_state);
129
130 auto new_reader =
131 _linear_system ? _linear_system->registerFVGradient(this->_var_num, method, oldest_state)
132 : _auxiliary_system->registerFVGradient(this->_var_num, method, oldest_state);
133
134 const auto it = _gradient_readers_by_method.find(&method);
135 if (it != _gradient_readers_by_method.end())
136 return *it->second;
137
138 auto reader = std::make_unique<LinearFVGradientReader>(std::move(new_reader));
139
140 auto & reader_ref = *reader;
141 _gradient_readers_by_method.emplace(&method, std::move(reader));
142
143 return reader_ref;
144}
145
146template <typename OutputType>
147bool
149 const FaceInfo & /*fi*/, const Elem * const /*elem*/, const Moose::StateArg & /*state*/) const
150{
152 return false;
153}
154
155template <typename OutputType>
156Real
158 const StateArg & state) const
159{
160 mooseAssert(
161 this->hasBlocks(elem_info.subdomain_id()),
162 "The variable should be defined on the element's subdomain! This typically occurs when the "
163 "user wants to evaluate the elements right next to the boundary of two variables (block "
164 "boundary). The subdomain which is queried: " +
165 Moose::stringify(this->activeSubdomains()) + " the subdomain of the element " +
166 std::to_string(elem_info.subdomain_id()));
167
168 // It's not safe to use solutionState(0) because it returns the libMesh System solution member
169 // which is wrong during things like finite difference Jacobian evaluation, e.g. when PETSc
170 // perturbs the solution vector we feed these perturbations into the current_local_solution
171 // while the libMesh solution is frozen in the non-perturbed state
172 const auto & global_soln = (state.state == 0)
173 ? *this->_sys.currentSolution()
174 : this->_sys.solutionState(state.state, state.iteration_type);
176 return global_soln(elem_info.dofIndices()[this->_sys_num][this->_var_num]);
177}
178
179template <typename OutputType>
180VectorValue<Real>
181MooseLinearVariableFV<OutputType>::gradSln(const ElemInfo & elem_info, const StateArg & state) const
182{
183 mooseAssert(_gradient_reader, "Gradient requested without calling requestCellGradients().");
184 return _gradient_reader->gradient(elem_info, state);
186
187template <typename OutputType>
188Real
190 const unsigned int component) const
192 return gradSlnComponent(elem_info, component, Moose::currentState());
193}
194
195template <typename OutputType>
196Real
198 const unsigned int component,
199 const StateArg & state) const
201 mooseAssert(_gradient_reader,
202 "Gradient component requested without calling requestCellGradients().");
203 return _gradient_reader->component(elem_info, component, state);
204}
205
206template <typename OutputType>
207VectorValue<Real>
209{
210 mooseAssert(_gradient_reader, "Gradient requested without calling requestCellGradients().");
211 return _gradient_reader->gradient(fi, state);
212}
213
214template <typename OutputType>
215void
217{
219 cacheBoundaryBCMap();
220}
221
222template <typename OutputType>
223void
229
230template <typename OutputType>
233{
234 const FaceInfo * const fi = face.fi;
235
236 mooseAssert(fi, "The face information must be non-null");
237
238 const auto face_type = fi->faceType(std::make_pair(this->_var_num, this->_sys_num));
239
241 return Moose::FV::interpolate(*this, face, state);
242 else if (auto * bc_pointer = this->getBoundaryCondition(*fi->boundaryIDs().begin()))
243 {
244 mooseAssert(fi->boundaryIDs().size() == 1, "We should only have one boundary on every face.");
245 bc_pointer->setupFaceData(fi, face_type);
246 return bc_pointer->computeBoundaryValue();
247 }
248 // If no boundary condition is defined but we are evaluating on a boundary, just return the
249 // element value
250 else if (face_type == FaceInfo::VarFaceNeighbors::ELEM)
251 {
252 const auto & elem_info = *(face.fi->elemInfo());
253 return getElemValue(elem_info, state);
254 }
255 else if (face_type == FaceInfo::VarFaceNeighbors::NEIGHBOR)
256 {
257 const auto & elem_info = *(face.fi->neighborInfo());
258 return getElemValue(elem_info, state);
259 }
260 else
261 mooseError("We should never get here!");
262}
263
264template <typename OutputType>
267 const StateArg & /*state*/) const
268{
269 mooseError("Not implemented yet");
270}
271
272template <typename OutputType>
275{
276 timeIntegratorError();
277}
278
279template <>
280ADReal
282 const StateArg & /*state*/) const
283{
284 timeIntegratorError();
285}
286
287template <typename OutputType>
288void
290{
291 _boundary_id_to_bc.clear();
292 std::vector<LinearFVBoundaryCondition *> bcs;
294 // I believe because query() returns by value but condition returns by reference that binding to a
295 // const lvalue reference results in the query() getting destructed and us holding onto a dangling
296 // reference. I think that condition returned by value we would be able to bind to a const lvalue
297 // reference here. But as it is we'll bind to a regular lvalue
298 auto base_query = this->_subproblem.getMooseApp()
299 .theWarehouse()
300 .query()
301 .template condition<AttribSystem>("LinearFVBoundaryCondition")
302 .template condition<AttribThread>(_tid)
303 .template condition<AttribVar>(_var_num)
304 .template condition<AttribSysNum>(this->_sys.number());
305
306 for (const auto bnd_id : this->_mesh.getBoundaryIDs())
307 {
308 auto base_query_copy = base_query;
309 base_query_copy.template condition<AttribBoundaries>(std::set<BoundaryID>({bnd_id}))
310 .queryInto(bcs);
311 mooseAssert(bcs.size() <= 1, "cannot have multiple BCs on the same boundary");
312 if (!bcs.empty())
313 _boundary_id_to_bc.emplace(bnd_id, bcs[0]);
314 }
315}
316
317template <typename OutputType>
320{
321 const auto iter = _boundary_id_to_bc.find(bd_id);
322 if (iter == _boundary_id_to_bc.end())
323 return nullptr;
324 else
325 return iter->second;
326}
327
328template <typename OutputType>
329const Elem * const &
331{
332 return this->_assembly.elem();
334
335template <typename OutputType>
336bool
339 for (const auto bnd_id : fi.boundaryIDs())
340 if (auto it = _boundary_id_to_bc.find(bnd_id); it != _boundary_id_to_bc.end())
341 if (dynamic_cast<LinearFVAdvectionDiffusionFunctorDirichletBC *>(it->second))
342 return true;
343
344 return false;
346
347// ****************************************************************************
348// The functions below are used for interfacing the auxiliary and
349// postprocessor/userobject systems. Most of the postprocessors/
350// auxkernels require quadrature-based evaluations and we provide that
351// interface with the functions below.
352// ****************************************************************************
353
354template <typename OutputType>
355void
357 std::vector<dof_id_type> & dof_indices) const
358{
359 dof_indices.clear();
360 const auto & elem_info = this->_mesh.elemInfo(elem->id());
361 dof_indices.push_back(elem_info.dofIndices()[this->_sys_num][this->number()]);
362}
364template <typename OutputType>
365void
368 _element_data->setDofValue(value, index);
369}
370
371template <typename OutputType>
372void
374{
375 _element_data->setDofValues(values);
376}
377
378template <typename OutputType>
379void
382 _element_data->clearDofIndices();
384
385template <typename OutputType>
389 return _element_data->dofValues();
390}
392template <typename OutputType>
396 return _neighbor_data->dofValues();
398
399template <typename OutputType>
402{
403 return _element_data->dofValuesOld();
404}
406template <typename OutputType>
409{
410 return _element_data->dofValuesOlder();
411}
412
413template <typename OutputType>
416{
417 return _element_data->dofValuesPreviousNL();
418}
419
420template <typename OutputType>
423{
424 return _neighbor_data->dofValuesOld();
425}
426
427template <typename OutputType>
430{
431 return _neighbor_data->dofValuesOlder();
432}
434template <typename OutputType>
437{
438 return _neighbor_data->dofValuesPreviousNL();
441template <typename OutputType>
445 timeIntegratorError();
447
448template <typename OutputType>
452 timeIntegratorError();
453}
455template <typename OutputType>
458{
459 timeIntegratorError();
460}
462template <typename OutputType>
465{
466 timeIntegratorError();
467}
469template <typename OutputType>
473 timeIntegratorError();
476template <typename OutputType>
480 timeIntegratorError();
483template <typename OutputType>
486{
487 timeIntegratorError();
489
490template <typename OutputType>
494 timeIntegratorError();
497template <typename OutputType>
498const MooseArray<Number> &
500{
501 timeIntegratorError();
502}
503
504template <typename OutputType>
507{
508 timeIntegratorError();
509}
510
511template <typename OutputType>
512const MooseArray<Number> &
514{
515 timeIntegratorError();
516}
517
518template <typename OutputType>
519const MooseArray<Number> &
521{
522 timeIntegratorError();
523}
524
525template <typename OutputType>
526void
528{
529 if (_compute_qp_data)
530 {
531 _element_data->setGeometry(Moose::Volume);
532 _element_data->computeValues();
533 }
534}
535
536template <typename OutputType>
537void
539{
540 if (_compute_qp_data)
541 {
542 _element_data->setGeometry(Moose::Face);
543 _element_data->computeValues();
544 }
545}
546
547template <typename OutputType>
548void
550{
551 if (_compute_qp_data)
552 {
553 _neighbor_data->setGeometry(Moose::Face);
554 _neighbor_data->computeValues();
555 }
556}
557
558template <typename OutputType>
559void
561{
562 if (_compute_qp_data)
563 {
564 _neighbor_data->setGeometry(Moose::Volume);
565 _neighbor_data->computeValues();
566 }
567}
568
569template <typename OutputType>
570void
575
576template <typename OutputType>
577void
582
583template <typename OutputType>
584void
589
590template <typename OutputType>
591const std::vector<dof_id_type> &
593{
594 return _element_data->dofIndices();
595}
596
597template <typename OutputType>
598const std::vector<dof_id_type> &
600{
601 return _neighbor_data->dofIndices();
602}
603
604template <typename OutputType>
605void
607{
608 lowerDError();
609}
610
611template <typename OutputType>
612unsigned int
614{
615 unsigned int state = _oldest_gradient_state_requested;
616 state = std::max(state, _element_data->oldestSolutionStateRequested());
617 state = std::max(state, _neighbor_data->oldestSolutionStateRequested());
618 return state;
619}
620
621template <typename OutputType>
622void
624{
625 _element_data->prepareIC();
626}
627
628template <typename OutputType>
629void
631{
632 _element_data->clearDofIndices();
633 _neighbor_data->clearDofIndices();
634}
635
636template <typename OutputType>
637void
639{
640 nodalError();
641}
642
643template <typename OutputType>
649
650template <typename OutputType>
656
657template <typename OutputType>
658const std::vector<dof_id_type> &
660{
661 lowerDError();
662}
663
664template <typename OutputType>
667{
668 lowerDError();
669}
670
671template <typename OutputType>
672void
673MooseLinearVariableFV<OutputType>::insert(NumericVector<Number> & vector)
674{
675 _element_data->insert(vector);
676}
677
678template <typename OutputType>
679void
680MooseLinearVariableFV<OutputType>::insertLower(NumericVector<Number> & /*residual*/)
681{
682 mooseError("We don't support value insertion to residuals in MooseLinearVariableFV!");
683}
684
685template <typename OutputType>
686void
687MooseLinearVariableFV<OutputType>::add(NumericVector<Number> & /*residual*/)
688{
689 mooseError("We don't support value addition to residuals in MooseLinearVariableFV!");
690}
691
692template <typename OutputType>
693void
695{
696 _element_data->setActiveTags(vtags);
697 _neighbor_data->setActiveTags(vtags);
698}
699
700template <typename OutputType>
703{
704 nodalError();
705}
706
707template <typename OutputType>
713
714template <typename OutputType>
720
721template <typename OutputType>
722std::size_t
724{
725 lowerDError();
726}
727
728template <typename OutputType>
731{
732 return _element_data->vectorTagValue(tag);
733}
734
735template <typename OutputType>
738{
739 return _element_data->vectorTagDofValue(tag);
740}
741
742template <typename OutputType>
745{
746 return _element_data->matrixTagValue(tag);
747}
748
749template <typename OutputType>
752{
753 mooseError("We don't currently implement second derivatives for FV");
754}
755
756template <typename OutputType>
759{
760 mooseError("We don't currently implement curl for FV");
761}
762
763template <typename OutputType>
766{
767 mooseError("We don't currently implement divergence for FV");
768}
769
770template <typename OutputType>
773{
774 mooseError("We don't currently implement second derivatives for FV");
775}
776
777template <typename OutputType>
780{
781 mooseError("We don't currently implement second derivatives for FV");
782}
783
784template <typename OutputType>
787{
788 mooseError("We don't currently implement second derivatives for FV");
789}
790
791template <typename OutputType>
794{
795 return _element_data->sln(Moose::Current);
796}
797
798template <typename OutputType>
801{
802 return _element_data->sln(Moose::Old);
803}
804
805template <typename OutputType>
808{
809 return _element_data->sln(Moose::Older);
810}
811
812template <typename OutputType>
815{
816 return _element_data->gradSln(Moose::Current);
817}
818
819template <typename OutputType>
822{
823 return _element_data->gradSln(Moose::Old);
824}
825
826template <typename OutputType>
829{
830 return _neighbor_data->sln(Moose::Current);
831}
832
833template <typename OutputType>
836{
837 return _neighbor_data->sln(Moose::Old);
838}
839
840template <typename OutputType>
843{
844 return _neighbor_data->gradSln(Moose::Current);
845}
846
847template <typename OutputType>
850{
851 return _neighbor_data->gradSln(Moose::Old);
852}
853
854template <typename OutputType>
857{
858 adError();
859}
860
861template <typename OutputType>
864{
865 adError();
866}
867
868template <typename OutputType>
871{
872 adError();
873}
874
875template <typename OutputType>
878{
879 adError();
880}
881
882template <typename OutputType>
888
889template <typename OutputType>
895
896template <typename OutputType>
902
903template <typename OutputType>
909
910template <typename OutputType>
916
917template <typename OutputType>
923
924template <typename OutputType>
927{
928 adError();
929}
930
931template <typename OutputType>
934{
935 adError();
936}
937
938template <typename OutputType>
941{
942 adError();
943}
944
945template <typename OutputType>
951
952template <typename OutputType>
955{
956 adError();
957}
958
959template <typename OutputType>
965
966template <typename OutputType>
972
973template <typename OutputType>
974const dof_id_type &
976{
977 nodalError();
978}
979
980template <typename OutputType>
981const dof_id_type &
986
987template <typename OutputType>
988void
990{
991 _element_data->sizeMatrixTagData();
992}
993
994template class MooseLinearVariableFV<Real>;
DualNumber< Real, DNDerivativeType, true > ADReal
boundary_id_type BoundaryID
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
registerMooseObject("MooseApp", MooseLinearVariableFVReal)
unsigned int TagID
Definition MooseTypes.h:238
typename OutputTools< typename Moose::ADType< T >::type >::VariableSecond ADTemplateVariableSecond
Definition MooseTypes.h:659
typename OutputTools< typename Moose::ADType< T >::type >::VariableValue ADTemplateVariableValue
Definition MooseTypes.h:653
typename OutputTools< typename Moose::ADType< T >::type >::VariableCurl ADTemplateVariableCurl
Definition MooseTypes.h:661
typename OutputTools< typename Moose::ADType< T >::type >::VariableGradient ADTemplateVariableGradient
Definition MooseTypes.h:656
std::array< Real, 2 > values
Definition MortarUtils.C:52
const Elem *const & elem() const
Return the current element.
Definition Assembly.h:405
const Elem *const & neighbor() const
Return the neighbor element.
Definition Assembly.h:461
A system that holds auxiliary variables.
Class used for caching additional information for elements such as the volume and centroid.
Definition ElemInfo.h:26
SubdomainID subdomain_id() const
We return the subdomain ID of the corresponding libmesh element.
Definition ElemInfo.h:43
Base class for linear finite-volume cell-gradient methods.
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition FaceInfo.h:38
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.
Definition FaceInfo.h:229
const std::set< BoundaryID > & boundaryIDs() const
Const getter for every associated boundary ID.
Definition FaceInfo.h:124
const ElemInfo * elemInfo() const
Definition FaceInfo.h:89
const ElemInfo * neighborInfo() const
Definition FaceInfo.h:90
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void suppressParameter(const std::string &name)
This method suppresses an inherited parameter so that it isn't required or valid in the derived class...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Class implementing a Dirichlet boundary condition for linear finite volume variables.
Base class for boundary conditions for linear FV systems.
Read-only view of one variable's cell-centered linear finite-volume gradient values.
Linear system to be solved.
forward declarations
Definition MooseArray.h:18
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition MooseBase.h:457
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
virtual const DofValues & dofValues() const override
dof values getters
typename MooseVariableField< OutputType >::DofValues DofValues
virtual const FieldVariableGradient & gradSlnOldNeighbor() const override
virtual void setNodalValue(const OutputType &value) override
virtual void getDofIndices(const Elem *elem, std::vector< dof_id_type > &dof_indices) const override
virtual const ADTemplateVariableGradient< OutputType > & adGradSlnDot() const override
AD grad of time derivative solution getter.
Real gradSlnComponent(const ElemInfo &elem_info, unsigned int component) const
Get one default gradient component at a cell center without materializing the full gradient.
virtual void clearAllDofIndices() override final
virtual const dof_id_type & nodalDofIndex() const override final
virtual const FieldVariablePhiSecond & secondPhi() const override final
Return the rank-2 tensor of second derivatives of the variable's elemental shape functions.
virtual const FieldVariableGradient & gradSlnNeighbor() const override
neighbor solution gradients
virtual const Elem *const & currentElem() const override
Current element this variable is evaluated at.
virtual const std::vector< dof_id_type > & dofIndicesNeighbor() const final
Get neighbor DOF indices for currently selected element.
const FieldVariablePhiValue & curlPhi() const override final
Curl of the shape functions.
virtual void add(libMesh::NumericVector< libMesh::Number > &vector) override
Add the currently cached degree of freedom values into the provided vector.
virtual bool isDirichletBoundaryFace(const FaceInfo &fi) const
If the variable has a dirichlet boundary condition at face described by fi .
virtual const ADTemplateVariableGradient< OutputType > & adGradSlnNeighborDot() const override
AD grad of time derivative neighbor solution getter.
virtual const DofValues & dofValuesOlderNeighbor() const override
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
const LinearFVGradientReader & requestCellGradients(unsigned int oldest_state=0)
Register the configured default gradient method with time-state storage.
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...
virtual const ADTemplateVariableGradient< OutputType > & adGradSlnNeighbor() const override
AD grad neighbor solution getter.
virtual const ADTemplateVariableCurl< OutputType > & adCurlSln() const override
AD curl solution getter.
virtual const std::vector< dof_id_type > & dofIndicesLower() const override final
Get dof indices for the current lower dimensional element (this is meaningful when performing mortar ...
virtual const DofValues & dofValuesDotNeighbor() const override
virtual const DofValues & dofValuesNeighbor() const override
virtual const DofValues & vectorTagDofValue(TagID tag) const override
virtual void computeNeighborValues() override
Compute values at quadrature points for the neighbor.
virtual const FieldVariableValue & matrixTagValue(TagID tag) const override
typename MooseVariableField< OutputType >::DofValue DofValue
void computeCellGradients()
Backward-compatible interface for requesting cell gradients.
virtual const FieldVariablePhiSecond & secondPhiFaceNeighbor() const override final
Return the rank-2 tensor of second derivatives of the variable's shape functions on a neighboring ele...
virtual const DofValues & dofValuesDot() const override
virtual const ADTemplateVariableValue< OutputType > & adUDot() const override
AD time derivative getter.
virtual const FieldVariableValue & slnNeighbor() const override
Real getElemValue(const ElemInfo &elem_info, const StateArg &state) const
Get the solution value for the provided element and seed the derivative for the corresponding dof ind...
virtual const ADTemplateVariableValue< OutputType > & adSlnNeighbor() const override
AD neighbor solution getter.
virtual const FieldVariablePhiSecond & secondPhiFace() const override final
Return the rank-2 tensor of second derivatives of the variable's shape functions on an element face.
virtual const MooseArray< libMesh::Number > & dofValuesDuDotDu() const override
virtual void prepareIC() override
Prepare the initial condition.
virtual const DofValues & dofValuesPreviousNLNeighbor() const override
virtual const ADTemplateVariableValue< OutputType > & adUDotDotNeighbor() const override
AD neighbor second time derivative getter.
virtual DotType evaluateDot(const ElemArg &elem, const StateArg &) const override final
Evaluate the functor time derivative with a given element.
LinearSystem *const _linear_system
Owning concrete system pointers. One will be null.
virtual const FieldVariableValue & slnOldNeighbor() const override
virtual const DofValues & dofValuesDotDotOldNeighbor() const override
virtual const ADTemplateVariableCurl< OutputType > & adCurlSlnNeighbor() const override
AD curl neighbor solution getter.
typename MooseVariableField< OutputType >::FieldVariablePhiDivergence FieldVariablePhiDivergence
virtual const FieldVariableValue & slnOlder() const override
virtual void computeNodalNeighborValues() override final
Compute nodal values of this variable in the neighbor.
typename MooseVariableField< OutputType >::FieldVariableValue FieldVariableValue
virtual const DofValues & dofValuesDotOld() const override
virtual void computeNeighborValuesFace() override
Compute values at facial quadrature points for the neighbor.
virtual const ADTemplateVariableSecond< OutputType > & adSecondSln() const override
AD second solution getter.
virtual const MooseArray< libMesh::Number > & dofValuesDuDotDuNeighbor() const override
virtual void sizeMatrixTagData() override
Size data structures related to matrix tagging.
virtual const MooseArray< libMesh::Number > & dofValuesDuDotDotDuNeighbor() const override
virtual const DofValues & dofValuesPreviousNL() const override
virtual const std::vector< dof_id_type > & dofIndices() const final
Get local DoF indices.
virtual void insert(libMesh::NumericVector< libMesh::Number > &vector) override
Insert the currently cached degree of freedom values into the provided vector.
virtual void computeElemValues() override
Compute values at interior quadrature points.
virtual void setLowerDofValues(const DenseVector< DofValue > &values) override
Set local DOF values for a lower dimensional element and evaluate the values on quadrature points.
std::unique_ptr< MooseVariableDataLinearFV< OutputType > > _element_data
Holder for all the data associated with the "main" element.
virtual void clearDofIndices() override
Clear out the dof indices.
typename MooseVariableField< OutputType >::FieldVariableGradient FieldVariableGradient
virtual const FieldVariablePhiSecond & secondPhiNeighbor() const override final
Return the rank-2 tensor of second derivatives of the variable's shape functions on a neighboring ele...
typename MooseVariableField< OutputType >::ADDofValues ADDofValues
const FieldVariablePhiDivergence & divPhi() const override final
Divergence of the shape functions.
virtual const MooseArray< libMesh::Number > & dofValuesDuDotDotDu() const override
virtual const ADTemplateVariableGradient< OutputType > & adGradSln() const override
AD grad solution getter.
virtual const DofValues & dofValuesDotOldNeighbor() const override
MooseLinearVariableFV(const InputParameters &parameters)
virtual const MooseArray< OutputType > & nodalValueOlderArray() const override
virtual const ADTemplateVariableValue< OutputType > & adUDotNeighbor() const override
AD neighbor time derivative getter.
virtual void computeNodalValues() override final
Compute nodal values of this variable.
virtual const FieldVariableGradient & gradSlnOld() const override
LinearFVBoundaryCondition * getBoundaryCondition(const BoundaryID bd_id) const
Get the boundary condition object which corresponds to the given boundary ID.
virtual const FieldVariableValue & sln() const override
virtual const dof_id_type & nodalDofIndexNeighbor() const override final
void cacheBoundaryBCMap()
Setup the boundary to Dirichlet BC map.
typename MooseVariableField< OutputType >::FieldVariablePhiValue FieldVariablePhiValue
virtual const DofValues & dofValuesOld() const override
virtual void setActiveTags(const std::set< TagID > &vtags) override
Set the active vector tags.
virtual bool isExtrapolatedBoundaryFace(const FaceInfo &fi, const Elem *elem, const Moose::StateArg &state) const override
Returns whether this (sided) face is an extrapolated boundary face for this functor.
virtual void setDofValue(const DofValue &, unsigned int) override
Degree of freedom value setters.
virtual const DofValues & dofValuesDotDotOld() const override
virtual const DofValues & nodalVectorTagValue(TagID) const override
virtual const FieldVariableGradient & gradSln() const override
element gradients
virtual const ADDofValues & adDofValuesNeighbor() const override
Return the AD neighbor dof values.
virtual void computeLowerDValues() override final
compute values at quadrature points on the lower dimensional element
virtual const ADTemplateVariableSecond< OutputType > & adSecondSlnNeighbor() const override
AD second neighbor solution getter.
virtual const DofValues & dofValuesDotDot() const override
virtual void setDofValues(const DenseVector< DofValue > &values) override
Set local DOF values and evaluate the values on quadrature points.
virtual const ADTemplateVariableValue< OutputType > & adSln() const override
AD solution getter.
virtual const ADDofValues & adDofValues() const override
Return the AD dof values.
virtual void timestepSetup() override
Gets called at the beginning of the timestep before this object is asked to do its job.
AuxiliarySystem *const _auxiliary_system
virtual const DofValues & dofValuesDotDotNeighbor() const override
virtual const DofValues & nodalMatrixTagValue(TagID tag) const override
virtual std::size_t phiLowerSize() const override final
Return the number of shape functions on the lower dimensional element for this variable.
virtual const FieldVariablePhiValue & phiLower() const override
Return the variable's shape functions on a lower-dimensional element.
virtual const FieldVariableValue & slnOld() const override
typename MooseVariableField< OutputType >::OutputShape OutputShape
virtual const DofValues & dofValuesOlder() const override
virtual void computeElemValuesFace() override
Compute values at facial quadrature points.
std::unique_ptr< MooseVariableDataLinearFV< OutputType > > _neighbor_data
Holder for all the data associated with the "neighbor" element.
virtual const MooseArray< OutputType > & nodalValueArray() const override
Methods for retrieving values of variables at the nodes in a MooseArray for AuxKernelBase.
static InputParameters validParams()
Input parameters for a linear finite-volume variable.
virtual const ADDofValues & adDofValuesDot() const override
Return the AD time derivatives at dofs.
virtual const ADTemplateVariableValue< OutputType > & adUDotDot() const override
AD second time derivative getter.
virtual const MooseArray< OutputType > & nodalValueOldArray() const override
virtual ValueType evaluate(const ElemArg &elem, const StateArg &) const override final
Evaluate the functor with a given element.
typename MooseVariableField< OutputType >::FieldVariablePhiSecond FieldVariablePhiSecond
virtual const DofValues & dofValuesOldNeighbor() const override
virtual const FieldVariableValue & vectorTagValue(TagID tag) const override
tag values getters
virtual unsigned int oldestSolutionStateRequested() const override final
The oldest solution state that is requested for this variable (0 = current, 1 = old,...
THREAD_ID _tid
Thread ID.
Assembly & _assembly
Assembly data.
SystemBase & _sys
System this variable is part of.
Class for stuff related to variables.
virtual void timestepSetup() override
Gets called at the beginning of the timestep before this object is asked to do its job.
static InputParameters validParams()
virtual const OutputTools< T >::VariableSecond & second()
The second derivative of the variable this object is operating on.
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job.
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...
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
@ Current
Definition MooseTypes.h:263
std::string stringify(const T &t)
conversion to string
Definition Conversion.h:65
StateArg currentState()
unsigned int n_threads()
A structure that is used to evaluate Moose functors logically at an element/cell center.
A structure defining a "face" evaluation calling argument for Moose functors.
const FaceInfo * fi
a face information object which defines our location in space
State argument for evaluating functors.