Skip to content

Commit 5c9ab5a

Browse files
committed
Add new capabilities
- module -T: fixed truncated statistical distributions (from and to), improved -domain stdtriangle, generalized body key, added elsetbody key, removed legacy true key. - module -M: added crystal symmetry to mesh file. - module -S: added computation of standard deviation (or variance) and other statistical properties of the results of element-based entities (elset, mesh, etc.), added -restess odf,odfn and -restesr odf,odfn, made various fixes. - module -V: fixed -data*colscheme ipf to support hexagonal crystal symmetry (see the "Plotting an Orientation Color Key" tutorial too), added support for hexagonal crystal symmetry (pole figures and inverse pole figures), added -dataelset, -datacellweight and -dataelsetweight, added -res{cell,elt,elset} odf, added -pfsym uniaxial, improved -step, enabled string completion for options, added -space ipf, added -ipf* options, added -[i]pfprojlabel and -[i]pfpolelabel options, extended -space [i]pf to mesh results, made code overhaul, made minor fixes. - general: added tutorial, improved testing (including -S), added step, gos and scale keys, added REAL_PRINT_FORMAT configuration variables. - documentation: made minor improvements.
1 parent 6a15df4 commit 5c9ab5a

File tree

1,736 files changed

+783999
-11370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,736 files changed

+783999
-11370
lines changed

VERSIONS

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1-
New in 4.5.1-4 (02 Nov 2022):
1+
New in 4.6.0 (06 Apr 2023):
2+
- module -T: fixed truncated statistical distributions (from and to), improved
3+
-domain stdtriangle, generalized body key, added elsetbody key, removed legacy
4+
true key.
5+
- module -M: added crystal symmetry to mesh file.
6+
- module -S: added computation of standard deviation (or variance) and other
7+
statistical properties of the results of element-based entities (elset, mesh,
8+
etc.), added -restess odf,odfn and -restesr odf,odfn, made various fixes.
9+
- module -V: fixed -data*colscheme ipf to support hexagonal crystal symmetry
10+
(see the "Plotting an Orientation Color Key" tutorial too), added support for
11+
hexagonal crystal symmetry (pole figures and inverse pole figures), added
12+
-dataelset, -datacellweight and -dataelsetweight, added -res{cell,elt,elset}
13+
odf, added -pfsym uniaxial, improved -step, enabled string completion for
14+
options, added -space ipf, added -ipf* options, added -[i]pfprojlabel and
15+
-[i]pfpolelabel options, extended -space [i]pf to mesh results, made code
16+
overhaul, made minor fixes.
17+
- general: added tutorial, improved testing (including -S), added step, gos
18+
and scale keys, added REAL_PRINT_FORMAT configuration variables.
219
- documentation: made minor improvements.
3-
- fixed truncated statistical distributions (from and to).
420

521
New in 4.5.0 (07 Sep 2022):
622
- module -T: fixed -morpho cube, added -statcell and -statvox

doc/_static/ini

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import sphinx_rtd_theme
1212

1313
project = u'Neper'
14-
version = u'4.5.1-4'
15-
release = u'4.5.1-4'
14+
version = u'4.6.0'
15+
release = u'4.6.0'
1616
author = u'Romain Quey'
1717
copyright = u'Romain Quey'
1818
language = 'en'

doc/exprskeys.rst

Lines changed: 52 additions & 24 deletions
Large diffs are not rendered by default.

