https://mooseframework.inl.gov
ReporterPointSource.h
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 
10 #pragma once
11 
12 // Moose Includes
13 #include "DiracKernel.h"
14 #include "ReporterInterface.h"
15 
22 {
23 public:
26  virtual void addPoints() override;
27 
28 protected:
29  virtual Real computeQpResidual() override;
36  void fillPoint(const Point & point, const dof_id_type id);
37  void errorCheck(const std::string & input_name, std::size_t reporterSize);
38 
40  const bool _combine_duplicates;
42  const bool _read_in_points;
44  const std::vector<Real> & _values;
46  std::vector<Real> _ones_vec;
47  std::vector<Real> _zeros_vec;
48  std::vector<Point> _zeros_pts;
50  const std::vector<Real> & _coordx;
52  const std::vector<Real> & _coordy;
54  const std::vector<Real> & _coordz;
56  const std::vector<Point> & _point;
58  const std::vector<Real> & _weight;
59 
61  std::unordered_map<Point, Real> _point_to_weightedValue;
62 };
ReporterPointSource(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const std::vector< Point > & _point
xyz point
virtual void addPoints() override
This is where the DiracKernel should call addPoint() for each point it needs to have a value distribu...
std::unordered_map< Point, Real > _point_to_weightedValue
map from an added point to it&#39;s weighted value
virtual Real computeQpResidual() override
This is the virtual that derived classes should override for computing the residual.
const std::vector< Real > & _coordx
x coordinate
A ReporterPointSource DiracKernel is used to create variable valued point sources.
Interface to allow object to consume Reporter values.
std::vector< Real > _ones_vec
convenience vectors (these are not const because reporters can change their size) ...
std::vector< Point > _zeros_pts
std::vector< Real > _zeros_vec
void errorCheck(const std::string &input_name, std::size_t reporterSize)
A DiracKernel is used when you need to add contributions to the residual by means of multiplying some...
Definition: DiracKernel.h:19
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< Real > & _coordy
y coordinate
const bool _read_in_points
bool if data format read in is points
const std::vector< Real > & _values
values at each xyz coordinate
const InputParameters & parameters() const
Get the parameters of the object.
const bool _combine_duplicates
bool if duplicate points values and weights should be combined
void fillPoint(const Point &point, const dof_id_type id)
Add points and check for duplicate points.
const std::vector< Real > & _weight
weights to scale value by
uint8_t dof_id_type
const std::vector< Real > & _coordz
z coordinate