Return to the region documentation.

style mesh/vtk

Purpose

style mesh/vtk is used to generate a region from a 3D mesh.

Warning

GPU support for this command has not been tested and may not work as expected.

Syntax

region id my_mesh style mesh/vtk keyword value

Keyword

Description

file *

path towards a mesh file of format vtk/vtu/vtp with tetrahedra

mesh_id *

id of a fix mesh/volume/vtk

scale

factor to scale the mesh in x-, y-, and z-direction, only available for file
default: 1; range: (0,∞); units: [-]

general optional keywords

General keywords of the region command

* The keywords file and mesh_id are mutually exclusive. It is recommended to use the file keyword (see “Warning” below).

Warning

The general optional keywords translate and rotate are only applicable for keyword file.

Examples

region id my_mesh style mesh/vtk file volmeshfile.vtk
region id my_mesh style mesh/vtk file volmeshfile.vtk translate (1, 0, 0.1)
region id my_mesh style mesh/vtk file my_mesh.vtp scale 1e-1 translate (0, 0, 1) rotate angle 90 point ( 0, 0, 0) axis (1, 0, 0)

# old version
command id vtkMesh style mesh/vtk file my_mesh.vtp
region id mesh style mesh/vtk mesh_id vtkMesh

Description

This command defines a geometric region of space from a mesh file containing tetrahedral volumes. Various other commands use regions, and a variety of other region styles exist as well. See region command for details.

The recommended way of using this command is by using the file keyword to set the filename of the VTK file that should be read. The file ending can be either vtk, vtp or vtu. You can apply a translation, scaling and rotation to the imported mesh via the dedicated keywords translation, scale and rotate, respectively. If applying more then one of these operations, the order of the operations is equal to the order given in the input script.

Alternatively it is possible to directly specify a fix id of style fix mesh/volume/vtk with the mesh_id keyword. This functionality is purely for backward compatibility and should not be used. Further keywords are described in the doc of the region command.

mesh/vtk is similar to mesh/tet (as described in region command), but uses the optimized algorithms of the vtk-library. Thus it is possible to use vtk (legacy), vtu (modern unstructured grids) and vtp (modern polygonal grids) files. Further, the mesh data are distributed over the used processors for a better memory usage and performance. Finally this command allows to use advanced options of insertion commands (e.g. fix insert/pack) like all_in and overlapcheck.

Warning

For periodic boundaries, the mesh is not mapped. Instead, a warning is generated if a vertex lies outside the simulation domain.

Return to the region documentation.