doc/fileformat.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ Here are details on the native :file:`.msh` (adapted from Gmsh's msh format vers
474474
2.2 <file_type> <data_size>
475475
$EndMeshFormat
476476
$MeshVersion
477-
2.2 <mesh_version>
477+
<mesh_version>
478478
$EndMeshVersion
479479
$Domain
480480
<domain>
@@ -531,6 +531,9 @@ Here are details on the native :file:`.msh` (adapted from Gmsh's msh format vers
531531
<elset_id> <ori_des1> ...
532532
...
533533
$EndOrientations
534+
$ElsetCrySym
535+
<crysym>
536+
$EndElsetCrySym
534537
$ElementOrientations
535538
<number_of_elements> <orientation_descriptor>
536539
<element_id> ori_des1> ...
@@ -555,7 +558,7 @@ where
555558

556559
- :data:`$MeshVersion` denotes the beginning of a mesh version field.
557560

558-
- :data:`<mesh_version>` is the mesh file version (currently :data:`2.2.2`).
561+
- :data:`<mesh_version>` is the mesh file version (currently :data:`2.2.3`).
559562

560563
- :data:`$EndMeshVersion` denotes the end of a mesh version field.
561564

@@ -651,6 +654,8 @@ where
651654

652655
- :data:`$ElsetOrientations` denotes the beginning of an elset orientation field.
653656

657+
- :data:`$EndElsetOrientations` denotes the end of an elset orientation field.
658+
654659
- :data:`<number_of_elsets>` is the number of elsets.
655660

656661
- :data:`<orientation_descriptor>` is the orientation descriptor.
@@ -661,6 +666,12 @@ where
661666

662667
- :data:`$EndElsetOrientations` denotes the end of an elset orientation field.
663668

669+
- :data:`$ElsetCrySym` denotes the beginning of an elset crystal symmetry field.
670+
671+
- :data:`<crysym>` is the crystal symmetry (:data:`triclinic`, :data:`cubic` or :data:`hexagonal`).
672+
673+
- :data:`$EndElsetCrySym` denotes the end of an elset crystal symmetry field.
674+
664675
- :data:`$ElementOrientations` denotes the beginning of an element orientation field.
665676

666677
- :data:`<number_of_elements>` is the number of elements.

doc/introduction.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ This procedure uses the default configuration options and should work out-of-the
9797
Fine Configuration
9898
~~~~~~~~~~~~~~~~~~
9999

100-
The locations where files are installed, which dependencies are included and other dependency information can be specified, before installation, using CMake variables. This can be done using
100+
The locations where files are installed, which dependencies are included, other dependency information and program configuration options can be specified, before installation, using CMake variables. This can be done using a terminal tool:
101101

102102
.. code-block:: console
103103
104104
$ ccmake ..
105105
106-
for an interactive command-line tool, using
106+
or an interactive tool:
107107

108108
.. code-block:: console
109109
110110
$ cmake-gui ..
111111
112-
for an interactive graphical tool, or directly at the command line, using Cmake's :data:`-D` option:
112+
or directly at the command line, using Cmake's :data:`-D` option:
113113

114114
.. code-block:: console
115115
@@ -150,6 +150,12 @@ Finally, other third-party libraries are directly included in the source code (s
150150

151151
- The `openGJK <https://github.com/MattiaMontanari/openGJK>`_ library.
152152

153+
The program configuration variables concern the printing format of the real numbers, in the result files (:file:`.tess`, :file:`.msh`, etc.):
154+
155+
- :code:`REAL_PRINT_FORMAT`, default :code:`"%.12f"` (12 decimal digits);
156+
- :code:`REAL_PRINT_FORMAT3`, default :code:`"%15.12f"` (12 decimal digits, 15 total digits);
157+
- :code:`REAL_PRINT_FORMAT5`, default :code:`"%17.12f"` (12 decimal digits, 17 total digits).
158+
153159
Testing Neper
154160
-------------
155161

@@ -216,7 +222,7 @@ String completion is available for all options, so they may be abbreviated as lo
216222

217223
Logical options can be enabled or disabled by providing argument values of :data:`1` or :data:`0`, respectively. Integer or real arguments can be written as numeral values or :ref:`mathematical_and_logical_expressions`. For instance, in module -T, option :data:`-rcl 0.5` can also be written as :data:`-rcl 1/2` or :data:`-rcl "cos(pi/3)"`. For some options, different values can be specified to different entities by loading them from an external :ref:`data_file` (or similar), using :data:`file(<file_name>)`. For the more complex case of a multiscale tessellation, a :ref:`multiscale_cell_file` can also be used, and loaded using :data:`msfile(<file_name>)`.
218224

219-
Module -V shows some exceptions with respect to these rules: the argument cannot be listed in arbitrary order, string completion is not available, and option :option:`-loop` takes several arguments.
225+
Module -V shows some exceptions with respect to these rules: the argument can only be listed in arbitrary order before their corresponding :option:`-print` call, string completion is not available for custom input options, and option :option:`-loop` takes several arguments.
220226

221227
Argument Separators
222228
~~~~~~~~~~~~~~~~~~~

doc/neper_s.rst

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
Simulation Module (-S)
77
======================
88

9-
Module -S is the module for post-processing simulation results. It generates and works on a simply-structured and human-friendly :ref:`simulation_directory`. A :ref:`simulation_directory` is typically generated from an FEPX raw result directory, which can be done as simply as follows:
9+
Module -S is the module for post-processing simulation results. It generates and works on a simply-structured and human-friendly :ref:`simulation_directory`. The :ref:`simulation_directory` is particularly well suited for result management and allows for the computation of new results.
10+
11+
A :ref:`simulation_directory` is typically generated from an FEPX raw result directory, which can be done as simply as follows:
1012

1113
.. code-block:: console
1214
1315
$ neper -S <fepx_raw_result_directory>
1416
15-
A :ref:`simulation_directory` can also be generated by the :ref:`neper_t` or the :ref:`neper_m` (option :data:`-format sim`), in which case the directory contains only the tessellation, raster tessellation or mesh file but no actual simulation results. Finally, simulation directories that represent successive parts of a simulation (e.g. resulting from FEPX restarts) can be merged.
17+
A :ref:`simulation_directory` can also be generated by the :ref:`neper_t` or the :ref:`neper_m` (option :data:`-format sim`), in which case it contains the (raster) tessellation or mesh file but no simulation results --- the various post-processing capabilities of :ref:`neper_s` can then be used on the (raster) tessellation or mesh. Finally, simulation directories that represent successive parts of a simulation (e.g. resulting from FEPX restarts) can be merged into a single one.
1618

1719
New results can be computed for several *entities* of the (raster) tessellation and mesh, including the (raster) tessellation cells and the mesh nodes, elements and elsets. The whole (raster) tessellation and mesh can also serve as *entities*. New *entities* corresponding to sets of elements can also be defined.
1820

@@ -78,8 +80,8 @@ Input Data
7880

7981
Specify the name of the input directory, which can be:
8082

81-
- an FEPX raw result directory [#f1]_ (to convert into a simulation directory);
82-
- a simulation directory;
83+
- an FEPX raw result directory [#f1]_ (to convert into a :ref:`simulation_directory`);
84+
- a :ref:`simulation_directory`;
8385
- a series of simulation directories combined with :data:`,` (to merge).
8486

8587
**Default value**: -.
@@ -106,7 +108,7 @@ Entity Options
106108

107109
.. option:: -entity <name>:<logical_expression>
108110

109-
Define a new entity (based on elements) from one or several logical expressions based on the variables described in :ref:`mesh_keys`. The argument can be:
111+
Define a new entity (based on elements) from one or several logical expressions based on the variables described in :ref:`mesh_keys`. The expression argument can be:
110112

111113
- a single logical expression;
112114
- :data:`file(<file_name>)`: logical expressions to load from a file.
@@ -118,11 +120,26 @@ Entity Options
118120
Results Options
119121
~~~~~~~~~~~~~~~
120122

121-
Below are options to define the results to add to a simulation directory. The results can be new results defined from the simulation inputs (tess, mesh, ...) and simulation results, or subresults (such as vector or tensor components). It is also possible to import results for files. Any result can also be assigned a *name* alongside its expression. [#f2]_ Results of element-based entities (including :data:`elset` and :data:`mesh`) are computed from the mesh (in the case of known variables) or by volume-weighted averaging of the element results (if they exist), in this order of priority.
123+
Below are options to manipulate (add, remove or update) the results of a simulation directory. New results can be computed from the simulation inputs (tess, mesh, ...), existing siumulation results, or be loaded from a file. Any result can also be assigned a *name* alongside its expression. [#f2]_ Results of element-based entities (including :data:`elset` and :data:`mesh`) are computed from the mesh in the case of known variables, or from the element results (when they exist), in this order of priority.
122124

123125
.. option:: -res{cell,tess,node,elt,elset,mesh,<entity>} <res1>,<res2>,...
124126

125-
Specify the results to add, remove or update. Provide as argument :data:`<res>`, :data:`'!<res>'` [#quotes]_ or :data:`\\\<res\>` to add, remove or update result :data:`<res>`, respectively. Provide :data:`<res><X>` or :data:`<res>\<X\>\<Y\>` to get a specific component of an existing result (:data:`<X>` or :data:`<X>\<Y\>`, vectorial or tensorial, respectively, 1-indexed) [#f3]_ , :data:`<res>:file(<basename>)` to import results from files of basename :data:`<basename>` (the files of the different steps must be available as :data:`<basename>.step*`; if the file does not exist, it is attempted to read from :data:`<basename>`), or any expression based on the tessellation, mesh or simulation results (the mesh results can be any variables described in :ref:`tessellation_keys`, :ref:`raster_tessellation_keys` and :ref:`mesh_keys`). For nodes, :data:`disp` can be used to get the node displacements from the node coordinates. To use a simulation result at a specific step, use :data:`<res>(step=<step_nb>)`, where :data:`<res>` is the result and :data:`<step_nb>` is the step number. To define a name corresponding to a result, use :data:`<name>:\<expression\>`, where :data:`<name>` is the name and :data:`<expression>` is its expression. To provide several values, combine them with :data:`,`.
127+
Specify the results to add, remove or update, using :data:`<res>`, :data:`'!<res>'` [#quotes]_ or :data:`\\\<res\>`, respectively. A new result is typically computed from the tessellation, mesh or existing simulation results, as described in the following. To (optionally) assign a name to a result, use :data:`<name>:\<expression\>`, where :data:`<name>` is the name and :data:`<expression>` is its expression. A result expression can be:
128+
129+
- any expression based on the tessellation results (see :ref:`tessellation_keys` or :ref:`raster_tessellation_keys`), mesh results (see :ref:`mesh_keys`) or simulation results (see :ref:`simulation_results`);
130+
- :data:`<res>`: for element-based entities (including :data:`elset` and :data:`mesh`), the value of a result computed from the element results, by weighted-averaging (considering the element volumes);
131+
- :data:`<res>_\<operation>`: for element-based entities (including :data:`elset` and :data:`mesh`), the value of a result computed from the element results, by a given statistical :data:`operation` (always considering the element volumes), which can be:
132+
133+
- :data:`mean`: mean;
134+
- :data:`stddev`: standard deviation;
135+
- :data:`var`: variance;
136+
- :data:`prval`: principal values [#principal]_;
137+
- :data:`prvect`: principal vectors [#principal]_.
138+
139+
- :data:`<res>\<X\>` or :data:`<res>\<X\>\<Y\>`: a specific component of an existing result (:data:`<X>` or :data:`<X>\<Y\>`, vectorial or tensorial, respectively, 1-indexed) [#f3]_;
140+
- :data:`file(<basename>)` (in which case a name *must* be assigned, as in :data:`<name>:file(<basename>)`): a custom result to be loaded from files of basename :data:`<basename>` (files :data:`<basename>.step*` if they exist, and :data:`<basename>` otherwise).
141+
142+
.. note:: To use a simulation result at a specific step, use :data:`<res>(step=<step_nb>)`, where :data:`<res>` is the result and :data:`<step_nb>` is the step number.
126143

127144
**Default value**: -.
128145

@@ -213,3 +230,5 @@ Below are some examples of use of neper -S.
213230
.. [#f3] The original result, :data:`<res>`, must already be available in the simulation directory.
214231
215232
.. [#quotes] Note the single quotes.
233+
234+
.. [#principal] For vectors of length 6 (:data:`stress`, etc.), the 3 last components are multiplied by :math:`\sqrt{2}`.

doc/neper_t.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ Input Data
119119

120120
- :data:`euler-bunge(<size_x>,<size_y>,<size_z>)`: the Euler space (Bunge convention), where :data:`<size_x>`, :data:`<size_y>` and :data:`<size_z>` are the space dimensions (in degrees or radians [#euler-bunge]_);
121121

122-
- :data:`stdtriangle(<segment_nb>)`: a standard stereographic triangle, where :data:`<segment_nb>` is the number of segments used to describe the [011]--[111] line.
122+
- :data:`stdtriangle(crysym=<crysym>,projection=<projection>,segmentnb=<segment_nb>)`: a standard stereographic triangle, with the optional arguments:
123+
124+
- :data:`crysym`: the crystal symmetry (default :data:`cubic`);
125+
- :data:`projection`: the projection (default :data:`stereographic`);
126+
- :data:`segmentnb`: the number of segments along the curved edge (default :data:`20`);
123127

124128
The transformation can be:
125129

@@ -455,6 +459,14 @@ The following option can be used to define cell groups (each cell is assigned to
455459
Crystal Orientation Options
456460
~~~~~~~~~~~~~~~~~~~~~~~~~~~
457461

462+
.. option:: -crysym <crysym>
463+
464+
Specify the :ref:`Crystal Symmetry <crystal_symmetries>`.
465+
466+
.. note :: It is used by option :data:`-ori uniform`, to reduce the domain of definition of the orientation descriptors and by the :ref:`neper_v`.
467+
468+
**Default value**: :data:`triclinic`.
469+
458470
.. option:: -ori <ori_distrib>
459471

460472
Specify the type of crystal orientation distribution. It can be:
@@ -501,14 +513,6 @@ Crystal Orientation Options
501513

502514
**Default value**: :data:`none`.
503515

504-
.. option:: -oricrysym <crysym>
505-
506-
Specify the :ref:`Crystal Symmetry <crystal_symmetries>`.
507-
508-
This is used by option :data:`-ori uniform` and to reduce the domain of definition of the orientation descriptors.
509-
510-
**Default value**: :data:`triclinic`.
511-
512516
.. option:: -orioptiini <ori_distrib> (secondary option)
513517

514518
Specify the initial crystal orientations, which can be:

0 commit comments

Comments
 (0)