Skip to content

Commit

Permalink
Address comments (idaholab#6389)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed May 4, 2016
1 parent 4de604c commit c1ba8f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion framework/include/postprocessors/FindValueOnLine.h
Expand Up @@ -61,7 +61,7 @@ class FindValueOnLine : public GeneralPostprocessor, public Coupleable
/// The Mesh we're using
MooseMesh & _mesh;

/// So we don't have to create and destroy teh dummy vector
/// So we don't have to create and destroy the dummy vector
std::vector<Point> _point_vec;

/// helper object to locate elements containing points
Expand Down
5 changes: 3 additions & 2 deletions framework/src/postprocessors/FindValueOnLine.C
Expand Up @@ -7,6 +7,7 @@

#include "FindValueOnLine.h"
#include "MooseMesh.h"
#include "MooseUtils.h"

template<>
InputParameters validParams<FindValueOnLine>()
Expand All @@ -17,7 +18,7 @@ InputParameters validParams<FindValueOnLine>()
params.addParam<Point>("end_point", "End point of the sampling line.");
params.addParam<Real>("target", "Target value to locate.");
params.addParam<unsigned int>("depth", 30, "Maximum number of bisections to perform.");
params.addParam<Real>("tol", 1e-10, "Stop search if a value within a symmetric interval of this with around the target is found.");
params.addParam<Real>("tol", 1e-10, "Stop search if a value is found that is equal to the target with this tolerance applied.");
params.addCoupledVar("v", "Variable to inspect");
return params;
}
Expand Down Expand Up @@ -64,7 +65,7 @@ FindValueOnLine::execute()
Real value = getValueAtPoint(p);

// have we hit the target value yet?
if (value > _target - _tol && value < _target + _tol)
if (MooseUtils::absoluteFuzzyEqual(value, _target, _tol))
break;

// bisect
Expand Down

0 comments on commit c1ba8f6

Please sign in to comment.