23 "value_name",
"reporter value name. This uses the reporter syntax <reporter>/<name>.");
26 "reporter x-coordinate name. This uses the reporter syntax <reporter>/<name>.");
29 "reporter y-coordinate name. This uses the reporter syntax <reporter>/<name>.");
32 "reporter z-coordinate name. This uses the reporter syntax <reporter>/<name>.");
34 "reporter point name. This uses the reporter syntax "
35 "<reporter>/<name>.");
37 "Name of vector-postprocessor or reporter vector containing "
38 "weights to scale value, default is assumed to be all 1s.");
41 params.
set<
bool>(
"drop_duplicate_points") =
false;
49 _read_in_points(isParamValid(
"point_name")),
51 _ones_vec(_values.size(), 1.0),
52 _zeros_vec(_values.size(), 0.0),
53 _zeros_pts(_values.size(), Point()),
54 _coordx(isParamValid(
"x_coord_name")
57 _coordy(isParamValid(
"y_coord_name")
60 _coordz(isParamValid(
"z_coord_name")
63 _point(_read_in_points
66 _weight(isParamValid(
"weight_name")
72 paramError(
"Either supply x,y, and z reporters or a point reporter.");
78 const auto nval =
_values.size();
80 paramError(
"value_name",
"Value vector must not be empty.");
96 for (
const auto & i : index_range(
_point))
101 std::vector<Point> points(
_coordx.size());
102 for (
const auto i : index_range(
_values))
120 const auto nval =
_values.size();
121 if (reporterSize != nval)
127 ") does not match number of entries read for value_name (",
const ReporterMode REPORTER_MODE_REPLICATED
registerMooseObject("MooseApp", ReporterPointSource)
unsigned int _i
i-th, j-th index for enumerating shape and test functions
unsigned int _qp
Quadrature point index.
void addPoint(const Elem *elem, Point p, unsigned id=libMesh::invalid_uint, Real value=1.0)
Add the physical x,y,z point located in the element "elem" to the list of points this DiracKernel wil...
A DiracKernel is used when you need to add contributions to the residual by means of multiplying some...
static InputParameters validParams()
const OutputTools< T >::VariableTestValue & _test
Values of test functions at QPs.
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 ...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Interface to allow object to consume Reporter values.
The Reporter system is comprised of objects that can contain any number of data values.
A ReporterPointSource DiracKernel is used to create variable valued point sources.
virtual Real computeQpResidual() override
This is the virtual that derived classes should override for computing the residual.
virtual void addPoints() override
This is where the DiracKernel should call addPoint() for each point it needs to have a value distribu...
ReporterPointSource(const InputParameters ¶meters)
const std::vector< Point > & _point
xyz point
const std::vector< Real > & _coordx
x coordinate
static InputParameters validParams()
std::vector< Real > _ones_vec
convenience vectors (these are not const because reporters can change their size)
const std::vector< Real > & _coordz
z coordinate
const std::vector< Real > & _values
values at each xyz coordinate
void errorCheck(const std::string &input_name, std::size_t reporterSize)
const std::vector< Real > & _coordy
y coordinate
const bool _read_in_points
bool if data format read in is points
const std::vector< Real > & _weight
weights to scale value by
std::vector< Point > _zeros_pts
std::vector< Real > _zeros_vec