Skip to content

Commit 00e812c

Browse files
committed
Add new capabilities
- module -T: fixed weibull distribution, made minor fixes. - module -M: changed default value of -order to 2, changed -nset default value to faces,edges,vertices in 3D and edges,vertices in 2D, fixed msh4 format, fixed meshing of -transform cut(cylinder) tessellations. - module -V: fixed -datanodecoofact. - module -S: changed simulation.config onto simulation.cfg. - documentation: made minor fix. - general: cleaned tests.
1 parent 075c24f commit 00e812c

File tree

185 files changed

+18299
-3633
lines changed

Some content is hidden

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

185 files changed

+18299
-3633
lines changed

VERSIONS

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
New in 4.7.1-17 (21 Dec 2023):
1+
New in 4.8.0 (09 Jan 2024):
22
- module -T: fixed weibull distribution, made minor fixes.
3-
- module -M: fixed meshing of -transform cut(cylinder) tessellations,
4-
fixed msh4 format.
3+
- module -M: changed default value of -order to 2, changed -nset default value
4+
to faces,edges,vertices in 3D and edges,vertices in 2D, fixed msh4 format,
5+
fixed meshing of -transform cut(cylinder) tessellations.
56
- module -V: fixed -datanodecoofact.
7+
- module -S: changed simulation.config onto simulation.cfg.
68
- documentation: made minor fix.
79
- general: cleaned tests.
810

11+
* Incompatible changes: In -M, changed default value of -order to 2.
12+
913
New in 4.7.0 (17 Nov 2023):
1014
- module -T: added -ori odf, added -orisampling, improved -domain rodrigues,
1115
added -statcell scale and voxnb, fixed -morpho cube, fixed -transform rmsat,

doc/conf.py

+2-2
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.7.1-17'
15-
release = u'4.7.1-17'
14+
version = u'4.8.0'
15+
release = u'4.8.0'
1616
author = u'Romain Quey'
1717
copyright = u'Romain Quey'
1818
language = 'en'

