https://mooseframework.inl.gov
FVGeometricAverage.C
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 #include "FVGeometricAverage.h"
11 
13 
16 {
18  params.addClassDescription("Linear interpolation that uses the geometric weighting on FaceInfo.");
19  return params;
20 }
21 
23  : FVInterpolationMethod(params)
24 {
25 }
26 
27 Real
29  const Real elem_value,
30  const Real neighbor_value) const
31 {
32  const Real gc = face.gC();
33  return gc * elem_value + (1.0 - gc) * neighbor_value;
34 }
35 
38  Real /*elem_value*/,
39  Real /*neighbor_value*/,
40  const VectorValue<Real> * /*elem_grad*/,
41  const VectorValue<Real> * /*neighbor_grad*/,
42  Real /*mass_flux*/) const
43 {
45  const Real gc = face.gC();
46  result.weights_matrix = std::make_pair(gc, 1.0 - gc);
47  return result;
48 }
49 
50 Real
52  Real elem_value,
53  Real neighbor_value,
54  const VectorValue<Real> *,
55  const VectorValue<Real> *,
56  Real) const
57 {
58  return interpolate(face, elem_value, neighbor_value);
59 }
registerMooseObject("MooseApp", FVGeometricAverage)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Registered base class for linear FV interpolation objects.
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:37
static InputParameters validParams()
Real gC() const
Return the geometric weighting factor.
Definition: FaceInfo.h:136
Real advectedInterpolateValue(const FaceInfo &face, Real elem_value, Real neighbor_value, const VectorValue< Real > *, const VectorValue< Real > *, Real) const override
Compute the advected face value.
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Matrix/RHS contribution for an advected face interpolation.
Simple linear interpolation that uses the geometric weighting stored on FaceInfo. ...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
AdvectedSystemContribution advectedInterpolate(const FaceInfo &face, Real, Real, const VectorValue< Real > *, const VectorValue< Real > *, Real) const override
Compute the matrix weights for the advected face value.
Real interpolate(const FaceInfo &face, Real elem_value, Real neighbor_value) const override
Face interpolation operation for this method.
FVGeometricAverage(const InputParameters &params)