17 #include <unordered_map> 19 #include <unordered_set> 79 bool subtract_mesh_velocity)
const override;
85 virtual void execute()
override;
88 virtual bool segregated()
const override {
return false; };
123 std::vector<std::unique_ptr<PiecewiseByBlockLambdaFunctor<ADRealVectorValue>>>
_vel;
135 std::vector<std::unique_ptr<Moose::VectorCompositeFunctor<ADReal>>>
_disps;
186 std::vector<const Moose::FunctorBase<VectorValue<ADReal>> *>
_a_read;
191 std::vector<std::unique_ptr<Moose::FunctorBase<VectorValue<ADReal>>>>
_a_aux;
225 Threads::spin_mutex::scoped_lock lock(
_a_mutex);
243 const auto *
const u =
_us[tid];
250 const auto *
const p =
_ps[tid];
virtual void initialize() override
bool needAComputation() const
Whether we need 'a' coefficient computation.
std::vector< MooseVariableFVReal * > _ps
All the thread copies of the pressure variable.
std::vector< const Moose::Functor< Real > * > _volumetric_force
Values of the functors storing the volumetric forces.
CellCenteredMapFunctor< ADRealVectorValue, std::unordered_map< dof_id_type, ADRealVectorValue > > _a
A map from element IDs to 'a' coefficient data.
virtual void execute() override
virtual bool segregated() const override
Bool of the Rhie Chow user object is used in monolithic/segregated approaches.
virtual void ghostADataOnBoundary(const BoundaryID boundary_id) override
makes sure coefficient data gets communicated on both sides of a given boundary
static const std::string component
std::vector< MooseVariableField< Real > * > _disp_xs
All the thread copies of the x-displacement variable.
std::vector< MooseVariableField< Real > * > _disp_ys
All the thread copies of the y-displacement variable.
const Moose::ConstantFunctor< ADReal > _zero_functor
A zero functor potentially used in _a_read.
bool _pull_all_nonlocal
Whether we want to pull all nonlocal 'a' coefficient data.
Moose::VectorComponentFunctor< ADReal > _az
The z-component of 'a'.
const std::vector< MooseFunctorName > * _volumetric_force_functors
Names of the functors storing the volumetric forces.
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
DualNumber< Real, DNDerivativeType, true > ADReal
std::vector< MooseVariableFVReal * > _us
All the thread copies of the x-velocity variable.
bool pressureSkewCorrection(THREAD_ID tid) const
Whether central differencing face interpolations of pressure should include a skewness correction...
virtual VectorValue< ADReal > getVelocity(const Moose::FV::InterpMethod m, const FaceInfo &fi, const Moose::StateArg &time, const THREAD_ID tid, bool subtract_mesh_velocity) const override
Retrieve a face velocity.
static InputParameters uniqueParams()
Parameters of this object that should be added to the NSFV action that are unique to this object...
virtual void addToA(const libMesh::Elem *elem, unsigned int component, const ADReal &value) override
API that momentum residual objects that have on-diagonals for velocity call.
Moose::VectorComponentFunctor< ADReal > _ay
The y-component of 'a'.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
static InputParameters validParams()
boundary_id_type BoundaryID
void insfvSetup()
perform the setup of this object
std::unordered_set< const Elem * > _elements_to_push_pull
Non-local elements that we should push and pull data for across processes.
void fillARead()
Fills the _a_read data member at construction time with the appropriate functors. ...
Moose::FV::InterpMethod _velocity_interp_method
The interpolation method to use for the velocity.
const MooseEnum _volume_force_correction_method
– Method used for computing the properties average
static std::vector< std::string > listOfCommonParams()
std::vector< const Moose::FunctorBase< VectorValue< ADReal > > * > _a_read
A vector sized according to the number of threads that holds the 'a' data we will read from when comp...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void meshChanged() override
Threads::spin_mutex _a_mutex
Mutex that prevents multiple threads from saving into the 'a' coefficients at the same time...
const VectorValue< ADReal > _example
An example datum used to help communicate AD vector information in parallel.
Real _baseline_volume_force
Minimum absolute RC force over the domain.
std::unique_ptr< ConstElemRange > _elem_range
All the active and elements local to this process that exist on this object's subdomains.
std::vector< std::unique_ptr< Moose::VectorCompositeFunctor< ADReal > > > _disps
A functor for computing the displacement.
std::vector< MooseVariableField< Real > * > _disp_zs
All the thread copies of the z-displacement variable.
const bool & _bool_correct_vf
Correct Rhie-Chow coefficients for volumetric force flag.
virtual void initialSetup() override
This user-object gathers 'a' (on-diagonal velocity coefficients) data.
Moose::VectorComponentFunctor< ADReal > _ax
bool _a_data_provided
Whether 'a' data has been provided by the user.
bool velocitySkewCorrection(THREAD_ID tid) const
Whether central differencing face interpolations of velocity should include a skewness correction Als...
virtual void finalize() override
void pullAllNonlocal()
Whether to pull all 'a' coefficient data from the owning process for all nonlocal elements we have ac...
processor_id_type processor_id() const
INSFVRhieChowInterpolator(const InputParameters ¶ms)
std::vector< std::unique_ptr< Moose::FunctorBase< VectorValue< ADReal > > > > _a_aux
A vector sized according to the number of threads that holds vector composites of 'a' component funct...
std::vector< std::unique_ptr< PiecewiseByBlockLambdaFunctor< ADRealVectorValue > > > _vel
A functor for computing the (non-RC corrected) velocity.
const unsigned int _momentum_sys_number
The number of the nonlinear system in which the monolithic momentum and continuity equations are loca...
A functor whose evaluation relies on querying a map where the keys are element ids and the values cor...