https://mooseframework.inl.gov
ComputeLinearFVGreenGaussGradientVolumeThread.h
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 
10 #pragma once
11 
12 #include "MooseTypes.h"
13 #include "MooseMesh.h"
14 #include "MooseLinearVariableFV.h"
15 
16 // libmesh
17 #include "libmesh/elem_range.h"
18 #include "libmesh/threads.h"
19 #include "libmesh/system.h"
20 
21 class FEProblemBase;
22 class SystemBase;
23 
39 {
40 public:
48  FEProblemBase & fe_problem,
49  SystemBase & system,
50  std::vector<std::unique_ptr<NumericVector<Number>>> & temporary_gradient);
51 
59  using ElemInfoRange = StoredRange<MooseMesh::const_elem_info_iterator, const ElemInfo *>;
62  void operator()(const ElemInfoRange & range);
63 
67 
68 protected:
69  // Reference to the problem
71 
73  const unsigned int _dim;
74 
77 
80 
82  const unsigned int _system_number;
83 
86 
89 
91  std::vector<std::unique_ptr<NumericVector<Number>>> & _temporary_gradient;
92 };
StoredRange< MooseMesh::const_elem_info_iterator, const ElemInfo * > ElemInfoRange
The gradient in a volume using Green Gauss theorem and a cell-centered finite-volume approximation ca...
Base class for a system (of equations)
Definition: SystemBase.h:85
std::vector< std::unique_ptr< NumericVector< Number > > > & _temporary_gradient
Cache for the temporary gradient being built.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void operator()(const ElemInfoRange &range)
Operator which is used to execute the thread over a certain iterator range.
SystemBase & _system
The system wrapper this thread operates on.
MooseLinearVariableFV< Real > * _current_var
Pointer to the current variable.
tbb::split split
void join(const ComputeLinearFVGreenGaussGradientVolumeThread &y)
Join threads at the end of the execution.
ComputeLinearFVGreenGaussGradientVolumeThread(FEProblemBase &fe_problem, SystemBase &system, std::vector< std::unique_ptr< NumericVector< Number >>> &temporary_gradient)
Class constructor.
const libMesh::System & _libmesh_system
Reference to the libmesh system.
unsigned int THREAD_ID
Definition: MooseTypes.h:237