Line data Source code
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 "MooseMesh.h" 13 : 14 : /** 15 : * Mesh generated from parameters 16 : */ 17 : class GeneratedMesh : public MooseMesh 18 : { 19 : public: 20 : static InputParameters validParams(); 21 : 22 : GeneratedMesh(const InputParameters & parameters); 23 1793 : GeneratedMesh(const GeneratedMesh & /* other_mesh */) = default; 24 : 25 : // No copy 26 : GeneratedMesh & operator=(const GeneratedMesh & other_mesh) = delete; 27 : 28 : virtual std::unique_ptr<MooseMesh> safeClone() const override; 29 : 30 : virtual void buildMesh() override; 31 : virtual Real getMinInDimension(unsigned int component) const override; 32 : virtual Real getMaxInDimension(unsigned int component) const override; 33 : virtual void prepared(bool state) override; 34 : 35 : protected: 36 : /// The dimension of the mesh 37 : MooseEnum _dim; 38 : 39 : /// Number of elements in x, y, z direction 40 : unsigned int _nx, _ny, _nz; 41 : 42 : /// The min/max values for x,y,z component 43 : Real _xmin, _xmax, _ymin, _ymax, _zmin, _zmax; 44 : 45 : /// All of the libmesh build_line/square/cube routines support an 46 : /// option to grade the mesh into the boundaries according to the 47 : /// spacing of the Gauss-Lobatto quadrature points. Defaults to 48 : /// false, and cannot be used in conjunction with x, y, and z 49 : /// biasing. 50 : bool _gauss_lobatto_grid; 51 : 52 : /// The amount by which to bias the cells in the x,y,z directions. 53 : /// Must be in the range 0.5 <= _bias_x <= 2.0. 54 : /// _bias_x < 1 implies cells are shrinking in the x-direction. 55 : /// _bias_x==1 implies no bias (original mesh unchanged). 56 : /// _bias_x > 1 implies cells are growing in the x-direction. 57 : Real _bias_x, _bias_y, _bias_z; 58 : 59 : /// Boolean to indicate that dimensions may have changed 60 : bool _dims_may_have_changed; 61 : };