Skip to content

Commit d892c17

Browse files
committed
Consolidated content of too small base classes by merging these definitions into meatier base classes for primitives, further Autumn NIAC 2024 refactoring
1 parent 9493eb5 commit d892c17

File tree

6 files changed

+81
-131
lines changed

6 files changed

+81
-131
lines changed

base_classes/NXcg_geodesic_mesh.nxdl.xml

Lines changed: 0 additions & 55 deletions
This file was deleted.

base_classes/NXcg_grid.nxdl.xml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#
2222
# For further information, see http://www.nexusformat.org
2323
-->
24-
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXcg_grid" extends="NXcg_primitive_set" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
24+
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXcg_grid" extends="NXcg_primitive" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
2525
<symbols>
2626
<doc>
2727
The symbols used in the schema to specify e.g. dimensions of arrays.
@@ -46,9 +46,10 @@
4646
Computational geometry description of a grid of Wigner-Seitz cells in Euclidean space.
4747

4848
Three-dimensional grids with cubic cells are if not the most frequently used
49-
example of such grids. Examples of numerical methods where grids are used
50-
are spectral-solver based crystal plasticity or other stencil methods like
51-
phase-field or cellular automata.
49+
example of such grids. Numerical methods and models that use grids are used
50+
in many cases in the natural sciences and engineering disciplines. Examples are
51+
discretizations in space and time used for phase-field, cellular automata, or Monte Carlo
52+
modeling.
5253
</doc>
5354
<field name="origin" type="NX_NUMBER" units="NX_ANY">
5455
<doc>
@@ -112,7 +113,7 @@ should constraints on the grid be place here or not-->
112113
</dimensions>
113114
</field>
114115
<!--this should be a ROI-->
115-
<group name="bounding_box" type="NXcg_polyhedron_set">
116+
<group name="bounding_box" type="NXcg_polyhedron">
116117
<doc>
117118
A tight bounding box about the grid.
118119
</doc>
@@ -152,4 +153,25 @@ https://docs.lammps.org/Howto_triclinic.html NXcg_polyhedron because a parallele
152153
<dim index="1" value="n_b"/>
153154
</dimensions>
154155
</field>
156+
<field name="surface_reconstruction" type="NX_CHAR">
157+
<doc>
158+
Details about the computational geometry method and implementation
159+
used for discretizing internal surfaces as e.g. obtained with marching methods,
160+
like marching squares or marching cubes.
161+
162+
Documenting which specific version was used helps with understanding how
163+
robust the results are with respect to the topology of the triangulation.
164+
Reference to the specific implementation of marching cubes used.
165+
166+
See for example the following papers for details about how to identify a
167+
DOI which specifies the implementation used:
168+
169+
* `W. E. Lorensen &lt;https://doi.org/10.1109/MCG.2020.2971284&gt;`_
170+
* `T. S. Newman and H. Yi &lt;https://doi.org/10.1016/j.cag.2006.07.021&gt;`_
171+
172+
The value placed here should ideally be an identifier of a program.
173+
If not possible an identifier for a paper, tech repor, or free-text description
174+
is possible.
175+
</doc>
176+
</field>
155177
</definition>

base_classes/NXcg_hexahedron.nxdl.xml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ a polyhedron is a specific polytope in 3d, do we need
2727
higher-dimensional polytopes? that could be useful for simplicies though
2828
as they are used in numerics etc. maybe reach out here to our friends
2929
from MarDI, for now let's assume we do not need polytopes for d > 3-->
30-
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXcg_hexahedron_set" extends="NXcg_primitive_set" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
30+
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXcg_hexahedron" extends="NXcg_primitive" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
3131
<symbols>
3232
<doc>
3333
The symbols used in the schema to specify e.g. dimensions of arrays.
@@ -65,7 +65,7 @@ from MarDI, for now let's assume we do not need polytopes for d > 3-->
6565
Hexahedra are important geometrical primitives, which are among the most
6666
frequently used elements in finite element meshing/modeling.
6767

68-
As a specialization of the :ref:`NXcg_primitive_set` base class hexahedra
68+
As a specialization of the :ref:`NXcg_primitive` base class hexahedra
6969
are assumed non-degenerated, closed, and built of polygons that are
7070
not self-intersecting.
7171

