https://mooseframework.inl.gov
PINSFVRhieChowInterpolator.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 
13 #include "CellCenteredMapFunctor.h"
14 #include <unordered_map>
15 
23 {
24 public:
27 
28  virtual void meshChanged() override;
29  virtual void initialize() override;
30  virtual void execute() override;
31  virtual void finalize() override;
32 
33 protected:
34  const Moose::FunctorBase<ADReal> & epsilon(THREAD_ID tid) const override;
35 
39  bool isFaceGeometricallyRelevant(const FaceInfo & fi) const;
40 
45 
48 
50  std::vector<const Moose::Functor<ADReal> *> _epss;
51 
53  std::vector<const Moose::Functor<ADReal> *> _smoothed_epss;
54 
57  const unsigned short _smoothing_layers;
58 
65  std::vector<const FaceInfo *> _geometric_fi;
66 
67 private:
73  void pinsfvSetup();
74 };
75 
76 inline const Moose::FunctorBase<ADReal> &
78 {
79  if (!_smoothing_layers)
80  return *_epss[tid];
81  else
82  return *_smoothed_epss[tid];
83 }
PINSFVRhieChowInterpolator(const InputParameters &params)
virtual void meshChanged() override
bool isFaceGeometricallyRelevant(const FaceInfo &fi) const
std::vector< const FaceInfo * > _geometric_fi
All the face information that are "geometrically" accessible on this process.
std::vector< const Moose::Functor< ADReal > * > _epss
All the thread copies of the problem&#39;s porosity functor.
std::vector< const Moose::Functor< ADReal > * > _smoothed_epss
All the thread copies of the problem&#39;s smoothed porosity functor.
static InputParameters validParams()
CellCenteredMapFunctor< ADReal, std::unordered_map< dof_id_type, ADReal > > _smoothed_eps
The smoothed porosity functor/field.
This user-object gathers &#39;a&#39; (on-diagonal velocity coefficients) data.
void pinsfvSetup()
called during the first initialize() and upon meshChanged(), this method performs the interpolations ...
const unsigned short _smoothing_layers
The number of interpolations and reconstructions that should be performed on the porosity functor/fie...
const Moose::Functor< ADReal > & _eps
The thread 0 copy of the porosity functor held by the subproblem.
A class that inherits the free-flow class&#39;s implementation of Rhie-Chow data gathering and adds the a...
unsigned int THREAD_ID
A functor whose evaluation relies on querying a map where the keys are element ids and the values cor...
const Moose::FunctorBase< ADReal > & epsilon(THREAD_ID tid) const override
A virtual method that allows us to only implement getVelocity once for free and porous flows...