MshCreator

class nrv.fmod.FEM.mesh_creator.MshCreator(D=3, ver_level=None)[source]

Class handling the creation of a gmsh mesh (https://gmsh.info/doc/texinfo/gmsh.html) Contains methodes dealing with the mesh geometries, physical domains and feilds

Attributes

Methods

MshCreator.__init__([D, ver_level])

initialisation of the MshCreator

MshCreator.add_box([x, y, z, ax, ay, az])

add a box to the mesh

MshCreator.add_cone([x, y, z, L, R1, R2])

add a x-oriented cone to mesh entities

MshCreator.add_cylinder([x, y, z, L, R])

add a x-oriented cylinder to mesh entities

MshCreator.add_domains(obj_IDs, phys_ID[, ...])

add domains (ID + name) to a goupe of entities Caution: as to be used after all entities are placed

MshCreator.add_line(X0, X1)

add a line to the mesh

MshCreator.add_point([x, y, z])

add a point to the mesh

MshCreator.fragment([IDs, dim, verbose])

Fragmentation of the mesh important to link entities to each other

MshCreator.generate()

genetate the mesh

MshCreator.get_faces([com, bd])

update and return list of mesh face (optional: with their center of mass)

MshCreator.get_info([verbose])

MshCreator.get_mesh_info([verbose])

MshCreator.get_obj()

update and return list of mesh entities

MshCreator.get_parameters()

Generic method returning all the atributes of an NRV_class instance

MshCreator.get_res()

return the global resolution saved (usefull when no field are set)

MshCreator.get_volumes([com, bd])

update and return list of mesh volumes (optional: with their center of mass)

MshCreator.load(fname)

load mesh from ".msh" file

MshCreator.refine_entities(ent_ID, res_in, dim)

refine mesh resolution in a list of faces or volumes IDs

MshCreator.refine_min(feild_IDs)

refine mesh resolution taking the minimum value for a list of refinment fields

MshCreator.refine_threshold(ent_ID, dim, ...)

refine mesh resolution in a list of faces or volumes IDs

MshCreator.refinement_callback(meshSizeCallback)

Add a call back function which is apply to the mesh size defined by fields and return the final mesh size

MshCreator.rotate(volume, angle[, x, y, z, ...])

rotate volume

MshCreator.save(fname[, generate])

Save mesh in fname in ".msh"

MshCreator.set_chara_blen([i])

from gmsh: Extend characteristic lengths from the boundaries inside the surface/volume

MshCreator.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

MshCreator.set_res(new_res)

set the global resolution saved (usefull when no field are set)

MshCreator.set_verbosity([i])

from gmsh: Level of information printed on the terminal and the message console.

MshCreator.visualize([fname])