ogs5py.fileclasses.msh.generator.rectangular

ogs5py.fileclasses.msh.generator.rectangular(dim=2, mesh_origin=(0.0, 0.0, 0.0), element_no=(10, 10, 10), element_size=(1.0, 1.0, 1.0))[source]

Generate a rectangular grid in 2D or 3D.

Parameters
  • dim (int, optional) – Dimension of the resulting mesh, either 2 or 3. Default: 3

  • mesh_origin (list of float, optional) – Origin of the mesh Default: [0.0, 0.0, 0.0]

  • element_no (list of int, optional) – Number of elements in each direction. Default: [10, 10, 10]

  • element_size (list of float, optional) – Size of an element in each direction. Default: [1.0 ,1.0 ,1.0]

Returns

result – Result contains one ‘#FEM_MSH’ block of the OGS mesh file with the following information (sorted by keys):

mesh_datadict

dictionary containing information about

  • AXISYMMETRY (bool)

  • CROSS_SECTION (bool)

  • PCS_TYPE (str)

  • GEO_TYPE (str)

  • GEO_NAME (str)

  • LAYER (int)

nodesndarray

Array with all node postions

elementsdict

contains nodelists for elements sorted by element types

material_iddict

contains material ids for each element sorted by element types

element_iddict

contains element ids for each element sorted by element types

Return type

dictionary