https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeLinearFVLimitedGradientThread.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"
15#include "GradientLimiterType.h"
16
17#include <unordered_set>
18
19// libmesh
20#include "libmesh/elem_range.h"
21#include "libmesh/threads.h"
22#include "libmesh/system.h"
23
24class FEProblemBase;
25class SystemBase;
26
33{
34public:
46 FEProblemBase & fe_problem,
47 SystemBase & system,
48 const std::vector<std::unique_ptr<NumericVector<Number>>> & raw_gradient,
49 std::vector<std::unique_ptr<NumericVector<Number>>> & temporary_limited_gradient,
50 const Moose::FV::GradientLimiterType limiter_type,
51 const std::unordered_set<unsigned int> & requested_variables);
52
59 Threads::split split);
60
61 using ElemInfoRange = StoredRange<MooseMesh::const_elem_info_iterator, const ElemInfo *>;
64 void operator()(const ElemInfoRange & range);
65
68
69protected:
72
74 const unsigned int _dim;
75
78
81
83 const unsigned int _system_number;
84
86 const std::vector<std::unique_ptr<NumericVector<Number>>> & _raw_gradient;
87
90
92 const std::unordered_set<unsigned int> & _requested_variables;
93
96
99
101 std::vector<std::unique_ptr<NumericVector<Number>>> & _temporary_limited_gradient;
102};
unsigned int THREAD_ID
Definition MooseTypes.h:237
Compute limited cell gradients for linear FV variables.
std::vector< std::unique_ptr< NumericVector< Number > > > & _temporary_limited_gradient
Reference to the temporary limited gradient storage.
const std::unordered_set< unsigned int > & _requested_variables
Variable numbers that requested the current limiter.
const unsigned int _system_number
Global system number in the libMesh equation system.
MooseLinearVariableFV< Real > * _current_var
Pointer to the current variable we are operating on.
SystemBase & _system
The system wrapper this thread operates on.
FEProblemBase & _fe_problem
Reference to the problem.
StoredRange< MooseMesh::const_elem_info_iterator, const ElemInfo * > ElemInfoRange
const std::vector< std::unique_ptr< NumericVector< Number > > > & _raw_gradient
Reference to the raw gradient storage used as input for limiting.
const libMesh::System & _libmesh_system
Reference to the libMesh system backing the wrapper system.
const Moose::FV::GradientLimiterType _limiter_type
The type of the limiter we requested.
void join(const ComputeLinearFVLimitedGradientThread &y)
Join threads at the end of the execution.
const unsigned int _dim
The dimension of the domain.
void operator()(const ElemInfoRange &range)
Operator which is used to execute the thread over a certain iterator range.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
This class provides variable solution interface for linear finite volume problems.
Base class for a system (of equations)
Definition SystemBase.h:87
GradientLimiterType
Cell-gradient limiter variants used for MUSCL-style reconstructions.