LCOV - code coverage report
Current view: top level - src/variables - MooseLinearVariableFV.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 122 301 40.5 %
Date: 2025-07-17 01:28:37 Functions: 23 100 23.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      10             : #include "MooseLinearVariableFV.h"
      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 "SubProblem.h"
      18             : #include "Assembly.h"
      19             : #include "MathFVUtils.h"
      20             : #include "FVUtils.h"
      21             : #include "FVFluxBC.h"
      22             : #include "FVDirichletBCBase.h"
      23             : #include "GreenGaussGradient.h"
      24             : #include "LinearFVBoundaryCondition.h"
      25             : #include "LinearFVAdvectionDiffusionFunctorDirichletBC.h"
      26             : 
      27             : #include "libmesh/numeric_vector.h"
      28             : 
      29             : #include <climits>
      30             : #include <typeinfo>
      31             : 
      32             : using namespace Moose;
      33             : 
      34             : registerMooseObject("MooseApp", MooseLinearVariableFVReal);
      35             : 
      36             : template <typename OutputType>
      37             : InputParameters
      38       16887 : MooseLinearVariableFV<OutputType>::validParams()
      39             : {
      40       16887 :   InputParameters params = MooseVariableField<OutputType>::validParams();
      41       16887 :   params.set<bool>("fv") = true;
      42       16887 :   params.set<MooseEnum>("family") = "MONOMIAL";
      43       16887 :   params.set<MooseEnum>("order") = "CONSTANT";
      44       16887 :   return params;
      45           0 : }
      46             : 
      47             : template <typename OutputType>
      48        1311 : MooseLinearVariableFV<OutputType>::MooseLinearVariableFV(const InputParameters & parameters)
      49             :   : MooseVariableField<OutputType>(parameters),
      50        1311 :     _needs_cell_gradients(false),
      51        1311 :     _grad_container(this->_sys.gradientContainer()),
      52        1311 :     _sys_num(this->_sys.number()),
      53        1311 :     _solution(this->_sys.currentSolution()),
      54             :     // The following members are needed to be able to interface with the postprocessor and
      55             :     // auxiliary systems
      56        1311 :     _phi(this->_assembly.template fePhi<OutputShape>(FEType(CONSTANT, MONOMIAL))),
      57        1311 :     _grad_phi(this->_assembly.template feGradPhi<OutputShape>(FEType(CONSTANT, MONOMIAL))),
      58        1311 :     _phi_face(this->_assembly.template fePhiFace<OutputShape>(FEType(CONSTANT, MONOMIAL))),
      59        1311 :     _grad_phi_face(this->_assembly.template feGradPhiFace<OutputShape>(FEType(CONSTANT, MONOMIAL))),
      60        1311 :     _phi_face_neighbor(
      61        1311 :         this->_assembly.template fePhiFaceNeighbor<OutputShape>(FEType(CONSTANT, MONOMIAL))),
      62        1311 :     _grad_phi_face_neighbor(
      63        1311 :         this->_assembly.template feGradPhiFaceNeighbor<OutputShape>(FEType(CONSTANT, MONOMIAL))),
      64        1311 :     _phi_neighbor(this->_assembly.template fePhiNeighbor<OutputShape>(FEType(CONSTANT, MONOMIAL))),
      65        1311 :     _grad_phi_neighbor(
      66        3933 :         this->_assembly.template feGradPhiNeighbor<OutputShape>(FEType(CONSTANT, MONOMIAL)))
      67             : {
      68        1311 :   if (!dynamic_cast<LinearSystem *>(&_sys) && !dynamic_cast<AuxiliarySystem *>(&_sys))
      69           0 :     this->paramError("solver_sys",
      70             :                      "The assigned system is not a linear or an auxiliary system! Linear variables "
      71             :                      "can only be assigned to linear or auxiliary systems!");
      72        1311 :   _element_data = std::make_unique<MooseVariableDataLinearFV<OutputType>>(
      73        1311 :       *this, _sys, _tid, Moose::ElementType::Element, this->_assembly.elem());
      74        1311 :   _neighbor_data = std::make_unique<MooseVariableDataLinearFV<OutputType>>(
      75        1311 :       *this, _sys, _tid, Moose::ElementType::Neighbor, this->_assembly.neighbor());
      76             : 
      77        1311 :   if (libMesh::n_threads() > 1)
      78           0 :     mooseError("MooseLinearVariableFV does not support threading at the moment!");
      79        1311 : }
      80             : 
      81             : template <typename OutputType>
      82             : bool
      83           0 : MooseLinearVariableFV<OutputType>::isExtrapolatedBoundaryFace(
      84             :     const FaceInfo & /*fi*/, const Elem * const /*elem*/, const Moose::StateArg & /*state*/) const
      85             : {
      86             :   /// This is not used by this variable at this point.
      87           0 :   return false;
      88             : }
      89             : 
      90             : template <typename OutputType>
      91             : Real
      92      757692 : MooseLinearVariableFV<OutputType>::getElemValue(const ElemInfo & elem_info,
      93             :                                                 const StateArg & state) const
      94             : {
      95             :   mooseAssert(
      96             :       this->hasBlocks(elem_info.subdomain_id()),
      97             :       "The variable should be defined on the element's subdomain! This typically occurs when the "
      98             :       "user wants to evaluate the elements right next to the boundary of two variables (block "
      99             :       "boundary). The subdomain which is queried: " +
     100             :           Moose::stringify(this->activeSubdomains()) + " the subdomain of the element " +
     101             :           std::to_string(elem_info.subdomain_id()));
     102             : 
     103             :   // It's not safe to use solutionState(0) because it returns the libMesh System solution member
     104             :   // which is wrong during things like finite difference Jacobian evaluation, e.g. when PETSc
     105             :   // perturbs the solution vector we feed these perturbations into the current_local_solution
     106             :   // while the libMesh solution is frozen in the non-perturbed state
     107     1515384 :   const auto & global_soln = (state.state == 0)
     108      757692 :                                  ? *this->_sys.currentSolution()
     109           0 :                                  : this->_sys.solutionState(state.state, state.iteration_type);
     110             : 
     111      757692 :   return global_soln(elem_info.dofIndices()[this->_sys_num][this->_var_num]);
     112             : }
     113             : 
     114             : template <typename OutputType>
     115             : const VectorValue<Real>
     116     1295488 : MooseLinearVariableFV<OutputType>::gradSln(const ElemInfo & elem_info) const
     117             : {
     118     1295488 :   if (_needs_cell_gradients)
     119             :   {
     120     1293640 :     _cell_gradient.zero();
     121     3871320 :     for (const auto i : make_range(this->_mesh.dimension()))
     122     2577680 :       _cell_gradient(i) =
     123     2577680 :           (*_grad_container[i])(elem_info.dofIndices()[this->_sys_num][this->_var_num]);
     124             :   }
     125             : 
     126     1295488 :   return _cell_gradient;
     127             : }
     128             : 
     129             : template <typename OutputType>
     130             : VectorValue<Real>
     131         160 : MooseLinearVariableFV<OutputType>::gradSln(const FaceInfo & fi, const StateArg & /*state*/) const
     132             : {
     133         160 :   const bool var_defined_on_elem = this->hasBlocks(fi.elem().subdomain_id());
     134         160 :   const auto * const elem_one = var_defined_on_elem ? fi.elemInfo() : fi.neighborInfo();
     135         160 :   const auto * const elem_two = var_defined_on_elem ? fi.neighborInfo() : fi.elemInfo();
     136             : 
     137         160 :   const auto elem_one_grad = gradSln(*elem_one);
     138             : 
     139             :   // If we have a neighbor then we interpolate between the two to the face.
     140         160 :   if (elem_two && this->hasBlocks(elem_two->subdomain_id()))
     141             :   {
     142           0 :     const auto elem_two_grad = gradSln(*elem_two);
     143           0 :     return Moose::FV::linearInterpolation(elem_one_grad, elem_two_grad, fi, var_defined_on_elem);
     144             :   }
     145             :   else
     146         160 :     return elem_one_grad;
     147             : }
     148             : 
     149             : template <typename OutputType>
     150             : void
     151        1311 : MooseLinearVariableFV<OutputType>::initialSetup()
     152             : {
     153        1311 :   MooseVariableField<OutputType>::initialSetup();
     154        1311 :   cacheBoundaryBCMap();
     155        1311 : }
     156             : 
     157             : template <typename OutputType>
     158             : typename MooseLinearVariableFV<OutputType>::ValueType
     159         566 : MooseLinearVariableFV<OutputType>::evaluate(const FaceArg & face, const StateArg & state) const
     160             : {
     161         566 :   const FaceInfo * const fi = face.fi;
     162             : 
     163             :   mooseAssert(fi, "The face information must be non-null");
     164             : 
     165         566 :   const auto face_type = fi->faceType(std::make_pair(this->_var_num, this->_sys_num));
     166             : 
     167         566 :   if (face_type == FaceInfo::VarFaceNeighbors::BOTH)
     168           0 :     return Moose::FV::interpolate(*this, face, state);
     169         566 :   else if (auto * bc_pointer = this->getBoundaryCondition(*fi->boundaryIDs().begin()))
     170             :   {
     171             :     mooseAssert(fi->boundaryIDs().size() == 1, "We should only have one boundary on every face.");
     172         566 :     bc_pointer->setupFaceData(fi, face_type);
     173        1132 :     return bc_pointer->computeBoundaryValue();
     174             :   }
     175             :   // If no boundary condition is defined but we are evaluating on a boundary, just return the
     176             :   // element value
     177           0 :   else if (face_type == FaceInfo::VarFaceNeighbors::ELEM)
     178             :   {
     179           0 :     const auto & elem_info = this->_mesh.elemInfo(fi->elemPtr()->id());
     180           0 :     return getElemValue(elem_info, state);
     181             :   }
     182           0 :   else if (face_type == FaceInfo::VarFaceNeighbors::NEIGHBOR)
     183             :   {
     184           0 :     const auto & elem_info = this->_mesh.elemInfo(fi->neighborPtr()->id());
     185           0 :     return getElemValue(elem_info, state);
     186             :   }
     187             :   else
     188           0 :     mooseError("We should never get here!");
     189             : }
     190             : 
     191             : template <typename OutputType>
     192             : typename MooseLinearVariableFV<OutputType>::ValueType
     193           0 : MooseLinearVariableFV<OutputType>::evaluate(const NodeArg & /*node_arg*/,
     194             :                                             const StateArg & /*state*/) const
     195             : {
     196           0 :   mooseError("Not implemented yet");
     197             : }
     198             : 
     199             : template <typename OutputType>
     200             : typename MooseLinearVariableFV<OutputType>::DotType
     201             : MooseLinearVariableFV<OutputType>::evaluateDot(const ElemArg &, const StateArg &) const
     202             : {
     203             :   timeIntegratorError();
     204             : }
     205             : 
     206             : template <>
     207             : ADReal
     208           0 : MooseLinearVariableFV<Real>::evaluateDot(const ElemArg & /*elem_arg*/,
     209             :                                          const StateArg & /*state*/) const
     210             : {
     211           0 :   timeIntegratorError();
     212             : }
     213             : 
     214             : template <typename OutputType>
     215             : void
     216        1311 : MooseLinearVariableFV<OutputType>::cacheBoundaryBCMap()
     217             : {
     218        1311 :   _boundary_id_to_bc.clear();
     219        1311 :   std::vector<LinearFVBoundaryCondition *> bcs;
     220             : 
     221             :   // I believe because query() returns by value but condition returns by reference that binding to a
     222             :   // const lvalue reference results in the query() getting destructed and us holding onto a dangling
     223             :   // reference. I think that condition returned by value we would be able to bind to a const lvalue
     224             :   // reference here. But as it is we'll bind to a regular lvalue
     225        1311 :   auto base_query = this->_subproblem.getMooseApp()
     226        1311 :                         .theWarehouse()
     227             :                         .query()
     228        1311 :                         .template condition<AttribSystem>("LinearFVBoundaryCondition")
     229        1311 :                         .template condition<AttribThread>(_tid)
     230        1311 :                         .template condition<AttribVar>(_var_num)
     231        1311 :                         .template condition<AttribSysNum>(this->_sys.number());
     232             : 
     233        5427 :   for (const auto bnd_id : this->_mesh.getBoundaryIDs())
     234             :   {
     235        4116 :     auto base_query_copy = base_query;
     236        8232 :     base_query_copy.template condition<AttribBoundaries>(std::set<BoundaryID>({bnd_id}))
     237        4116 :         .queryInto(bcs);
     238             :     mooseAssert(bcs.size() <= 1, "cannot have multiple BCs on the same boundary");
     239        4116 :     if (!bcs.empty())
     240        3331 :       _boundary_id_to_bc.emplace(bnd_id, bcs[0]);
     241             :   }
     242        1311 : }
     243             : 
     244             : template <typename OutputType>
     245             : LinearFVBoundaryCondition *
     246      708474 : MooseLinearVariableFV<OutputType>::getBoundaryCondition(const BoundaryID bd_id) const
     247             : {
     248      708474 :   const auto iter = _boundary_id_to_bc.find(bd_id);
     249      708474 :   if (iter == _boundary_id_to_bc.end())
     250       26240 :     return nullptr;
     251             :   else
     252      682234 :     return iter->second;
     253             : }
     254             : 
     255             : template <typename OutputType>
     256             : const Elem * const &
     257           0 : MooseLinearVariableFV<OutputType>::currentElem() const
     258             : {
     259           0 :   return this->_assembly.elem();
     260             : }
     261             : 
     262             : template <typename OutputType>
     263             : bool
     264           0 : MooseLinearVariableFV<OutputType>::isDirichletBoundaryFace(const FaceInfo & fi) const
     265             : {
     266           0 :   for (const auto bnd_id : fi.boundaryIDs())
     267           0 :     if (auto it = _boundary_id_to_bc.find(bnd_id); it != _boundary_id_to_bc.end())
     268           0 :       if (dynamic_cast<LinearFVAdvectionDiffusionFunctorDirichletBC *>(it->second))
     269           0 :         return true;
     270             : 
     271           0 :   return false;
     272             : }
     273             : 
     274             : // ****************************************************************************
     275             : // The functions below are used for interfacing the auxiliary and
     276             : // postprocessor/userobject systems. Most of the postprocessors/
     277             : // auxkernels require quadrature-based evaluations and we provide that
     278             : // interface with the functions below.
     279             : // ****************************************************************************
     280             : 
     281             : template <typename OutputType>
     282             : void
     283           0 : MooseLinearVariableFV<OutputType>::getDofIndices(const Elem * elem,
     284             :                                                  std::vector<dof_id_type> & dof_indices) const
     285             : {
     286           0 :   dof_indices.clear();
     287           0 :   const auto & elem_info = this->_mesh.elemInfo(elem->id());
     288           0 :   dof_indices.push_back(elem_info.dofIndices()[this->_sys_num][this->number()]);
     289           0 : }
     290             : 
     291             : template <typename OutputType>
     292             : void
     293         432 : MooseLinearVariableFV<OutputType>::setDofValue(const OutputData & value, unsigned int index)
     294             : {
     295         432 :   _element_data->setDofValue(value, index);
     296         432 : }
     297             : 
     298             : template <typename OutputType>
     299             : void
     300         144 : MooseLinearVariableFV<OutputType>::setDofValues(const DenseVector<OutputData> & values)
     301             : {
     302         144 :   _element_data->setDofValues(values);
     303         144 : }
     304             : 
     305             : template <typename OutputType>
     306             : void
     307        7824 : MooseLinearVariableFV<OutputType>::clearDofIndices()
     308             : {
     309        7824 :   _element_data->clearDofIndices();
     310        7824 : }
     311             : 
     312             : template <typename OutputType>
     313             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     314           0 : MooseLinearVariableFV<OutputType>::dofValues() const
     315             : {
     316           0 :   return _element_data->dofValues();
     317             : }
     318             : 
     319             : template <typename OutputType>
     320             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     321           0 : MooseLinearVariableFV<OutputType>::dofValuesNeighbor() const
     322             : {
     323           0 :   return _neighbor_data->dofValues();
     324             : }
     325             : 
     326             : template <typename OutputType>
     327             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     328           0 : MooseLinearVariableFV<OutputType>::dofValuesOld() const
     329             : {
     330           0 :   return _element_data->dofValuesOld();
     331             : }
     332             : 
     333             : template <typename OutputType>
     334             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     335           0 : MooseLinearVariableFV<OutputType>::dofValuesOlder() const
     336             : {
     337           0 :   return _element_data->dofValuesOlder();
     338             : }
     339             : 
     340             : template <typename OutputType>
     341             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     342           0 : MooseLinearVariableFV<OutputType>::dofValuesPreviousNL() const
     343             : {
     344           0 :   return _element_data->dofValuesPreviousNL();
     345             : }
     346             : 
     347             : template <typename OutputType>
     348             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     349           0 : MooseLinearVariableFV<OutputType>::dofValuesOldNeighbor() const
     350             : {
     351           0 :   return _neighbor_data->dofValuesOld();
     352             : }
     353             : 
     354             : template <typename OutputType>
     355             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     356           0 : MooseLinearVariableFV<OutputType>::dofValuesOlderNeighbor() const
     357             : {
     358           0 :   return _neighbor_data->dofValuesOlder();
     359             : }
     360             : 
     361             : template <typename OutputType>
     362             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     363           0 : MooseLinearVariableFV<OutputType>::dofValuesPreviousNLNeighbor() const
     364             : {
     365           0 :   return _neighbor_data->dofValuesPreviousNL();
     366             : }
     367             : 
     368             : template <typename OutputType>
     369             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     370           0 : MooseLinearVariableFV<OutputType>::dofValuesDot() const
     371             : {
     372           0 :   timeIntegratorError();
     373             : }
     374             : 
     375             : template <typename OutputType>
     376             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     377           0 : MooseLinearVariableFV<OutputType>::dofValuesDotDot() const
     378             : {
     379           0 :   timeIntegratorError();
     380             : }
     381             : 
     382             : template <typename OutputType>
     383             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     384           0 : MooseLinearVariableFV<OutputType>::dofValuesDotOld() const
     385             : {
     386           0 :   timeIntegratorError();
     387             : }
     388             : 
     389             : template <typename OutputType>
     390             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     391           0 : MooseLinearVariableFV<OutputType>::dofValuesDotDotOld() const
     392             : {
     393           0 :   timeIntegratorError();
     394             : }
     395             : 
     396             : template <typename OutputType>
     397             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     398           0 : MooseLinearVariableFV<OutputType>::dofValuesDotNeighbor() const
     399             : {
     400           0 :   timeIntegratorError();
     401             : }
     402             : 
     403             : template <typename OutputType>
     404             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     405           0 : MooseLinearVariableFV<OutputType>::dofValuesDotDotNeighbor() const
     406             : {
     407           0 :   timeIntegratorError();
     408             : }
     409             : 
     410             : template <typename OutputType>
     411             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     412           0 : MooseLinearVariableFV<OutputType>::dofValuesDotOldNeighbor() const
     413             : {
     414           0 :   timeIntegratorError();
     415             : }
     416             : 
     417             : template <typename OutputType>
     418             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     419           0 : MooseLinearVariableFV<OutputType>::dofValuesDotDotOldNeighbor() const
     420             : {
     421           0 :   timeIntegratorError();
     422             : }
     423             : 
     424             : template <typename OutputType>
     425             : const MooseArray<Number> &
     426           0 : MooseLinearVariableFV<OutputType>::dofValuesDuDotDu() const
     427             : {
     428           0 :   timeIntegratorError();
     429             : }
     430             : 
     431             : template <typename OutputType>
     432             : const MooseArray<Number> &
     433           0 : MooseLinearVariableFV<OutputType>::dofValuesDuDotDotDu() const
     434             : {
     435           0 :   timeIntegratorError();
     436             : }
     437             : 
     438             : template <typename OutputType>
     439             : const MooseArray<Number> &
     440           0 : MooseLinearVariableFV<OutputType>::dofValuesDuDotDuNeighbor() const
     441             : {
     442           0 :   timeIntegratorError();
     443             : }
     444             : 
     445             : template <typename OutputType>
     446             : const MooseArray<Number> &
     447           0 : MooseLinearVariableFV<OutputType>::dofValuesDuDotDotDuNeighbor() const
     448             : {
     449           0 :   timeIntegratorError();
     450             : }
     451             : 
     452             : template <typename OutputType>
     453             : void
     454      631182 : MooseLinearVariableFV<OutputType>::computeElemValues()
     455             : {
     456      631182 :   _element_data->setGeometry(Moose::Volume);
     457      631182 :   _element_data->computeValues();
     458      631182 : }
     459             : 
     460             : template <typename OutputType>
     461             : void
     462         340 : MooseLinearVariableFV<OutputType>::computeElemValuesFace()
     463             : {
     464         340 :   _element_data->setGeometry(Moose::Face);
     465         340 :   _element_data->computeValues();
     466         340 : }
     467             : 
     468             : template <typename OutputType>
     469             : void
     470           0 : MooseLinearVariableFV<OutputType>::computeNeighborValuesFace()
     471             : {
     472           0 :   _neighbor_data->setGeometry(Moose::Face);
     473           0 :   _neighbor_data->computeValues();
     474           0 : }
     475             : 
     476             : template <typename OutputType>
     477             : void
     478           0 : MooseLinearVariableFV<OutputType>::computeNeighborValues()
     479             : {
     480           0 :   _neighbor_data->setGeometry(Moose::Volume);
     481           0 :   _neighbor_data->computeValues();
     482           0 : }
     483             : 
     484             : template <typename OutputType>
     485             : void
     486           0 : MooseLinearVariableFV<OutputType>::computeLowerDValues()
     487             : {
     488           0 :   lowerDError();
     489             : }
     490             : 
     491             : template <typename OutputType>
     492             : void
     493           0 : MooseLinearVariableFV<OutputType>::computeNodalNeighborValues()
     494             : {
     495           0 :   nodalError();
     496             : }
     497             : 
     498             : template <typename OutputType>
     499             : void
     500           0 : MooseLinearVariableFV<OutputType>::computeNodalValues()
     501             : {
     502           0 :   nodalError();
     503             : }
     504             : 
     505             : template <typename OutputType>
     506             : const std::vector<dof_id_type> &
     507           0 : MooseLinearVariableFV<OutputType>::dofIndices() const
     508             : {
     509           0 :   return _element_data->dofIndices();
     510             : }
     511             : 
     512             : template <typename OutputType>
     513             : const std::vector<dof_id_type> &
     514           0 : MooseLinearVariableFV<OutputType>::dofIndicesNeighbor() const
     515             : {
     516           0 :   return _neighbor_data->dofIndices();
     517             : }
     518             : 
     519             : template <typename OutputType>
     520             : void
     521           0 : MooseLinearVariableFV<OutputType>::setLowerDofValues(const DenseVector<OutputData> &)
     522             : {
     523           0 :   lowerDError();
     524             : }
     525             : 
     526             : template <typename OutputType>
     527             : unsigned int
     528        1311 : MooseLinearVariableFV<OutputType>::oldestSolutionStateRequested() const
     529             : {
     530        1311 :   unsigned int state = 0;
     531        1311 :   state = std::max(state, _element_data->oldestSolutionStateRequested());
     532        1311 :   state = std::max(state, _neighbor_data->oldestSolutionStateRequested());
     533        1311 :   return state;
     534             : }
     535             : 
     536             : template <typename OutputType>
     537             : void
     538          11 : MooseLinearVariableFV<OutputType>::clearAllDofIndices()
     539             : {
     540          11 :   _element_data->clearDofIndices();
     541          11 :   _neighbor_data->clearDofIndices();
     542          11 : }
     543             : 
     544             : template <typename OutputType>
     545             : void
     546           0 : MooseLinearVariableFV<OutputType>::setNodalValue(const OutputType & /*value*/, unsigned int /*idx*/)
     547             : {
     548           0 :   nodalError();
     549             : }
     550             : 
     551             : template <typename OutputType>
     552             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     553           0 : MooseLinearVariableFV<OutputType>::nodalVectorTagValue(TagID) const
     554             : {
     555           0 :   nodalError();
     556             : }
     557             : 
     558             : template <typename OutputType>
     559             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     560           0 : MooseLinearVariableFV<OutputType>::nodalMatrixTagValue(TagID) const
     561             : {
     562           0 :   nodalError();
     563             : }
     564             : 
     565             : template <typename OutputType>
     566             : const std::vector<dof_id_type> &
     567           0 : MooseLinearVariableFV<OutputType>::dofIndicesLower() const
     568             : {
     569           0 :   lowerDError();
     570             : }
     571             : 
     572             : template <typename OutputType>
     573             : const typename MooseLinearVariableFV<OutputType>::FieldVariablePhiValue &
     574           0 : MooseLinearVariableFV<OutputType>::phiLower() const
     575             : {
     576           0 :   lowerDError();
     577             : }
     578             : 
     579             : template <typename OutputType>
     580             : void
     581         576 : MooseLinearVariableFV<OutputType>::insert(NumericVector<Number> & vector)
     582             : {
     583         576 :   _element_data->insert(vector);
     584         576 : }
     585             : 
     586             : template <typename OutputType>
     587             : void
     588           0 : MooseLinearVariableFV<OutputType>::insertLower(NumericVector<Number> & /*residual*/)
     589             : {
     590           0 :   mooseError("We don't support value insertion to residuals in MooseLinearVariableFV!");
     591             : }
     592             : 
     593             : template <typename OutputType>
     594             : void
     595           0 : MooseLinearVariableFV<OutputType>::add(NumericVector<Number> & /*residual*/)
     596             : {
     597           0 :   mooseError("We don't support value addition to residuals in MooseLinearVariableFV!");
     598             : }
     599             : 
     600             : template <typename OutputType>
     601             : void
     602        1871 : MooseLinearVariableFV<OutputType>::setActiveTags(const std::set<TagID> & vtags)
     603             : {
     604        1871 :   _element_data->setActiveTags(vtags);
     605        1871 :   _neighbor_data->setActiveTags(vtags);
     606        1871 : }
     607             : 
     608             : template <typename OutputType>
     609             : const MooseArray<OutputType> &
     610           0 : MooseLinearVariableFV<OutputType>::nodalValueArray() const
     611             : {
     612           0 :   nodalError();
     613             : }
     614             : 
     615             : template <typename OutputType>
     616             : const MooseArray<OutputType> &
     617           0 : MooseLinearVariableFV<OutputType>::nodalValueOldArray() const
     618             : {
     619           0 :   nodalError();
     620             : }
     621             : 
     622             : template <typename OutputType>
     623             : const MooseArray<OutputType> &
     624           0 : MooseLinearVariableFV<OutputType>::nodalValueOlderArray() const
     625             : {
     626           0 :   nodalError();
     627             : }
     628             : 
     629             : template <typename OutputType>
     630             : std::size_t
     631           0 : MooseLinearVariableFV<OutputType>::phiLowerSize() const
     632             : {
     633           0 :   lowerDError();
     634             : }
     635             : 
     636             : template <typename OutputType>
     637             : const typename MooseLinearVariableFV<OutputType>::FieldVariableValue &
     638          72 : MooseLinearVariableFV<OutputType>::vectorTagValue(TagID tag) const
     639             : {
     640          72 :   return _element_data->vectorTagValue(tag);
     641             : }
     642             : 
     643             : template <typename OutputType>
     644             : const typename MooseLinearVariableFV<OutputType>::DoFValue &
     645          72 : MooseLinearVariableFV<OutputType>::vectorTagDofValue(TagID tag) const
     646             : {
     647          72 :   return _element_data->vectorTagDofValue(tag);
     648             : }
     649             : 
     650             : template <typename OutputType>
     651             : const typename MooseLinearVariableFV<OutputType>::FieldVariableValue &
     652          24 : MooseLinearVariableFV<OutputType>::matrixTagValue(TagID tag) const
     653             : {
     654          24 :   return _element_data->matrixTagValue(tag);
     655             : }
     656             : 
     657             : template <typename OutputType>
     658             : const typename MooseLinearVariableFV<OutputType>::FieldVariablePhiSecond &
     659           0 : MooseLinearVariableFV<OutputType>::secondPhi() const
     660             : {
     661           0 :   mooseError("We don't currently implement second derivatives for FV");
     662             : }
     663             : 
     664             : template <typename OutputType>
     665             : const typename MooseLinearVariableFV<OutputType>::FieldVariablePhiValue &
     666           0 : MooseLinearVariableFV<OutputType>::curlPhi() const
     667             : {
     668           0 :   mooseError("We don't currently implement curl for FV");
     669             : }
     670             : 
     671             : template <typename OutputType>
     672             : const typename MooseLinearVariableFV<OutputType>::FieldVariablePhiDivergence &
     673           0 : MooseLinearVariableFV<OutputType>::divPhi() const
     674             : {
     675           0 :   mooseError("We don't currently implement divergence for FV");
     676             : }
     677             : 
     678             : template <typename OutputType>
     679             : const typename MooseLinearVariableFV<OutputType>::FieldVariablePhiSecond &
     680           0 : MooseLinearVariableFV<OutputType>::secondPhiFace() const
     681             : {
     682           0 :   mooseError("We don't currently implement second derivatives for FV");
     683             : }
     684             : 
     685             : template <typename OutputType>
     686             : const typename MooseLinearVariableFV<OutputType>::FieldVariablePhiSecond &
     687           0 : MooseLinearVariableFV<OutputType>::secondPhiFaceNeighbor() const
     688             : {
     689           0 :   mooseError("We don't currently implement second derivatives for FV");
     690             : }
     691             : 
     692             : template <typename OutputType>
     693             : const typename MooseLinearVariableFV<OutputType>::FieldVariablePhiSecond &
     694           0 : MooseLinearVariableFV<OutputType>::secondPhiNeighbor() const
     695             : {
     696           0 :   mooseError("We don't currently implement second derivatives for FV");
     697             : }
     698             : 
     699             : template <typename OutputType>
     700             : const typename MooseLinearVariableFV<OutputType>::FieldVariableValue &
     701         388 : MooseLinearVariableFV<OutputType>::sln() const
     702             : {
     703         388 :   return _element_data->sln(Moose::Current);
     704             : }
     705             : 
     706             : template <typename OutputType>
     707             : const typename MooseLinearVariableFV<OutputType>::FieldVariableValue &
     708           0 : MooseLinearVariableFV<OutputType>::slnOld() const
     709             : {
     710           0 :   return _element_data->sln(Moose::Old);
     711             : }
     712             : 
     713             : template <typename OutputType>
     714             : const typename MooseLinearVariableFV<OutputType>::FieldVariableValue &
     715           0 : MooseLinearVariableFV<OutputType>::slnOlder() const
     716             : {
     717           0 :   return _element_data->sln(Moose::Older);
     718             : }
     719             : 
     720             : template <typename OutputType>
     721             : const typename MooseLinearVariableFV<OutputType>::FieldVariableGradient &
     722          90 : MooseLinearVariableFV<OutputType>::gradSln() const
     723             : {
     724          90 :   return _element_data->gradSln(Moose::Current);
     725             : }
     726             : 
     727             : template <typename OutputType>
     728             : const typename MooseLinearVariableFV<OutputType>::FieldVariableGradient &
     729           0 : MooseLinearVariableFV<OutputType>::gradSlnOld() const
     730             : {
     731           0 :   return _element_data->gradSln(Moose::Old);
     732             : }
     733             : 
     734             : template <typename OutputType>
     735             : const typename MooseLinearVariableFV<OutputType>::FieldVariableValue &
     736           0 : MooseLinearVariableFV<OutputType>::slnNeighbor() const
     737             : {
     738           0 :   return _neighbor_data->sln(Moose::Current);
     739             : }
     740             : 
     741             : template <typename OutputType>
     742             : const typename MooseLinearVariableFV<OutputType>::FieldVariableValue &
     743           0 : MooseLinearVariableFV<OutputType>::slnOldNeighbor() const
     744             : {
     745           0 :   return _neighbor_data->sln(Moose::Old);
     746             : }
     747             : 
     748             : template <typename OutputType>
     749             : const typename MooseLinearVariableFV<OutputType>::FieldVariableGradient &
     750           0 : MooseLinearVariableFV<OutputType>::gradSlnNeighbor() const
     751             : {
     752           0 :   return _neighbor_data->gradSln(Moose::Current);
     753             : }
     754             : 
     755             : template <typename OutputType>
     756             : const typename MooseLinearVariableFV<OutputType>::FieldVariableGradient &
     757           0 : MooseLinearVariableFV<OutputType>::gradSlnOldNeighbor() const
     758             : {
     759           0 :   return _neighbor_data->gradSln(Moose::Old);
     760             : }
     761             : 
     762             : template <typename OutputType>
     763             : const ADTemplateVariableSecond<OutputType> &
     764           0 : MooseLinearVariableFV<OutputType>::adSecondSln() const
     765             : {
     766           0 :   adError();
     767             : }
     768             : 
     769             : template <typename OutputType>
     770             : const ADTemplateVariableValue<OutputType> &
     771           0 : MooseLinearVariableFV<OutputType>::adUDot() const
     772             : {
     773           0 :   adError();
     774             : }
     775             : 
     776             : template <typename OutputType>
     777             : const ADTemplateVariableValue<OutputType> &
     778           0 : MooseLinearVariableFV<OutputType>::adUDotDot() const
     779             : {
     780           0 :   adError();
     781             : }
     782             : 
     783             : template <typename OutputType>
     784             : const ADTemplateVariableGradient<OutputType> &
     785           0 : MooseLinearVariableFV<OutputType>::adGradSlnDot() const
     786             : {
     787           0 :   adError();
     788             : }
     789             : 
     790             : template <typename OutputType>
     791             : const ADTemplateVariableValue<OutputType> &
     792           0 : MooseLinearVariableFV<OutputType>::adSlnNeighbor() const
     793             : {
     794           0 :   adError();
     795             : }
     796             : 
     797             : template <typename OutputType>
     798             : const ADTemplateVariableGradient<OutputType> &
     799           0 : MooseLinearVariableFV<OutputType>::adGradSlnNeighbor() const
     800             : {
     801           0 :   adError();
     802             : }
     803             : 
     804             : template <typename OutputType>
     805             : const ADTemplateVariableSecond<OutputType> &
     806           0 : MooseLinearVariableFV<OutputType>::adSecondSlnNeighbor() const
     807             : {
     808           0 :   adError();
     809             : }
     810             : 
     811             : template <typename OutputType>
     812             : const ADTemplateVariableValue<OutputType> &
     813           0 : MooseLinearVariableFV<OutputType>::adUDotNeighbor() const
     814             : {
     815           0 :   adError();
     816             : }
     817             : 
     818             : template <typename OutputType>
     819             : const ADTemplateVariableValue<OutputType> &
     820           0 : MooseLinearVariableFV<OutputType>::adUDotDotNeighbor() const
     821             : {
     822           0 :   adError();
     823             : }
     824             : 
     825             : template <typename OutputType>
     826             : const ADTemplateVariableGradient<OutputType> &
     827           0 : MooseLinearVariableFV<OutputType>::adGradSlnNeighborDot() const
     828             : {
     829           0 :   adError();
     830             : }
     831             : 
     832             : template <typename OutputType>
     833             : const ADTemplateVariableValue<OutputType> &
     834           0 : MooseLinearVariableFV<OutputType>::adSln() const
     835             : {
     836           0 :   adError();
     837             : }
     838             : 
     839             : template <typename OutputType>
     840             : const ADTemplateVariableGradient<OutputType> &
     841           0 : MooseLinearVariableFV<OutputType>::adGradSln() const
     842             : {
     843           0 :   adError();
     844             : }
     845             : 
     846             : template <typename OutputType>
     847             : const ADTemplateVariableCurl<OutputType> &
     848           0 : MooseLinearVariableFV<OutputType>::adCurlSln() const
     849             : {
     850           0 :   adError();
     851             : }
     852             : 
     853             : template <typename OutputType>
     854             : const ADTemplateVariableCurl<OutputType> &
     855           0 : MooseLinearVariableFV<OutputType>::adCurlSlnNeighbor() const
     856             : {
     857           0 :   adError();
     858             : }
     859             : 
     860             : template <typename OutputType>
     861             : const MooseArray<ADReal> &
     862           0 : MooseLinearVariableFV<OutputType>::adDofValues() const
     863             : {
     864           0 :   adError();
     865             : }
     866             : 
     867             : template <typename OutputType>
     868             : const MooseArray<ADReal> &
     869           0 : MooseLinearVariableFV<OutputType>::adDofValuesNeighbor() const
     870             : {
     871           0 :   adError();
     872             : }
     873             : 
     874             : template <typename OutputType>
     875             : const MooseArray<ADReal> &
     876           0 : MooseLinearVariableFV<OutputType>::adDofValuesDot() const
     877             : {
     878           0 :   adError();
     879             : }
     880             : 
     881             : template <typename OutputType>
     882             : const dof_id_type &
     883           0 : MooseLinearVariableFV<OutputType>::nodalDofIndex() const
     884             : {
     885           0 :   nodalError();
     886             : }
     887             : 
     888             : template <typename OutputType>
     889             : const dof_id_type &
     890           0 : MooseLinearVariableFV<OutputType>::nodalDofIndexNeighbor() const
     891             : {
     892           0 :   nodalError();
     893             : }
     894             : 
     895             : template class MooseLinearVariableFV<Real>;

Generated by: LCOV version 1.14