ogs5py.fileclasses.msh.generator.grid_adapter2D
- ogs5py.fileclasses.msh.generator.grid_adapter2D(out_dim=(100.0, 100.0), in_dim=(50.0, 50.0), out_res=(10.0, 10.0), in_res=(1.0, 1.0), out_pos=(0.0, 0.0), in_pos=(25.0, 25.0), z_pos=0.0, in_mat=0, out_mat=0, fill=False)[source]
Generate a grid adapter.
2D adapter from an outer grid resolution to an inner grid resolution with gmsh.
- Parameters:
out_dim (list of 2 float) – xy-Dimension of the outer block
in_dim (list of 2 float) – xy-Dimension of the inner block
out_res (list of 2 float) – Grid resolution of the outer block
in_res (list of 2 float) – Grid resolution of the inner block
out_pos (list of 2 float) – xy-Position of the origin of the outer block
in_pos (list of 2 float) – xy-Position of the origin of the inner block
z_pos (float) – z-Position of the origin of the whole block
in_mat (integer) – Material-ID of the inner block
out_mat (integer) – Material-ID of the outer block
fill (bool, optional) – State if the inner block should be filled with a rectangular mesh. Default: False.
- 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