forked from idaholab/moose
/
ReporterPointMarker.h
42 lines (37 loc) · 1.22 KB
/
ReporterPointMarker.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
//* 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
#include "Marker.h"
#include "ReporterInterface.h"
/**
* Marks all elements near a given boundary for refinement/coarsening
*/
class ReporterPointMarker : public Marker, public ReporterInterface
{
public:
static InputParameters validParams();
ReporterPointMarker(const InputParameters & parameters);
virtual void timestepSetup() override;
protected:
virtual MarkerValue computeElementMarker() override;
/// marker value to give elements containing a point
const MarkerValue _inside;
/// marker for elements not containing points
const MarkerValue _empty;
/// x coordinate
const std::vector<Real> & _x_coord;
/// y coordinate
const std::vector<Real> & _y_coord;
///z coordinate
const std::vector<Real> & _z_coord;
/// Pointer to PointLocatorBase object
std::unique_ptr<PointLocatorBase> _pl;
/// list of sort uniqued elements containing points
std::set<dof_id_type> _point_elems;
};