Skip to content

Commit 1f52e59

Browse files
draft of format
1 parent 0ceb674 commit 1f52e59

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed

input-rules.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[
2+
{
3+
"name": "defaults",
4+
"type": "file",
5+
"format": ["json"],
6+
"doc" : "path to another JSON file containing the default parameters (this file will be patched on top of the defaults)"
7+
},
8+
{
9+
"name": "root_path",
10+
"type": "path",
11+
"required": true,
12+
"doc": "path to root director in the simulation (by default this is the directory containing this JSON file, so other paths can be relative to the JSON's path)"
13+
},
14+
{
15+
"name": "geometry/type",
16+
"type": "multiplechoice",
17+
"choices": ["mesh", "plane"],
18+
"doc": "What type of geometry is this? (for now only mesh is implemented)"
19+
},
20+
{
21+
"name": "geometry/mesh",
22+
"type": "file",
23+
"required": true,
24+
"fileformat": ["obj","msh"],
25+
"doc": "Path to mesh file"
26+
},
27+
{
28+
"name": "geometry/surface_selection",
29+
"type": "dict",
30+
"fields": ["id","axis","position","tolerance"],
31+
"doc": "Describes a surface selection"
32+
33+
}
34+
{
35+
"name": "geometry/surface_selection",
36+
"type": "integer",
37+
"min": 0,
38+
"doc": "Describes a surface selection"
39+
40+
}
41+
{
42+
"name": "geometry/surface_selection",
43+
"type": "file",
44+
"format": ["txt"],
45+
"doc": "Describes a surface selection"
46+
47+
}
48+
]
49+
50+
* accepts both lists or single elements transparently
51+
* if multiple rules apply to the same name, just one needs to pass

input.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
//
3+
"defaults": "path/to/defaults.json",
4+
//
5+
"root_path": "path/to/root/",
6+
7+
// List of meshes and analytical geometries to use in the simulation
8+
"geometry": [{
9+
10+
"type": "mesh|plane",
11+
12+
//
13+
"mesh": "path/to/mesh.ext",
14+
15+
// Obstacles are geometries that are fully scripted
16+
"is_obstacle": false,
17+
18+
// Easy way to disable the geometry
19+
"enabled": true,
20+
21+
// Simple transformation applied to the mesh upon loading
22+
"transformation": {
23+
"translation": [0.0, 0.0, 0.0],
24+
"rotation": [0.0, 0.0, 0.0],
25+
"rotation_mode": "xyz",
26+
"scale": [1.0, 1.0, 1.0],
27+
"dimensions": [1.0, 1.0, 1.0] // absolute size of the mesh's bounding box
28+
},
29+
30+
// What geometry to use?
31+
"extract": "volume|surface|edges|points",
32+
33+
// Select/tag certain points (We dont use it currently.)
34+
"point_selection": [],
35+
36+
// The following are different ways to specify surface_selection
37+
"surface_selection": [{
38+
// DP: add a surface group to avoid surface_ and a volume group to avoid volume_?
39+
"id": 1,
40+
"axis": 1,
41+
"position": 0.1025,
42+
"tolerance": 0,
43+
}],
44+
"surface_selection": "path/to/file.txt",
45+
"surface_selection": 1,
46+
// "surface_offset": 3, // TODO
47+
48+
// The following are different ways to specify volume_selection
49+
"volume_selection": [], // selection operators
50+
"volume_selection": "path/to/file.txt",
51+
"volume_selection": 1,
52+
53+
// Number of edge refinements
54+
"n_refs": 0, // TODO
55+
56+
"advanced": {
57+
"force_linear_geometry": false, // TODO
58+
"refinement_location": 0.5, // TODO
59+
"normalize_mesh": false, // TODO
60+
"min_component": -1 // TODO
61+
}
62+
}]
63+
}

0 commit comments

Comments
 (0)