m_mesh.py

class m_mesh.MeshModule

Bases: object

Load_Mesh()

Loads mesh from "data_" + self.name + "/HDF5/meshes/mesh_" + str(int(reload_HDF5)) + ".h5".

create_mesh()

Creates a rectangular mesh with a bottom left point at \((x,y) = (0,0)\) and a top right point at \((x,y) = (\) length, height\()\).

define_boundaries()

Defines and numbers the top (1), bottom (2), left (3) and right (4) boundaries of the rectangular domain.

move_mesh(u_mesh)

Moves the mesh by the displacement \(\boldsymbol{u}_{mesh}\).

refine_mesh()

Refines the mesh in a rectangular region given by the refinement option.

m_mesh.count_nodes(bound_mesh)

Counts the nodes at the top boundary for m_mesh.MeshModule.detect_oscillations().

m_mesh.detect_oscillations(mesh, bound_mesh, diff_coef, x_div_top)

Goes through the top boundary nodes one by one from left to right monitoring the slope between individual nodes.

Parameters:
  • mesh – mesh

  • bound_mesh – boundary mesh

  • diff_coef – the topography diffusion coefficient

  • x_div_top – number of nodes at the top boundary (including both corner poitns)

Returns:

The diffusion coefficient function on the mesh.

Tip

For extensional simulation the smoothing is optional, but for compressional simulations it is necessary.

Warning

In order to work properly, the nodes at the top boundary need to be equidistant.