https://mooseframework.inl.gov
CartesianGridDivision.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 
14 class Positions;
15 
20 {
21 public:
23 
25 
26  virtual void initialize() override;
27  virtual unsigned int divisionIndex(const Point & pt) const override;
28  virtual unsigned int divisionIndex(const Elem & elem) const override;
29 
30 protected:
32  Point _bottom_left;
34  Point _top_right;
36  const Point * const _center;
40  const Point _widths;
42  const unsigned int _nx;
44  const unsigned int _ny;
46  const unsigned int _nz;
49 };
virtual unsigned int divisionIndex(const Point &pt) const override
Return the index of the division to which the point belongs.
Point _top_right
Top right point of the grid.
Positions objects are under the hood Reporters.
Definition: Positions.h:20
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Divides the mesh based on a Cartesian grid.
const Point _widths
Width of the grid in all 3 axes.
const Point *const _center
Center of the grid, if user-specified.
Base class for MeshDivision objects.
Definition: MeshDivision.h:35
const bool _outside_grid_counts_as_border
Whether to map outside the grid onto the corner.
Point _bottom_left
Bottom left point of the grid.
const unsigned int _nx
Number of divisions in the X direction.
virtual void initialize() override
Set up any data members that would be necessary to obtain the division indices.
static InputParameters validParams()
CartesianGridDivision(const InputParameters &parameters)
const unsigned int _ny
Number of divisions in the Y direction.
const InputParameters & parameters() const
Get the parameters of the object.
const Positions *const _center_positions
Positions object holding the centers of the grids, if user-specified.
const unsigned int _nz
Number of divisions in the Z direction.