comparison msh2vtu.xml @ 0:be04ecda594e draft default tip

planemo upload for repository https://github.com/Helmholtz-UFZ/galaxy-tools/tree/main/tools/ogstools commit 406e30ee3cd2ab7762f1195328c06d547516690f
author ufz
date Thu, 06 Mar 2025 16:53:19 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:be04ecda594e
1
2 <tool id="msh2vtu" name="OGSTools msh2vtu" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
3 <description>
4 Convert msh to UnstructuredGrid (vtk)
5 </description>
6 <macros>
7 <import>macros.xml</import>
8 <token name="@VERSION_SUFFIX@">0</token>
9 </macros>
10 <expand macro="creator"/>
11 <expand macro="requirements"/>
12 <command detect_errors="exit_code"><![CDATA[
13 ln -s '$input_file' input_file.msh &&
14 msh2vtu input_file.msh
15 -d '$dim'
16 $delz $swapxy $reindex $keep_ids $ascii
17 -l '$log_level'
18 ]]></command>
19 <inputs>
20 <param name="input_file" type="data" format="gmsh.msh" label="Input GMSH File"/>
21 <param name="dim" type="select" label="Set dimensionality of the mesh" argument="-d">
22 <option value="1">1D</option>
23 <option value="2">2D</option>
24 <option value="3">3D</option>
25 </param>
26 <param name="delz" type="boolean" value="false" truevalue="-z" falsevalue="" label="Delete Z Coordinate" optional="true" argument="-z"/>
27 <param name="swapxy" type="boolean" value="false" truevalue="-s" falsevalue="" label="Swap XY Coordinates" optional="true" argument="-s"/>
28 <param name="reindex" type="boolean" value="false" truevalue="-r" falsevalue="" label="Reindex" optional="true" argument="-r"/>
29 <param name="keep_ids" type="boolean" value="false" truevalue="-k" falsevalue="" label="Keep IDs" optional="true" argument="-k"/>
30 <param name="ascii" type="boolean" value="false" truevalue="-a" falsevalue="" label="ASCII Output" optional="true" argument="-a"/>
31 <param name="log_level" type="select" label="Log Level" argument="-l">
32 <option value="ERROR" selected="true">ERROR</option>
33 <option value="DEBUG">DEBUG</option>
34 <option value="INFO">INFO</option>
35 <option value="WARNING">WARNING</option>
36 </param>
37 </inputs>
38 <outputs>
39 <data name="boundary" format="xml" label="${tool.name} on ${on_string}: boundary" from_work_dir="input_file_boundary.vtu" />
40 <data name="domain" format="xml" label="${tool.name} on ${on_string}: domain" from_work_dir="input_file_domain.vtu" />
41 <data name="physical_group_Bottom" format="xml" label="${tool.name} on ${on_string}: physical_group_Bottom" from_work_dir="input_file_physical_group_Bottom.vtu" />
42 <data name="physical_group_Left" format="xml" label="${tool.name} on ${on_string}: physical_group_Left" from_work_dir="input_file_physical_group_Left.vtu" />
43 <data name="physical_group_Right" format="xml" label="${tool.name} on ${on_string}: physical_group_Right" from_work_dir="input_file_physical_group_Right.vtu" />
44 <data name="physical_group_RockBed" format="xml" label="${tool.name} on ${on_string}: physical_group_RockBed" from_work_dir="input_file_physical_group_RockBed.vtu" />
45 <data name="physical_group_SedimentLayer1" format="xml" label="${tool.name} on ${on_string}: physical_group_SedimentLayer1" from_work_dir="input_file_physical_group_SedimentLayer1.vtu" />
46 <data name="physical_group_SedimentLayer2" format="xml" label="${tool.name} on ${on_string}: physical_group_SedimentLayer2" from_work_dir="input_file_physical_group_SedimentLayer2.vtu" />
47 <data name="physical_group_SedimentLayer3" format="xml" label="${tool.name} on ${on_string}: physical_group_SedimentLayer3" from_work_dir="input_file_physical_group_SedimentLayer3.vtu" />
48 <data name="physical_group_Top" format="xml" label="${tool.name} on ${on_string}: physical_group_Top" from_work_dir="input_file_physical_group_Top.vtu" />
49 </outputs>
50 <tests>
51 <test>
52 <param name="input_file" value="geolayers_2d.msh"/>
53 <param name="dim" value="2"/>
54 <param name="delz" value="True"/>
55 <param name="swapxy" value="True"/>
56 <param name="reindex" value="True"/>
57 <param name="keep_ids" value="True"/>
58 <param name="ascii" value="True"/>
59 <param name="log_level" value="DEBUG"/>
60 <output name="boundary" file="input_file_boundary.vtu"/>
61 <output name="domain" file="input_file_domain.vtu"/>
62 <output name="physical_group_Bottom" file="input_file_physical_group_Bottom.vtu"/>
63 <output name="physical_group_Left" file="input_file_physical_group_Left.vtu"/>
64 <output name="physical_group_Right" file="input_file_physical_group_Right.vtu"/>
65 <output name="physical_group_RockBed" file="input_file_physical_group_RockBed.vtu"/>
66 <output name="physical_group_SedimentLayer1" file="input_file_physical_group_SedimentLayer1.vtu"/>
67 <output name="physical_group_SedimentLayer2" file="input_file_physical_group_SedimentLayer2.vtu"/>
68 <output name="physical_group_SedimentLayer3" file="input_file_physical_group_SedimentLayer3.vtu"/>
69 <output name="physical_group_Top" file="input_file_physical_group_Top.vtu"/>
70 </test>
71 </tests>
72 <help><![CDATA[
73 **Overview:**
74
75 msh2vtu is a application that converts a Gmsh (.msh) file for use in OGS by extracting domain-, boundary- and physical group-submeshes and saves them in a set of files in the vtu format.
76 Supported element types:
77 - lines (linear and quadratic) in 1D
78 - triangles and quadrilaterals (linear and quadratic) in 2D
79 - tetra- and hexahedrons (linear and quadratic) in 3D
80
81 **Inputs:**
82
83 1. **Input GMSH File:** The GMSH (.msh) file to be converted.
84 2. **Mesh Dimension (dim):** Select the desired mesh dimension (1, 2, or 3).
85 3. **Delete Z Coordinate (delz):** Boolean flag to remove the Z coordinate from the mesh (for 2D meshes with z=0).
86 4. **Swap XY Coordinates (swapxy):** Boolean flag to swap the X and Y coordinates.
87 5. **Reindex (reindex):** Renumber physical group / region / Material IDs to be renumbered beginning with zero.
88 6. **Keep IDs (keep_ids):** By default, rename gmsh:physical to MaterialIDs and change type of corresponding cell data to INT32. If True, this is skipped.
89 7. **ASCII Output (ascii):** Boolean flag to output the file in ASCII format instead of binary.
90 8. **Log Level (log_level):** Set the level of logging details (DEBUG, INFO, WARNING, ERROR).
91
92 **Outputs:**
93
94 **Output VTU Files:** The converted mesh file as a set of files with VTU format.
95 ]]></help>
96 <expand macro="ogs_citation"/>
97 </tool>