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