https://mooseframework.inl.gov
porous_flow
test
src
vectorpostprocessors
DiracPointsWriter.C
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
#include "
DiracPointsWriter.h
"
11
12
#include "libmesh/parallel_algebra.h"
13
14
registerMooseObject
(
"PorousFlowTestApp"
,
DiracPointsWriter
);
15
16
InputParameters
17
DiracPointsWriter::validParams
()
18
{
19
return
GeneralVectorPostprocessor::validParams
();
20
}
21
22
DiracPointsWriter::DiracPointsWriter
(
const
InputParameters
& parameters)
23
:
GeneralVectorPostprocessor
(parameters),
24
_xs(declareVector(
"x"
)),
25
_ys(declareVector(
"y"
)),
26
_zs(declareVector(
"z"
))
27
{
28
}
29
30
void
31
DiracPointsWriter::execute
()
32
{
33
_xs
.clear();
34
_ys
.clear();
35
_zs
.clear();
36
std::set<Point> points;
37
for
(
auto
& entry :
_subproblem
.
diracKernelInfo
().
getPoints
())
38
if
(entry.first->active())
39
points.insert(entry.second.first.begin(), entry.second.first.end());
40
41
// Not every processor might know about every point
42
this->
comm
().
set_union
(points);
43
44
for
(
auto
& p : points)
45
{
46
_xs
.push_back(p(0));
47
_ys
.push_back(p(1));
48
_zs
.push_back(p(2));
49
}
50
}
DiracPointsWriter::_zs
VectorPostprocessorValue & _zs
Definition:
DiracPointsWriter.h:31
DiracPointsWriter::_ys
VectorPostprocessorValue & _ys
Definition:
DiracPointsWriter.h:30
GeneralVectorPostprocessor
libMesh::ParallelObject::comm
const Parallel::Communicator & comm() const
GeneralVectorPostprocessor::_subproblem
SubProblem & _subproblem
DiracPointsWriter
Approximates a line sink by a sequence of Dirac Points.
Definition:
DiracPointsWriter.h:18
InputParameters
DiracPointsWriter::execute
virtual void execute() override
Definition:
DiracPointsWriter.C:31
DiracKernelInfo::getPoints
MultiPointMap & getPoints()
GeneralVectorPostprocessor::validParams
static InputParameters validParams()
SubProblem::diracKernelInfo
virtual DiracKernelInfo & diracKernelInfo()
DiracPointsWriter::validParams
static InputParameters validParams()
Definition:
DiracPointsWriter.C:17
DiracPointsWriter::_xs
VectorPostprocessorValue & _xs
Definition:
DiracPointsWriter.h:29
DiracPointsWriter.h
registerMooseObject
registerMooseObject("PorousFlowTestApp", DiracPointsWriter)
DiracPointsWriter::DiracPointsWriter
DiracPointsWriter(const InputParameters ¶meters)
Definition:
DiracPointsWriter.C:22
libMesh::Parallel::Communicator::set_union
void set_union(T &data, const unsigned int root_id) const
Generated on Fri Jul 18 2025 13:43:28 for https://mooseframework.inl.gov by
1.8.14