https://mooseframework.inl.gov
FunctorBinnedValuesDivision.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 "MeshDivision.h"
13 #include "NonADFunctorInterface.h"
14 
19 {
20 public:
22 
24 
25  virtual void initialize() override;
26  virtual unsigned int divisionIndex(const Point & pt) const override;
27  virtual unsigned int divisionIndex(const Elem & elem) const override;
28 
29 protected:
35  unsigned int getBinIndex(Real value, const Point & pt) const;
36 
38  const Real _min;
40  const Real _max;
42  const unsigned int _nbins;
46  const bool _oob_is_edge_bins;
47 };
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
unsigned int getBinIndex(Real value, const Point &pt) const
Get the bin for that functor value.
Divides the mesh based on the binned values of a functor.
This is a wrapper that forwards calls to the implementation, which can be switched out at any time wi...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const unsigned int _nbins
Number of value bins.
static InputParameters validParams()
Base class for MeshDivision objects.
Definition: MeshDivision.h:35
virtual void initialize() override
Set up any data members that would be necessary to obtain the division indices.
const Real _max
Max functor bin value.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
const Moose::Functor< Real > & _functor
Functor to use to subdivide the mesh.
virtual unsigned int divisionIndex(const Point &pt) const override
Return the index of the division to which the point belongs.
const Real _min
Min functor bin value.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
FunctorBinnedValuesDivision(const InputParameters &parameters)
const InputParameters & parameters() const
Get the parameters of the object.
const bool _oob_is_edge_bins
Whether to map functor values outside [min, max] onto the edge bins.