https://mooseframework.inl.gov
PINSFVRhieChowInterpolatorSegregated.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 
11 #include "NS.h"
12 
13 using namespace libMesh;
14 
16 
19 {
21 
22  params.addClassDescription("Computes H/A and 1/A together with face velocities for segregated "
23  "porous medium momentum-pressure equations.");
24 
25  params.addParam<MooseFunctorName>(NS::porosity, "The porosity functor.");
26 
27  return params;
28 }
29 
31  const InputParameters & params)
33  _eps(getFunctor<ADReal>(NS::porosity)),
34  _epss(libMesh::n_threads(), nullptr)
35 {
36  const auto porosity_name = deduceFunctorName(NS::porosity);
37  for (const auto tid : make_range(libMesh::n_threads()))
38  _epss[tid] = &UserObject::_subproblem.getFunctor<ADReal>(porosity_name, tid, name(), true);
39 }
unsigned int n_threads()
const Moose::Functor< T > & getFunctor(const std::string &name, const THREAD_ID tid, const std::string &requestor_name, bool requestor_is_ad)
A user object which implements the Rhie Chow interpolation for segregated porous medium momentum-pres...
std::vector< const Moose::Functor< ADReal > * > _epss
All the thread copies of the problem&#39;s porosity functor.
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
virtual const std::string & name() const
SubProblem & _subproblem
static const std::string porosity
Definition: NS.h:104
registerMooseObject("NavierStokesApp", PINSFVRhieChowInterpolatorSegregated)
PINSFVRhieChowInterpolatorSegregated(const InputParameters &params)
IntRange< T > make_range(T beg, T end)
A user object which implements the Rhie Chow interpolation for segregated momentum-pressure systems...
static std::string deduceFunctorName(const std::string &name, const InputParameters &params)