20 : _fe_problem(fe_problem),
21 _dim(_fe_problem.
mesh().dimension()),
23 _libmesh_system(system.system()),
24 _system_number(_libmesh_system.number()),
25 _temporary_gradient(temporary_gradient)
31 : _fe_problem(x._fe_problem),
34 _libmesh_system(x._libmesh_system),
35 _system_number(x._system_number),
38 _temporary_gradient(x._temporary_gradient)
48 unsigned int size = 0;
62 std::vector<Real>(size, 0.0));
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 temporary_values_elem[i][face_i] = contribution(i);
101 temporary_values_neighbor[i][face_i] = -contribution(i);
117 ? face_info->elemInfo()
118 : face_info->neighborInfo();
122 const auto multiplier =
126 : dof_indices_neighbor;
128 ? temporary_values_elem
129 : temporary_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);
150 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.
const libMesh::System & _libmesh_system
Reference to the libMesh system backing the wrapper system.
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.
SystemBase & _system
The system wrapper this thread operates on.
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.
Base class for a system (of equations)
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
ComputeLinearFVGreenGaussGradientFaceThread(FEProblemBase &fe_problem, SystemBase &system, std::vector< std::unique_ptr< NumericVector< Number >>> &temporary_gradient)
Class constructor.
A class which helps with repeated reading from a petsc vector.
const unsigned int _system_number
Global system number (the number of this system in the libmesh equation system)
std::vector< std::unique_ptr< NumericVector< Number > > > & _temporary_gradient
Cache for the temporary gradient being built.
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.