15 #include "libmesh/quadrature.h" 26 "variable",
"The names of the variables that this VectorPostprocessor operates on");
47 const auto num_fv_vars =
52 "This object cannot accept mixed FE and FV variables, please make " 53 "sure all the provided variables are either FE or FV by separating this vector " 55 "into two blocks, one for finite element and another for finite volume variables!");
94 for (
unsigned int i = 0; i <
_fv_vars.size(); i++)
96 mooseAssert(
_fv_vars[i]->hasFaceSide(*fi,
true) ||
_fv_vars[i]->hasFaceSide(*fi,
false),
98 " should be defined on one side of the face!");
100 const auto * elem =
_fv_vars[i]->hasFaceSide(*fi,
true) ? fi->elemPtr() : fi->neighborPtr();
Base class for VectorPostprocessors that need to do "sampling" of values in the domain.
virtual void initialize()
Initialize the datastructures.
std::vector< MooseVariableFV< Real > * > _coupled_standard_fv_moose_vars
Vector of standard finite volume coupled variables.
SideValueSampler(const InputParameters ¶meters)
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
std::vector< Real > _values
So we don't have to create and destroy this vector over and over again.
static InputParameters validParams()
const MooseArray< Point > & _q_point
virtual void finalize() override
Finalize the values.
virtual const std::string & name() const
Get the name of the class.
std::vector< const FaceInfo * > _face_infos
Holds the FaceInfos to loop on to consider all active neighbors of an element on a given side...
void setupVariables(const std::vector< std::string > &variable_names)
You MUST call this in the constructor of the child class and pass down the name of the variables...
A structure defining a "face" evaluation calling argument for Moose functors.
virtual void threadJoin(const SamplerBase &y)
Join the values.
void getFaceInfos()
Computes the local FaceInfo(s) to use in functor arguments and interpolations.
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
static InputParameters validParams()
registerMooseObject("MooseApp", SideValueSampler)
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
virtual void finalize()
Finalize the values.
virtual void addSample(const Point &p, const Real &id, const std::vector< Real > &values)
Call this with the value of every variable at each point you want to sample at.
const QBase *const & _qrule
std::vector< MooseLinearVariableFV< Real > * > _coupled_standard_linear_fv_moose_vars
Vector of standard linear finite volume coupled variables.
virtual void threadJoin(const UserObject &y) override
Must override.
virtual void execute() override
Execute method.
bool _qp_sampling
Whether to sample over side quadrature points or FaceInfos.
const Elem *const & _current_elem
void checkForStandardFieldVariableType(const MooseVariableFieldBase *const var_ptr, const std::string &var_param_name="variable") const
Checks whether the passed variable pointer corresponds to a regular single-valued field variable...
virtual void initialize() override
Initialize the datastructures.
std::vector< const MooseVariableField< Real > * > _fv_vars
Pointers to the FV variables to sample (if any)
Base class for user-specific data.