https://mooseframework.inl.gov
HexagonalGridDivision.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 
15 class Positions;
16 
21 {
22 public:
24 
26 
27  virtual void initialize() override;
28  virtual unsigned int divisionIndex(const Point & pt) const override;
29  virtual unsigned int divisionIndex(const Elem & elem) const override;
30 
31 protected:
33  const Point _center;
36 
37  // Extent of the hexagonal lattice
42 
45 
47  const Real _min_z;
49  const Real _max_z;
50 
52  const unsigned int _nr;
54  const unsigned int _nz;
57 
59  std::unique_ptr<HexagonalLatticeUtils> _hex_latt;
60 };
const Point _center
Center of the lattice (single lattice)
const unsigned int _nr
Number of rings in the radial direction.
const Positions * _center_positions
Centers of the lattices (lattices centered around positions)
virtual unsigned int divisionIndex(const Point &pt) const override
Divides the mesh based on a hexagonal grid.
const Real _pin_pitch
Pitch between fuel pins.
const unsigned int _nz
Number of divisions in the Z direction.
const MooseEnum _z_axis_index
Axial component for the Z axis.
virtual void initialize() override
Class providing various utility functions related to triangular lattices of pins enclosed in a hexago...
const Real _min_z
Minimal axial coordinate.
HexagonalGridDivision(const InputParameters &parameters)
const bool _outside_grid_counts_as_border
Whether to map outside the grid onto the corner.
const Real _max_z
Maximal axial coordinate.
static InputParameters validParams()
std::unique_ptr< HexagonalLatticeUtils > _hex_latt
Hexagonal lattice utility object.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & parameters() const
const Real _lattice_flat_to_flat
Distance from one side to the one facing it of the lattice.