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