@@ -169,23 +169,21 @@ from MarDI, for now let's assume we do not need polytopes for d > 3-->
169169
<dim index="1" value="c"/>
170170
</dimensions>
171171
</field>
172-
<!--substantially more detailed descriptors of the shape, the mesh
173-
orientation(NXorientation_set):-->
174-
<group name="vertex_normal" type="NXcg_unit_normal_set"/>
175-
<group name="edge_normal" type="NXcg_unit_normal_set"/>
176-
<group name="face_normal" type="NXcg_unit_normal_set"/>
172+
<group name="vertex_normal" type="NXcg_unit_normal"/>
173+
<group name="edge_normal" type="NXcg_unit_normal"/>
174+
<group name="face_normal" type="NXcg_unit_normal"/>
177175
<!--detailed mesh-based representation-->
178176
<group name="hexahedra" type="NXcg_face_list_data_structure">
179177
<doc>
180178
Combined storage of all primitives of all hexahedra.
181179
</doc>
182180
</group>
183-
<group name="hexahedronID" type="NXcg_face_list_data_structure">
181+
<group name="hexahedronID" type="NXcg_face_list_data_structure" nameType="partial">
184182
<doc>
185183
Individual storage of each hexahedron.
186184
</doc>
187185
</group>
188-
<group name="hexahedron_half_edgeID" type="NXcg_half_edge_data_structure">
186+
<group name="hexahedron_half_edgeID" type="NXcg_half_edge_data_structure" nameType="partial">
189187
<doc>
190188
Individual storage of each hexahedron as a graph.
191189
</doc>

base_classes/NXcg_marching_cubes.nxdl.xml

Lines changed: 0 additions & 61 deletions
This file was deleted.

base_classes/NXcg_primitive.nxdl.xml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,52 @@
177177
<dim index="2" value="d"/>
178178
</dimensions>
179179
</field>
180+
<field name="is_mesh" type="NX_BOOLEAN">
181+
<doc>
182+
Do the primitives define a mesh.
183+
</doc>
184+
</field>
185+
<!--<field name="is_triangle_mesh" type="NX_BOOLEAN">
186+
<doc>
187+
Do the primitives define triangle mesh.
188+
</doc>
189+
</field>
190+
<field name="is_surface_mesh" type="NX_BOOLEAN">
191+
<doc>
192+
Do the primitives discretize the surface of an object.
193+
</doc>
194+
</field>-->
195+
<field name="is_geodesic_mesh" type="NX_BOOLEAN">
196+
<doc>
197+
Do the primitives define a geodesic mesh or not.
198+
199+
A geodesic surface mesh is a triangulated surface mesh with metadata which
200+
can be used as an approximation to describe the surface of a sphere.
201+
Triangulation of spheres are commonly used in Materials Science
202+
for quantifying texture of materials, i.e. the relative rotation of
203+
crystals to sample directions.
204+
205+
For additional details or an introduction into the topic of geodesic meshes
206+
see (from which specifically the section on subdivision schemes is relevant).
207+
208+
* `E. S. Popko and C. J. Kitrick &lt;https://doi.org/10.1201/9781003134114&gt;`_
209+
210+
Earth scientists have specific demands and different views about what should
211+
be included in such a base class, given that nested geodesic meshes are a key
212+
component of climate modelling software. For now we propose to use this
213+
base class as a container for organizing data related to geodesic meshes.
214+
215+
Specifically an instance of this base class should detail the rule set how
216+
e.g. a geodesic (surface) mesh was instantiated as there are many
217+
possibilities to do so.
218+
</doc>
219+
</field>
220+
<field name="description">
221+
<doc>
222+
Possibility to store details such as when primitives form a (specific) type
223+
of mesh such as geodesic meshes.
224+
</doc>
225+
</field>
180226
<group name="vertex_normal" type="NXcg_unit_normal"/>
181227
<group name="edge_normal" type="NXcg_unit_normal"/>
182228
<group name="face_normal" type="NXcg_unit_normal"/>

base_classes/NXcg_unit_normal.nxdl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
the benefit of NXcg_point_set is that the origin is 0 by default
2626
how to resolve the association between the unit normal and its associated primitive?
2727
rather make this a set of vectors, irrespective whether these are unit or not-->
28-
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXcg_unit_normal_set" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
28+
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXcg_unit_normal" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
2929
<!--eventually remove this base class and make normal vector a property of the primitive-->
3030
<symbols>
3131
<doc>

0 commit comments

Comments
 (0)