https://mooseframework.inl.gov
FindValueOnLine.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 #include "GeneralPostprocessor.h"
13 #include "Coupleable.h"
14 
23 {
24 public:
26 
28 
29  virtual void initialize() override;
30  virtual void execute() override;
31 
32  virtual PostprocessorValue getValue() const override;
33 
34 protected:
35  Real getValueAtPoint(const Point & p);
36 
38  const Point _start_point;
39  const Point _end_point;
40  const Real _length;
42 
44  const Real _target;
45 
47  const bool & _error_if_not_found;
48 
51 
53  const unsigned int _depth;
54 
56  const Real _tol;
57 
60 
63 
66 
68  std::vector<Point> _point_vec;
69 
71  std::unique_ptr<libMesh::PointLocatorBase> _pl;
72 };
const Point _start_point
line to sample along
static InputParameters validParams()
virtual void execute() override
Execute method.
const bool & _error_if_not_found
boolean indicating whether to stop with an error if value is not found on the line ...
virtual PostprocessorValue getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Class for stuff related to variables.
Definition: Adaptivity.h:31
const Real _tol
tolerance for comparison to the target value
std::unique_ptr< libMesh::PointLocatorBase > _pl
helper object to locate elements containing points
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
const Real _length
MooseVariable & _coupled_var
coupled variable
FindValueOnLine(const InputParameters &parameters)
Find a specific target value along a sampling line.
Real getValueAtPoint(const Point &p)
Real PostprocessorValue
various MOOSE typedefs
Definition: MooseTypes.h:202
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
const Point _end_point
const Real & _default_value
value to return if target value is not found on the line and _error_if_not_found is false ...
MooseMesh & _mesh
The Mesh we&#39;re using.
const Real _target
value to find along the line
Interface for objects that needs coupling capabilities.
Definition: Coupleable.h:45
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned int _depth
search depth
std::vector< Point > _point_vec
So we don&#39;t have to create and destroy the dummy vector.
const InputParameters & parameters() const
Get the parameters of the object.
Real _position
detected interface location