https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
13#include "Coupleable.h"
14
23{
24public:
26
28
29 virtual void initialize() override;
30 virtual void execute() override;
31
32 virtual PostprocessorValue getValue() const override;
33
34protected:
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
50 const Real & _default_value;
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};
Real PostprocessorValue
various MOOSE typedefs
Definition MooseTypes.h:230
Interface for objects that needs coupling capabilities.
Definition Coupleable.h:53
Find a specific target value along a sampling line.
const Real & _default_value
value to return if target value is not found on the line and _error_if_not_found is false
static InputParameters validParams()
MooseVariable & _coupled_var
coupled variable
Real _position
detected interface location
virtual void execute() override
Execute method.
virtual PostprocessorValue getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
const bool & _error_if_not_found
boolean indicating whether to stop with an error if value is not found on the line
const unsigned int _depth
search depth
std::vector< Point > _point_vec
So we don't have to create and destroy the dummy vector.
const Point _start_point
line to sample along
const Point _end_point
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
MooseMesh & _mesh
The Mesh we're using.
const Real _tol
tolerance for comparison to the target value
Real getValueAtPoint(const Point &p)
const Real _target
value to find along the line
std::unique_ptr< libMesh::PointLocatorBase > _pl
helper object to locate elements containing points
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95