https://mooseframework.inl.gov
CartesianMeshGenerator.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 "MeshGenerator.h"
13 #include "MooseEnum.h"
14 
15 /*
16  * Mesh generator to create a Cartesian mesh
17  */
19 {
20 public:
22 
24 
25  std::unique_ptr<MeshBase> generate() override;
26 
27 protected:
31  std::vector<Real> _dx;
33  std::vector<unsigned int> _ix;
35  std::vector<Real> _dy;
37  std::vector<unsigned int> _iy;
39  std::vector<Real> _dz;
41  std::vector<unsigned int> _iz;
43  std::vector<unsigned int> _subdomain_id;
45  int _nx, _ny, _nz;
46 };
MooseEnum _dim
The dimension of the mesh.
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
CartesianMeshGenerator(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
int _nx
Number of elements in x, y, z direction.
std::vector< Real > _dy
Intervals in y direction.
std::vector< unsigned int > _ix
Number of grids in all intervals in x direction.
std::vector< unsigned int > _subdomain_id
Block IDs.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
std::vector< unsigned int > _iy
Number of grids in all intervals in y direction.
std::vector< Real > _dx
Intervals in x direction.
std::vector< unsigned int > _iz
Number of grids in all intervals in z direction.
std::vector< Real > _dz
Intervals in z direction.
const InputParameters & parameters() const
Get the parameters of the object.
MeshGenerators are objects that can modify or add to an existing mesh.
Definition: MeshGenerator.h:32
static InputParameters validParams()