https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FVGradientMethod.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 "MooseObject.h"
13#include "MooseTypes.h"
14#include "GradientLimiterType.h"
15
16#include <memory>
17#include <unordered_set>
18#include <vector>
19
20class SystemBase;
21
22namespace libMesh
23{
24template <typename T>
25class NumericVector;
26}
27
35{
36public:
38 using GradientContainer = std::vector<std::unique_ptr<libMesh::NumericVector<libMesh::Number>>>;
39
42
47 FVGradientMethod(const InputParameters & params);
48
56 void computeGradient(SystemBase & system,
57 GradientContainer & gradient,
58 const std::unordered_set<unsigned int> & variable_numbers) const;
59
62
63private:
72 SystemBase & system,
73 GradientContainer & gradient,
74 const std::unordered_set<unsigned int> & variable_numbers) const = 0;
75
78};
Base class for linear finite-volume cell-gradient methods.
static InputParameters validParams()
Input parameters shared by all the gradient methods.
Moose::FV::GradientLimiterType limiterType() const
Limiter selected for this method.
const Moose::FV::GradientLimiterType _limiter_type
Limiter applied after method-specific pre-limiter gradient computation.
std::vector< std::unique_ptr< libMesh::NumericVector< libMesh::Number > > > GradientContainer
One vector per spatial component of the cell-centered gradient.
void computeGradient(SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const
Compute the final gradient values for the requested variables.
virtual void computeGradientWithoutLimiter(SystemBase &system, GradientContainer &gradient, const std::unordered_set< unsigned int > &variable_numbers) const =0
Compute the method-specific gradient before this base class applies any limiter.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
Base class for a system (of equations)
Definition SystemBase.h:87
GradientLimiterType
Cell-gradient limiter variants used for MUSCL-style reconstructions.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...