17     FEProblemBase & fe_problem, 
const unsigned int linear_system_num)
    18   : _fe_problem(fe_problem),
    19     _dim(_fe_problem.
mesh().dimension()),
    20     _linear_system_number(linear_system_num),
    22         _fe_problem.getLinearSystem(_linear_system_number).system())),
    23     _system_number(_linear_system.number()),
    24     _new_gradient(_fe_problem.getLinearSystem(_linear_system_number).newGradientContainer())
    30   : _fe_problem(x._fe_problem),
    32     _linear_system_number(x._linear_system_number),
    33     _linear_system(x._linear_system),
    34     _system_number(x._system_number),
    37     _new_gradient(x._new_gradient)
    47   unsigned int size = 0;
    49   for (
const auto & variable :
    54                 "This should be a linear FV variable, did we somehow add a nonlinear variable to "    55                 "the linear system?");
    61       std::vector<std::vector<Real>> new_values_elem(
_new_gradient.size(),
    62                                                      std::vector<Real>(size, 0.0));
    63       std::vector<std::vector<Real>> new_values_neighbor(
_new_gradient.size(),
    64                                                          std::vector<Real>(size, 0.0));
    65       std::vector<dof_id_type> dof_indices_elem(size, 0);
    66       std::vector<dof_id_type> dof_indices_neighbor(size, 0);
    72         auto face_iterator = range.begin();
    75           const auto & face_info = *face_iterator;
    77           const auto current_face_type =
    84             dof_indices_elem[face_i] =
    86             dof_indices_neighbor[face_i] =
    89             const auto face_value =
    91                                                solution_reader(dof_indices_neighbor[face_i]),
    95             const auto contribution =
    96                 face_info->normal() * face_info->faceArea() * face_info->faceCoord() * face_value;
   100               new_values_elem[i][face_i] = contribution(i);
   101               new_values_neighbor[i][face_i] = -contribution(i);
   117                                                ? face_info->elemInfo()
   118                                                : face_info->neighborInfo();
   122             const auto multiplier =
   126                                           : dof_indices_neighbor;
   129                                                 : new_values_neighbor;
   131             dof_id_container[face_i] =
   136             const auto contribution = multiplier * face_info->normal() * face_info->faceArea() *
   137                                       face_info->faceCoord() *
   138                                       (bc_pointer ? bc_pointer->computeBoundaryValue()
   139                                                   : solution_reader(dof_id_container[face_i]));
   141               contribution_container[i][face_i] = contribution(i);
   148         _new_gradient[i]->add_vector(new_values_elem[i].data(), dof_indices_elem);
   149         _new_gradient[i]->add_vector(new_values_neighbor[i].data(), dof_indices_neighbor);
 
The gradient in a volume using Green Gauss theorem and a cell-centered finite-volume approximation ca...
const std::vector< MooseVariableFieldBase * > & getVariables(THREAD_ID tid)
void join(const ComputeLinearFVGreenGaussGradientFaceThread &y)
Join threads at the end of the execution. 
unsigned int number() const
Get variable number coming from libMesh. 
Tnew cast_ref(Told &oldvar)
void setupFaceData(const FaceInfo *face_info, const FaceInfo::VarFaceNeighbors face_type)
Set current face info. 
const unsigned int _dim
The dimension of the domain. 
MooseLinearVariableFV< Real > * _current_var
Pointer to the current variable. 
void operator()(const FaceInfoRange &range)
Operator which is used to execute the thread over a certain iterator range. 
LinearFVBoundaryCondition * getBoundaryCondition(const BoundaryID bd_id) const
Get the boundary condition object which corresponds to the given boundary ID. 
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
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. 
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations. 
StoredRange< MooseMesh::const_face_info_iterator, const FaceInfo * > FaceInfoRange
A class which helps with repeated reading from a petsc vector. 
std::vector< std::unique_ptr< NumericVector< Number > > > & _new_gradient
Cache for the new gradient which is being built. 
ComputeLinearFVGreenGaussGradientFaceThread(FEProblemBase &fe_problem, const unsigned int linear_system_num)
Class constructor. 
FEProblemBase & _fe_problem
Reference to the problem. 
const unsigned int _system_number
Global system number (the number of this system in the libmesh equation system) 
LinearSystem & getLinearSystem(unsigned int sys_num)
Get non-constant reference to a linear system. 
IntRange< T > make_range(T beg, T end)
std::unique_ptr< NumericVector< Number > > current_local_solution
virtual bool needsGradientVectorStorage() const override
Check if cell gradient computations were requested for this variable. 
const libMesh::LinearImplicitSystem & _linear_system
Reference to the linear system at libmesh level. 
const unsigned int _linear_system_number
The number of the linear system on which this thread is acting.