The gradient in a volume using Green Gauss theorem and a cell-centered finite-volume approximation can be computed as follows: More...
#include <ComputeLinearFVGreenGaussGradientFaceThread.h>
Public Types | |
| using | FaceInfoRange = StoredRange< MooseMesh::const_face_info_iterator, const FaceInfo * > |
Public Member Functions | |
| ComputeLinearFVGreenGaussGradientFaceThread (FEProblemBase &fe_problem, SystemBase &system, std::vector< std::unique_ptr< NumericVector< Number > > > &temporary_gradient, const std::unordered_set< unsigned int > &gradient_variables) | |
| Class constructor. | |
| ComputeLinearFVGreenGaussGradientFaceThread (ComputeLinearFVGreenGaussGradientFaceThread &x, Threads::split split) | |
| Splitting constructor. | |
| void | operator() (const FaceInfoRange &range) |
| Operator which is used to execute the thread over a certain iterator range. | |
| void | join (const ComputeLinearFVGreenGaussGradientFaceThread &y) |
| Join threads at the end of the execution. | |
Protected Attributes | |
| FEProblemBase & | _fe_problem |
| Reference to the problem. | |
| const unsigned int | _dim |
| The dimension of the domain. | |
| SystemBase & | _system |
| The system wrapper this thread operates on. | |
| const libMesh::System & | _libmesh_system |
| Reference to the libMesh system backing the wrapper system. | |
| const unsigned int | _system_number |
| Global system number (the number of this system in the libmesh equation system) | |
| THREAD_ID | _tid |
| Thread ID. | |
| MooseLinearVariableFV< Real > * | _current_var |
| Pointer to the current variable. | |
| std::vector< std::unique_ptr< NumericVector< Number > > > & | _temporary_gradient |
| Cache for the temporary gradient being built. | |
| const std::unordered_set< unsigned int > & | _gradient_variables |
| Indices of the variables this producer should compute gradients for. | |
The gradient in a volume using Green Gauss theorem and a cell-centered finite-volume approximation can be computed as follows:
\nabla u \approx \frac{1}{V_C} \sum_f u_f\vec{S}_f,
where V_C denotes the volume of the cell, f is a face iterator, while u_f and \vec{S}_f are the face value of the variable and surface area vector (the product of the surface area and normals), respectively. This object carries out the summation part over the faces (\sum_f u_f\vec{S}_f).
Definition at line 37 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
| using ComputeLinearFVGreenGaussGradientFaceThread::FaceInfoRange = StoredRange<MooseMesh::const_face_info_iterator, const FaceInfo *> |
Definition at line 59 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
| ComputeLinearFVGreenGaussGradientFaceThread::ComputeLinearFVGreenGaussGradientFaceThread | ( | FEProblemBase & | fe_problem, |
| SystemBase & | system, | ||
| std::vector< std::unique_ptr< NumericVector< Number > > > & | temporary_gradient, | ||
| const std::unordered_set< unsigned int > & | gradient_variables | ||
| ) |
Class constructor.
| fe_problem | Reference to the problem |
| system | The system which contains variables that need gradients. |
| temporary_gradient | Scratch storage for gradients being assembled. |
Definition at line 16 of file ComputeLinearFVGreenGaussGradientFaceThread.C.
| ComputeLinearFVGreenGaussGradientFaceThread::ComputeLinearFVGreenGaussGradientFaceThread | ( | ComputeLinearFVGreenGaussGradientFaceThread & | x, |
| Threads::split | split | ||
| ) |
Splitting constructor.
| x | Reference to the other bodies |
| split | The thread split |
Definition at line 31 of file ComputeLinearFVGreenGaussGradientFaceThread.C.
| void ComputeLinearFVGreenGaussGradientFaceThread::join | ( | const ComputeLinearFVGreenGaussGradientFaceThread & | y | ) |
Join threads at the end of the execution.
| y | Reference to the other bodies |
Definition at line 160 of file ComputeLinearFVGreenGaussGradientFaceThread.C.
| void ComputeLinearFVGreenGaussGradientFaceThread::operator() | ( | const FaceInfoRange & | range | ) |
Operator which is used to execute the thread over a certain iterator range.
| range | The range of FaceInfos which should be computed. |
Definition at line 46 of file ComputeLinearFVGreenGaussGradientFaceThread.C.
|
protected |
Pointer to the current variable.
Definition at line 89 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
Referenced by operator()().
|
protected |
The dimension of the domain.
Definition at line 74 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
Referenced by operator()().
|
protected |
Reference to the problem.
Definition at line 71 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
|
protected |
Indices of the variables this producer should compute gradients for.
Definition at line 96 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
Referenced by operator()().
|
protected |
Reference to the libMesh system backing the wrapper system.
Definition at line 80 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
Referenced by operator()().
|
protected |
The system wrapper this thread operates on.
Definition at line 77 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
Referenced by operator()().
|
protected |
Global system number (the number of this system in the libmesh equation system)
Definition at line 83 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
Referenced by operator()().
|
protected |
Cache for the temporary gradient being built.
It is needed because in certain scenarios the old gradient is used while assembling the replacement gradient.
Definition at line 93 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
Referenced by operator()().
|
protected |
Thread ID.
Definition at line 86 of file ComputeLinearFVGreenGaussGradientFaceThread.h.
Referenced by operator()().