doc/fileformat.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ Here are details on the :file:`.sim` simulation directory (the :file:`.sim` exte
718718
simulation.sim
719719
|-- inputs
720720
|   |-- job.sh
721-
|   |-- simulation.config
721+
|   |-- simulation.cfg
722722
|   |-- simulation.msh
723723
|   `-- simulation.tess
724724
`-- results

doc/neper_m.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ For mapped meshing, mesh cleaning options enable the removal of isolated element
3030

3131
Mesh partitioning allows for the division the mesh nodes and elements into several sets while minimizing the interfaces between them [#partitioning]_, as needed for parallel simulations with FEPX. Partitioning can return any number of partitions or be done according to a given parallel computer architecture (options :data:`-part*`).
3232

33-
In the output mesh, the individual entities of the tessellations (the vertices, edges, faces and polyhedra) can be described by element sets (option :option:`-dim`). Node sets of the vertices, edges and faces located on the boundary of the tessellation are also provided for prescribing the boundary conditions (option :option:`-nset`). The surface element sets are also provided (option :option:`-faset`). Element sets other than those corresponding to the tessellation cells can be defined (option :option:`-elset`). The mesh order can be 1 or 2 (option :option:`-order`). Statistical data can be obtained on the meshes (options :data:`-stat*`).
33+
In the output mesh, the individual entities of the tessellations (the vertices, edges, faces and polyhedra) can be described by element sets (option :option:`-dim`). Node sets of the vertices, edges and faces located on the boundary of the tessellation are also provided for prescribing the boundary conditions (option :option:`-nset`). The surface element sets are also provided (option :option:`-faset`). Element sets other than those corresponding to the tessellation cells can be defined (option :option:`-elset`). The mesh order can be 1 or 2 (option :option:`-order`, default :data:`2`). Statistical data can be obtained on the meshes (options :data:`-stat*`).
3434

3535
The methods implemented for meshing are described in [CMAME2011]_.
3636

@@ -196,7 +196,7 @@ Meshing Options
196196

197197
- :data:`2`: quadratic-interpolation elements (3-node linear elements, 6-node triangular elements, 8-node or 9-node quadrangular elements, 10-node tetrahedral elements and 20-node hexahedral elements).
198198

199-
**Default value**: :data:`1`.
199+
**Default value**: :data:`2`.
200200

201201
.. option:: -cl{ver,edge,face} or -rcl{ver,edge,face} <characteritic_length> (secondary options
202202

@@ -482,7 +482,7 @@ Output Options
482482

483483
- :data:`none`: none.
484484

485-
**Default value**: :data:`faces` in 3D and :data:`edges` in 2D.
485+
**Default value**: :data:`faces,edges,vertices` in 3D and :data:`edges,vertices` in 2D.
486486

487487
.. option:: -faset <faset1>,<faset2>,...
488488

@@ -652,11 +652,11 @@ Below are some examples of use of neper -M.
652652
653653
$ neper -M n100-id1.tesr
654654
655-
- Mesh tessellation :file:`n100-id1.tess` with a mesh size of rcl = 0.5 and in 2nd-order elements:
655+
- Mesh tessellation :file:`n100-id1.tess` with a mesh size of rcl = 0.5 and in 1st-order elements:
656656

657657
.. code-block:: console
658658
659-
$ neper -M n100-id1.tess -rcl 0.5 -order 2
659+
$ neper -M n100-id1.tess -rcl 0.5
660660
661661
- Mesh tessellation :file:`n100-id1.tess` with small elements for the interior cells and bigger elements for the boundary cells:
662662

doc/neper_s.rst

+23-37
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@ Simulation Module (-S)
88

99
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.
1010

11-
A :ref:`simulation_directory` is typically generated from an FEPX raw result directory, which can be done as simply as follows:
12-
13-
.. code-block:: console
14-
15-
$ neper -S <fepx_raw_result_directory>
16-
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.
11+
A :ref:`simulation_directory` is typically generated by FEPX.
12+
It 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.
1813

1914
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.
2015

@@ -26,48 +21,40 @@ Here is what a typical run of module -S looks like:
2621

2722
.. code-block:: console
2823
29-
$ neper -S fepx-simulation
24+
$ neper -S simulation.sim -reselset stress
3025
3126
======================== N e p e r =======================
3227
Info : A software package for polycrystal generation and meshing.
33-
Info : Version 4.0.0
28+
Info : Version 4.8.0
3429
Info : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
35-
Info : Running on 8 threads.
30+
Info : Running on 20 threads.
3631
Info : <https://neper.info>
37-
Info : Copyright (C) 2003-2021, and GNU GPL'd, by Romain Quey.
32+
Info : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
3833
Info : Loading initialization file `/home/rquey/.neperrc'...
3934
Info : ---------------------------------------------------------------
4035
Info : MODULE -S loaded with arguments:
4136
Info : [ini file] (none)
42-
Info : [com line] fepx-simulation
37+
Info : [com line] simulation.sim -reselset stress
4338
Info : ---------------------------------------------------------------
4439
Info : Reading input data...
4540
Info : - Reading arguments...
46-
Info : Writing simulation directory from FEPX result directory...
47-
Info : [o] Writing directory `fepx-simulation.sim'...
48-
Info : - Parsing FEPX results...
49-
Info : [i] Parsing file `fepx-simulation/post.report'...
50-
Info : [i] Parsed file `fepx-simulation/post.report'.
51-
Info : > Partition number: 8.
52-
Info : > Step number: 10.
53-
Info : > Node number: 2752.
54-
Info : > Element number: 1596.
55-
Info : - Writing report file...
56-
Info : [o] Writing file `fepx-simulation.sim/report'...
57-
Info : [o] Wrote file `fepx-simulation.sim/report'.
58-
Info : - Writing inputs...
59-
Info : [o] Writing directory `fepx-simulation.sim/inputs'...
60-
Info : . simulation.tess...
61-
Info : . simulation.msh...
62-
Info : . simulation.config...
63-
Info : [o] Wrote directory `fepx-simulation.sim/inputs'.
41+
Info : > Input files: msh config
42+
Info : > Node number : 49
43+
Info : > Element number : 16
44+
Info : > Elset number : 2
45+
Info : > Partition number : 2
46+
Info : > Step number : 2
47+
Info : > Node results : coo disp vel
48+
Info : > Elt results : ori stress
49+
Info : Running post-processing...
50+
Info : - Loading inputs...
51+
Info : > simulation.msh...
52+
Info : > simulation.cfg...
6453
Info : - Writing results...
65-
Info : [o] Writing directory `fepx-simulation.sim/results'...
66-
Info : . coo... 100%
67-
Info : . ori... 100%
68-
Info : [o] Wrote directory `fepx-simulation.sim/results'.
69-
Info : [o] Wrote directory `fepx-simulation.sim'.
70-
Info : Elapsed time: 0.075 secs.
54+
Info : [o] Writing directory `simulation.sim/results/elsets'...
55+
Info : . stress ........................................... 100%
56+
Info : [o] Wrote directory `simulation.sim/results/elsets'.
57+
Info : Elapsed time: 0.010 secs.
7158
========================================================================
7259
7360
Arguments
@@ -80,7 +67,6 @@ Input Data
8067

8168
Specify the name of the input directory, which can be:
8269

83-
- an FEPX raw result directory [#f1]_ (to convert into a :ref:`simulation_directory`);
8470
- a :ref:`simulation_directory`;
8571
- a series of simulation directories combined with :data:`,` (to merge).
8672

Binary file not shown.

doc/tutorials/orientation_trajectories/n20.sim/.sim

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
simulation.tesr
99
*msh
1010
simulation.msh
11-
*config
12-
simulation.config
11+
*cfg
12+
simulation.cfg
1313
**general
1414
0 3606 2201 20 2
1515
*orides

src/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if(POLICY CMP0077)
77
cmake_policy(SET CMP0077 NEW)
88
endif()
99

10-
set(NEPER_VERSION \"4.7.1-17\")
10+
set(NEPER_VERSION \"4.8.0\")
1111
project(neper)
1212

1313
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8.1)

src/neper_m/nem_input/nem_input3.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ nem_input_options_default (struct IN_M *pIn)
4242
strcpy ((*pIn).format, "msh");
4343

4444
/* Options for meshing ------------------------------- */
45-
(*pIn).order = 1;
45+
(*pIn).order = 2;
4646
(*pIn).dimstring = ut_alloc_1d_char (9);
4747
strcpy ((*pIn).dimstring, "inputdim");
4848

src/neper_m/nem_writemesh/nem_writemesh1.c

+8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ nem_writemesh (struct IN_M In, struct TESS Tess, struct NODES Nodes,
2626
strcpy (sizestring[2], "area");
2727
strcpy (sizestring[3], "volume");
2828

29+
if (!strcmp (In.nset, "default"))
30+
{
31+
if (dim == 3)
32+
ut_string_string ("faces,edges,vertices", &(In.nset));
33+
else if (dim == 2)
34+
ut_string_string ("edges,vertices", &(In.nset));
35+
}
36+
2937
neut_nset_expand (NSet[0], NSet[1], NSet[2], In.nset, &nsetlist);
3038
if (!strcmp (Mesh[dim].EltType, "tri"))
3139
neut_nset_expand (NSet[0], NSet[1], NSet[2], In.faset, &fasetlist);

src/neper_s/nes_convert/nes_convert1.c

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ nes_convert (struct IN_S In, struct SIM *pSim)
99
{
1010
struct FEPXSIM FSim;
1111

12+
ut_print_message (1, 2, "Conversion will be removed in a future version.\n");
13+
1214
neut_fepxsim_set_zero (&FSim);
1315

1416
nes_convert_parse (In, &FSim, pSim);

src/neper_s/nes_convert/nes_convert_write/nes_convert_write2.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ nes_convert_write_inputs (struct IN_S In, struct FEPXSIM *pFSim)
2323
ut_string_string ((*pFSim).msh, filename + filenameqty - 1);
2424
}
2525

26-
if ((*pFSim).config)
26+
if ((*pFSim).cfg)
2727
{
2828
filename = ut_realloc_1d_pchar_null (filename, ++filenameqty, 1);
29-
ut_string_string ((*pFSim).config, filename + filenameqty - 1);
29+
ut_string_string ((*pFSim).cfg, filename + filenameqty - 1);
3030
}
3131

3232
// *.sh

src/neper_s/nes_pproc/nes_pproc2.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ nes_pproc_load (struct SIM *pSim, struct TESS *pTess, struct TESR *pTesr,
2323
if ((*pSim).msh)
2424
nes_loadmesh (pSim, pNodes, Mesh, 2);
2525

26-
if ((*pSim).config)
26+
if ((*pSim).cfg)
2727
nes_loadconfig (*pSim, &GroupCrySym, &GroupQty, 2);
2828

2929
neut_sim_testinputs (*pSim, *pTess, Mesh);

src/neper_s/nes_pproc/nes_pproc3.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "nes_pproc_.h"
66

7-
// Checking consistency between Tess and Sim crysym, if simulation.config exists
7+
// Checking consistency between Tess and Sim crysym, if simulation.cfg exists
88
void
99
nes_pproc_load_crysym (struct TESS *pTess, struct TESR *pTesr,
1010
struct NODES *pNodes, struct MESH *Mesh,
@@ -14,7 +14,7 @@ nes_pproc_load_crysym (struct TESS *pTess, struct TESR *pTesr,
1414

1515
if (GroupQty)
1616
{
17-
// Does simulation.config have multiple crystal symmetries?
17+
// Does simulation.cfg have multiple crystal symmetries?
1818
multiple = 0;
1919
for (i = 1; i < GroupQty; i++)
2020
if (strcmp (GroupCrySym[0], GroupCrySym[i]))

src/neper_s/nes_utils/nes_utils1.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ void
123123
nes_loadconfig (struct SIM Sim, char ***pGroupCrySym, int *pGroupQty, int verbosity)
124124
{
125125
int id;
126-
char *filename = ut_string_paste3 (Sim.simdir, "/inputs/", Sim.config);
126+
char *filename = ut_string_paste3 (Sim.simdir, "/inputs/", Sim.cfg);
127127
char *string = ut_alloc_1d_char (1000);
128128
FILE *fp = NULL;
129129

130-
if (Sim.config && ut_file_exist (filename))
130+
if (Sim.cfg && ut_file_exist (filename))
131131
{
132132
if (verbosity)
133-
ut_print_message (0, verbosity + 1, "%s...\n", Sim.config);
133+
ut_print_message (0, verbosity + 1, "%s...\n", Sim.cfg);
134134

135135
fp = ut_file_open (filename, "R");
136136

src/neut/neut_fepxsim/neut_fepxsim_fscanf/neut_fepxsim_fscanf1.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ neut_fepxsim_fscanf (char *dir, struct FEPXSIM *pFSim, char *mode)
3939
ut_string_string ("simulation.tesr", &(*pFSim).tesr);
4040
if (ut_file_exist ("%s/simulation.msh", (*pFSim).fepxdir))
4141
ut_string_string ("simulation.msh", &(*pFSim).msh);
42-
if (ut_file_exist ("%s/simulation.config", (*pFSim).fepxdir))
43-
ut_string_string ("simulation.config", &(*pFSim).config);
42+
43+
if (ut_file_exist ("%s/simulation.cfg", (*pFSim).fepxdir))
44+
ut_string_string ("simulation.cfg", &(*pFSim).cfg);
45+
else if (ut_file_exist ("%s/simulation.config", (*pFSim).fepxdir))
46+
ut_string_string ("simulation.config", &(*pFSim).cfg);
4447

4548
file = ut_file_open (filename, mode);
4649

@@ -155,7 +158,7 @@ neut_fepxsim_fscanf (char *dir, struct FEPXSIM *pFSim, char *mode)
155158

156159
ut_free_1d_char (&filename);
157160

158-
filename = ut_string_paste3 (name, "/", (*pFSim).config);
161+
filename = ut_string_paste3 (name, "/", (*pFSim).cfg);
159162

160163
file = ut_file_open (filename, "R");
161164
while (fscanf (file, "%s", tmp) == 1)

src/neut/neut_fepxsim/neut_fepxsim_op/neut_fepxsim_op.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ neut_fepxsim_set_zero (struct FEPXSIM *pFSim)
2929
(*pFSim).bcs = NULL;
3030
(*pFSim).ori = NULL;
3131
(*pFSim).phase = NULL;
32-
(*pFSim).config = NULL;
32+
(*pFSim).cfg = NULL;
3333

3434
return;
3535
}
@@ -47,7 +47,7 @@ neut_fepxsim_free (struct FEPXSIM *pFSim)
4747
ut_free_1d_char (&(*pFSim).bcs);
4848
ut_free_1d_char (&(*pFSim).ori);
4949
ut_free_1d_char (&(*pFSim).phase);
50-
ut_free_1d_char (&(*pFSim).config);
50+
ut_free_1d_char (&(*pFSim).cfg);
5151

5252
ut_free_1d_int (&(*pFSim).PartNodeQty);
5353
ut_free_1d_int (&(*pFSim).PartEltQty);

src/neut/neut_fepxsim/neut_fepxsim_sim/neut_fepxsim_sim.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ neut_fepxsim_sim (struct FEPXSIM FSim, struct SIM *pSim)
5858
ut_string_string (FSim.bcs, &(*pSim).bcs);
5959
ut_string_string (FSim.ori, &(*pSim).ori);
6060
ut_string_string (FSim.phase, &(*pSim).phase);
61-
ut_string_string (FSim.config, &(*pSim).config);
61+
ut_string_string (FSim.cfg, &(*pSim).cfg);
6262

6363
(*pSim).RestartId = FSim.RestartId;
6464
(*pSim).RestartFiles = FSim.RestartFiles;

src/neut/neut_nset/neut_nset.c

-14
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,6 @@ neut_nset_expand (struct NSET NSet0D, struct NSET NSet1D, struct NSET NSet2D,
1919
if (!in || strlen (in) == 0 || !strcmp (in, "none"))
2020
return;
2121

22-
if (strstr (in, "default"))
23-
{
24-
qty = 1;
25-
list = ut_alloc_2d_char (qty, 11);
26-
if (NSet2D.qty > 0)
27-
strcpy (list[0], "faces");
28-
else if (NSet1D.qty > 0)
29-
strcpy (list[0], "edges");
30-
else if (NSet0D.qty > 0)
31-
strcpy (list[0], "vertices");
32-
else
33-
ut_print_neperbug ();
34-
}
35-
3622
else if (strstr (in, "all"))
3723
{
3824
if (NSet2D.qty > 0)

src/neut/neut_sim/neut_sim_fprintf/neut_sim_fprintf1.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ neut_sim_fprintf (char *dir, struct SIM Sim, char *mode)
3131
fprintf (file, " *ori\n %s\n", Sim.msh);
3232
if (Sim.phase)
3333
fprintf (file, " *phase\n %s\n", Sim.msh);
34-
if (Sim.config)
35-
fprintf (file, " *config\n %s\n", Sim.config);
34+
if (Sim.cfg)
35+
fprintf (file, " *cfg\n %s\n", Sim.cfg);
3636

3737
fprintf (file, " **general\n");
3838
fprintf (file, " %d %d %d %d %d\n",
@@ -267,8 +267,8 @@ neut_sim_fprintf_asy (char *dir, struct SIM Sim, char *mode)
267267
fprintf (file, "TreeNode child1%d = makeNode(child1, \"\\tt %s\");\n", ++id, Sim.ori);
268268
if (Sim.phase)
269269
fprintf (file, "TreeNode child1%d = makeNode(child1, \"\\tt %s\");\n", ++id, Sim.phase);
270-
if (Sim.config)
271-
fprintf (file, "TreeNode child1%d = makeNode(child1, \"\\tt %s\");\n", ++id, Sim.config);
270+
if (Sim.cfg)
271+
fprintf (file, "TreeNode child1%d = makeNode(child1, \"\\tt %s\");\n", ++id, Sim.cfg);
272272

273273
int print_results = 0;
274274
char *child1 = ut_alloc_1d_char (100);
@@ -343,8 +343,8 @@ neut_sim_verbose (struct SIM Sim)
343343
printf (" ori");
344344
if (Sim.phase)
345345
printf (" phase");
346-
if (Sim.config)
347-
printf (" config");
346+
if (Sim.cfg)
347+
printf (" cfg");
348348
printf ("\n");
349349

350350
if (Sim.RestartId || Sim.RestartFiles)

0 commit comments

Comments
 (0)