forked from idaholab/moose
/
VectorPostprocessorPointSource.h
44 lines (37 loc) · 1.36 KB
/
VectorPostprocessorPointSource.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
// Moose Includes
#include "DiracKernel.h"
#include "ReporterInterface.h"
// Forward Declarations
class VectorPostprocessorPointSource;
template <>
InputParameters validParams<VectorPostprocessorPointSource>();
/**
* A VectorPostprocessorPointSource DiracKernel is used to create variable valued point sources.
* Coordinates and values are given by a vector Postprocessor. Values and coordinates for the point
* source are allowed change as the vector Postprocessor is updated.
*/
class VectorPostprocessorPointSource : public DiracKernel, public ReporterInterface
{
public:
static InputParameters validParams();
VectorPostprocessorPointSource(const InputParameters & parameters);
virtual void addPoints() override;
protected:
virtual Real computeQpResidual() override;
private:
const std::vector<Real> & _vpp_values;
const std::vector<Real> & _x_coord;
const std::vector<Real> & _y_coord;
const std::vector<Real> & _z_coord;
/// map to associate points with their index into the vpp value
std::map<Point, size_t> _point_to_index;
};