Skip to content

Commit 919e3b6

Browse files
committed
Fix or doc warnings due to previous snippets refactoring
1 parent b8409b1 commit 919e3b6

File tree

8 files changed

+70
-75
lines changed

8 files changed

+70
-75
lines changed

doc/contents/dev_createsim.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ including source code and build configuration using the OpenFLUID CMake module.
5353

5454
### File ExampleSimulator.cpp containing the simulator source code {#dev_createsim_exmpl_cpp}
5555

56-
@snippet help.snippets.example/ExampleSimulator.cpp example_full
56+
@snippet wares/ExampleSimulator.cpp example_full
5757

5858

5959
### File CMake.in.config containing the build configuration {#dev_createsim_exmpl_config}
6060

61-
@include help.snippets.example/CMake.in.cmake.snippet
61+
@include wares/CMake.in.cmake.snippet
6262

6363

6464
### File CMakeLists.txt defining the build process {#dev_createsim_exmpl_cmakelists}
6565

66-
@include help.snippets.example/CMakeLists.txt.snippet
66+
@include wares/CMakeLists.txt.snippet

doc/contents/dev_signature.md

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
[TOC]
44

5-
The signature has to be defined between the @if DocIsLaTeX **BEGIN_SIMULATOR_SIGNATURE** @else #BEGIN_SIMULATOR_SIGNATURE @endif
6-
and the @if DocIsLaTeX **END_SIMULATOR_SIGNATURE** @else #END_SIMULATOR_SIGNATURE @endif
5+
The signature has to be defined between the @if DocIsLaTeX **BEGIN_SIMULATOR_SIGNATURE** @else BEGIN_SIMULATOR_SIGNATURE @endif
6+
and the @if DocIsLaTeX **END_SIMULATOR_SIGNATURE** @else END_SIMULATOR_SIGNATURE @endif
77
instructions.
88
The signature is usually placed in the upper part of the simulator main source file, before the C++ class of the simulator.
99

@@ -12,23 +12,23 @@ The signature is usually placed in the upper part of the simulator main source f
1212

1313
The identification part of the signature must contain at least the ID of the simulator.
1414
This ID will be used by the framework to load simulators. It is declared in
15-
the signature as an argument of the @if DocIsLaTeX **BEGIN_SIMULATOR_SIGNATURE** @else #BEGIN_SIMULATOR_SIGNATURE @endif
15+
the signature as an argument of the @if DocIsLaTeX **BEGIN_SIMULATOR_SIGNATURE** @else BEGIN_SIMULATOR_SIGNATURE @endif
1616
instruction.
1717
Other optional informations can be included for better description of the simulator:
1818

19-
* the simulator name, declared through the @if DocIsLaTeX **DECLARE_NAME** @else #DECLARE_NAME @endif
19+
* the simulator name, declared through the @if DocIsLaTeX **DECLARE_NAME** @else DECLARE_NAME @endif
2020
instruction,
2121
allowing to assign a long name to the simulator
22-
* the simulator description, declared through the @if DocIsLaTeX **DECLARE_DESCRIPTION** @else #DECLARE_DESCRIPTION @endif
22+
* the simulator description, declared through the @if DocIsLaTeX **DECLARE_DESCRIPTION** @else DECLARE_DESCRIPTION @endif
2323
instruction,
2424
allowing to provide a detailed description of what the simulator actually does
25-
* the name(s) of the author(s) and corresponding email address(es), declared through the @if DocIsLaTeX **DECLARE_AUTHOR** @else #DECLARE_AUTHOR @endif
25+
* the name(s) of the author(s) and corresponding email address(es), declared through the @if DocIsLaTeX **DECLARE_AUTHOR** @else DECLARE_AUTHOR @endif
2626
instruction.
27-
There may be multiple @if DocIsLaTeX **DECLARE_AUTHOR** @else #DECLARE_AUTHOR @endif
27+
There may be multiple @if DocIsLaTeX **DECLARE_AUTHOR** @else DECLARE_AUTHOR @endif
2828
instructions in the signature in case of multiple authors
29-
* the software version of the simulator, declared through the @if DocIsLaTeX **DECLARE_VERSION** @else #DECLARE_VERSION @endif
29+
* the software version of the simulator, declared through the @if DocIsLaTeX **DECLARE_VERSION** @else DECLARE_VERSION @endif
3030
instruction
31-
* the software status of the simulator, declared through the @if DocIsLaTeX **DECLARE_STATUS** @else #DECLARE_STATUS @endif
31+
* the software status of the simulator, declared through the @if DocIsLaTeX **DECLARE_STATUS** @else DECLARE_STATUS @endif
3232
instruction. The value can be
3333
_openfluid::ware::EXPERIMENTAL_, _openfluid::ware::BETA_ or _openfluid::ware::STABLE_
3434

@@ -42,11 +42,11 @@ The informations about scientific applications are only indicative.
4242
It has no effects on simulator consistency or computational code.
4343
These informations can be :
4444

45-
* the domain in which the simulator can be applied, declared through the @if DocIsLaTeX **DECLARE_DOMAIN** @else #DECLARE_DOMAIN @endif
45+
* the domain in which the simulator can be applied, declared through the @if DocIsLaTeX **DECLARE_DOMAIN** @else DECLARE_DOMAIN @endif
4646
instruction
47-
* the processes simulated by the simulator, declared through the @if DocIsLaTeX **DECLARE_PROCESS** @else #DECLARE_PROCESS @endif
47+
* the processes simulated by the simulator, declared through the @if DocIsLaTeX **DECLARE_PROCESS** @else DECLARE_PROCESS @endif
4848
instruction
49-
* the numerical methods used by the simulator, declared through the @if DocIsLaTeX **DECLARE_METHOD** @else #DECLARE_METHOD @endif
49+
* the numerical methods used by the simulator, declared through the @if DocIsLaTeX **DECLARE_METHOD** @else DECLARE_METHOD @endif
5050
instruction
5151

5252

@@ -77,7 +77,7 @@ The declarations of spatial data access include constraint levels:
7777

7878
Simulator parameters are values provided to each simulator,
7979
and are declared using the @if DocIsLaTeX **DECLARE_REQUIRED_PARAMETER** or **DECLARE_USED_PARAMETER**
80-
@else #DECLARE_REQUIRED_PARAMETER or #DECLARE_USED_PARAMETER @endif
80+
@else DECLARE_REQUIRED_PARAMETER or DECLARE_USED_PARAMETER @endif
8181
instructions.
8282
These instructions takes 3 arguments
8383

@@ -87,15 +87,15 @@ These instructions takes 3 arguments
8787

8888

8989
_Example of a declaration of a required simulator parameter:_
90-
@snippet help.snippets.signature-parts/SignaturePartsSim.cpp signature_params
90+
**TOIMPL**
9191

9292

9393
### Spatial attributes {#dev_signature_data_attrs}
9494

9595
Spatial attributes are constant properties attached to each spatial units,
9696
and are declared using @if DocIsLaTeX **DECLARE_REQUIRED_ATTRIBUTE**, **DECLARE_USED_ATTRIBUTE**
9797
or **DECLARE_PRODUCED_ATTRIBUTE**
98-
@else #DECLARE_REQUIRED_ATTRIBUTE, #DECLARE_USED_ATTRIBUTE or #DECLARE_PRODUCED_ATTRIBUTE @endif
98+
@else DECLARE_REQUIRED_ATTRIBUTE, DECLARE_USED_ATTRIBUTE or DECLARE_PRODUCED_ATTRIBUTE @endif
9999
instructions
100100

101101
These instructions take 4 arguments:
@@ -106,22 +106,18 @@ These instructions take 4 arguments:
106106
* the SI unit of the attribute (may be empty)
107107

108108

109-
_Example of attributes declaration:_
110-
@snippet help.snippets.signature-parts/SignaturePartsSim.cpp signature_attributes
111-
112-
113109
### Simulation variables {#dev_signature_data_vars}
114110

115111
Simulation variables are attached to spatial units. They are produced, accessed and modified
116112
by simulators during simulations.
117113
Accessed variables are declared using @if DocIsLaTeX **DECLARE_REQUIRED_VARIABLE** or **DECLARE_USED_VARIABLE**
118-
@else #DECLARE_REQUIRED_VARIABLE or #DECLARE_USED_VARIABLE @endif
114+
@else DECLARE_REQUIRED_VARIABLE or DECLARE_USED_VARIABLE @endif
119115
instructions,
120116
produced variables are declared using @if DocIsLaTeX **DECLARE_PRODUCED_VARIABLE**
121-
@else #DECLARE_PRODUCED_VARIABLE @endif
117+
@else DECLARE_PRODUCED_VARIABLE @endif
122118
instruction,
123119
updated variables are declared using @if DocIsLaTeX **DECLARE_UPDATED_VARIABLE**
124-
@else #DECLARE_UPDATED_VARIABLE @endif
120+
@else DECLARE_UPDATED_VARIABLE @endif
125121
instruction.
126122

127123
These instructions take 4 arguments:
@@ -170,36 +166,36 @@ simulator B requires/uses/updates a _typed_ variable _var1_ of type `matrix`
170166

171167

172168
_Example of variable declarations:_
173-
@snippet help.snippets.signature-parts/SignaturePartsSim.cpp signature_variables
169+
**TOIMPL**
174170

175171

176172
### Discrete events {#dev_signature_data_events}
177173

178174
Discrete events are attached to spatial units, They are accessed or appended by simulators during simulations,
179175
and are declared using the @if DocIsLaTeX **DECLARE_USED_EVENTS**
180-
@else #DECLARE_USED_EVENTS @endif
176+
@else DECLARE_USED_EVENTS @endif
181177
instruction.
182178

183179
The declaration instruction takes 1 argument: the units class.
184180

185181
_Example of events declaration:_
186-
@snippet help.snippets.signature-parts/SignaturePartsSim.cpp signature_events
182+
**TOIMPL**
187183

188184

189185
### Extra files {#dev_signature_data_extrafiles}
190186

191187
Simulators can declare files that they load and manage. This helps users to provide the needed files, and also
192188
notifies the OpenFLUID framework to check the presence of the file if it is required.
193189
These files are declared using the @if DocIsLaTeX **DECLARE_USED_EXTRAFILE**
194-
@else #DECLARE_USED_EXTRAFILE @endif
190+
@else DECLARE_USED_EXTRAFILE @endif
195191
or @if DocIsLaTeX **DECLARE_REQUIRED_EXTRAFILE**
196-
@else #DECLARE_REQUIRED_EXTRAFILE @endif
192+
@else DECLARE_REQUIRED_EXTRAFILE @endif
197193
instructions.
198194

199195
The declaration instruction takes 1 argument: the file name with relative path to the dataset path.
200196

201197
_Example of extra file declarations:_
202-
@snippet help.snippets.signature-parts/SignaturePartsSim.cpp signature_extrafiles
198+
**TOIMPL**
203199

204200

205201
### Spatial units graph {#dev_signature_data_spatial}
@@ -208,7 +204,7 @@ The spatial units graph representing the landscape can be modified by simulators
208204
These modifications are declared in the signature function using two instructions.
209205

210206
The @if DocIsLaTeX **DECLARE_UPDATED_UNITSGRAPH**
211-
@else #DECLARE_UPDATED_UNITSGRAPH @endif
207+
@else DECLARE_UPDATED_UNITSGRAPH @endif
212208
instruction is used for declaration of the global units graph modification
213209
that will occur during simulation.
214210
It is for information purpose only, and takes a description as a single argument.
@@ -223,11 +219,11 @@ It takes two arguments:
223219

224220

225221
_Example of declarations for spatial units graph:_
226-
@snippet help.snippets.signature-parts/SignaturePartsSim.cpp signature_spatial
222+
**TOIMPL**
227223

228224

229225
## Complete signature example {#dev_signature_exmpl}
230226

231227
The signature code below shows an example of a possible signature for a simulator.
232228

233-
@snippet help.snippets.signature/SignatureSim.cpp signature_full
229+
**TOIMPL**

doc/contents/dev_sim2doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LaTeX
2828

2929

3030
_Example of a part of source code including sim2doc informations:_
31-
@snippet help.snippets.sim2doc/Sim2DocSim.cpp sim2doc
31+
**TOIMPL**
3232

3333

3434
<br/>

doc/contents/dev_srccode.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ to never be executed again
4848

4949

5050
_Example for a fixed time step simulator, with a time step equal to the default DeltaT value given in the input dataset:_
51-
@snippet help.snippets.sched-fixed/SchedFixedSim.cpp scheduling_fixed
51+
@snippet wares/SchedFixedSim.cpp scheduling_fixed
5252

5353
_Example for a variable time step simulator, based on the internal computation of the simulator:_
54-
@snippet help.snippets.sched-variable/SchedVariableSim.cpp scheduling_variable
54+
@snippet wares/SchedVariableSim.cpp scheduling_variable
5555

5656

5757

@@ -146,7 +146,7 @@ The source code below shows examples of spatial graph parsing.
146146
The first part of the source code shows how to browse all units of the SU units class,
147147
and how to browse the "From" units for each SU unit.
148148
The second part of the source code shows how to browse all units of the spatial domain.
149-
@snippet help.snippets.spatial-parsing-seq/SpatialParsingSeqSim.cpp spatial_parsing_seq
149+
@snippet wares/SpatialParsingSeqSim.cpp spatial_parsing_seq
150150

151151

152152
#### Parallel processing using multithreading {#dev_srccode_space_parse_par}
@@ -167,10 +167,10 @@ a pointer to an @if DocIsLaTeX **openfluid::core::SpatialUnit** @endif
167167
<br/>
168168
In order to enable the parallel processing in the spatial graph,
169169
the following inclusion must be added at the top of the simulator source code:
170-
@snippet help.snippets.spatial-parsing-parallel/SpatialParsingParallelSim.cpp spatial_parsing_parallel_include
170+
@snippet wares/SpatialParsingParallelSim.cpp spatial_parsing_parallel_include
171171

172172
The code below shows how to apply a method in parallel over the spatial graph:
173-
@snippet help.snippets.spatial-parsing-parallel/SpatialParsingParallelSim.cpp spatial_parsing_parallel
173+
@snippet wares/SpatialParsingParallelSim.cpp spatial_parsing_parallel
174174

175175

176176
@note
@@ -267,7 +267,7 @@ In order to add and remove connections, you can use the following methods, whene
267267

268268

269269
_Example:_
270-
@snippet help.snippets.spatial-connect/SpatialConnectSim.cpp spatial_connect
270+
@snippet wares/SpatialConnectSim.cpp spatial_connect
271271

272272

273273
#### Generating spatial domain graphs automatically {#dev_srccode_space_mod_gen}
@@ -340,7 +340,7 @@ and is available from the runStep() and finalizeRun() methods of the simulator
340340

341341

342342
_Example of code:_
343-
@snippet help.snippets.params-env-time/ParamsEnvTimeSim.cpp time
343+
@snippet wares/ParamsEnvTimeSim.cpp time
344344

345345

346346
## Simulator parameters {#dev_srccode_simparams}
@@ -364,7 +364,7 @@ and used in the model.fluidx file (see @ref user_fluidx_sections_model of the si
364364
<br/>
365365

366366
_Example of initParams method:_
367-
@snippet help.snippets.params-env-time/ParamsEnvTimeSim.cpp params
367+
@snippet wares/ParamsEnvTimeSim.cpp params
368368

369369

370370
To be used in other part of the simulator,
@@ -406,7 +406,7 @@ The names of the attributes must match the names in the input dataset (see @ref
406406
or the name of an attribute created by a simulator.
407407

408408
_Example of use:_
409-
@snippet help.snippets.attributes/AttributesSim.cpp attributes
409+
@snippet wares/AttributesSim.cpp attributes
410410

411411

412412
## Simulation variables {#dev_srccode_vars}
@@ -466,7 +466,7 @@ and finalizeRun() parts of the simulator.
466466

467467

468468
_Example:_
469-
@snippet help.snippets.variables/VariablesSim.cpp variables
469+
@snippet wares/VariablesSim.cpp variables
470470

471471

472472
## Events {#dev_srccode_events}
@@ -508,7 +508,7 @@ An event can be added on a specific spatial unit at a given date using:
508508
<br/>
509509

510510
_Example of process of events occurring on the current time step:_
511-
@snippet help.snippets.events/EventsSim.cpp events
511+
@snippet wares/EventsSim.cpp events
512512

513513

514514

@@ -569,11 +569,11 @@ openfluid::core::IDSerieOfDoubleValuePtrMap
569569

570570

571571
_Example of declaration of ID-map structures in private members of the simulator class:_
572-
@snippet help.snippets.internal-state/InternalStateSim.cpp internal_state_decl
572+
@snippet wares/InternalStateSim.cpp internal_state_decl
573573

574574

575575
_Example of usage of the ID-map structures:_
576-
@snippet help.snippets.internal-state/InternalStateSim.cpp internal_state_impl
576+
@snippet wares/InternalStateSim.cpp internal_state_impl
577577

578578

579579
## Runtime environment {#dev_srccode_runenv}
@@ -591,7 +591,7 @@ They are accessible from simulators using:
591591

592592

593593
_Example:_
594-
@snippet help.snippets.params-env-time/ParamsEnvTimeSim.cpp env
594+
@snippet wares/ParamsEnvTimeSim.cpp env
595595

596596

597597
The keys for requesting runtime environment information are:
@@ -656,7 +656,7 @@ Using these methods is the recommended way to log and display messages. Please a
656656
or similar C++ facilities in production or released simulators.
657657

658658
_Example:_
659-
@snippet help.snippets.infos-debug/InfosDebugSim.cpp infowarning
659+
@snippet wares/InfosDebugSim.cpp infowarning
660660

661661
The messages logged to file are put in the `openfluid-messages.log` file
662662
placed in the simulation output directory.
@@ -676,7 +676,7 @@ Errors can be raised using
676676
@endif
677677

678678
_Example:_
679-
@snippet help.snippets.infos-debug/InfosDebugSim.cpp error
679+
@snippet wares/InfosDebugSim.cpp error
680680

681681

682682
## Debugging {#dev_srccode_debug}
@@ -721,7 +721,7 @@ to log and display debug messages simultaneously
721721

722722

723723
_Example:_
724-
@snippet help.snippets.infos-debug/InfosDebugSim.cpp debug
724+
@snippet wares/InfosDebugSim.cpp debug
725725

726726

727727
Additional instructions are available for debugging, see file debug.hpp:
@@ -742,21 +742,21 @@ You are invited to read the FortranCPP.hpp file to get more information about th
742742

743743

744744
In order to enable the call of Fortran code, the following inclusion must be added at the top of the simulator source code:
745-
@snippet help.snippets.fortran/FortranSim.cpp fortran_include
745+
@snippet wares/FortranSim.cpp fortran_include
746746

747747

748748

749749
_Example of Fortran source code (e.g. FortranSubr.f90):_
750-
@include help.snippets.fortran/FortranSubr.f90
750+
@include wares/FortranSubr.f90
751751

752752

753753
_Example of declaration block int the .cpp file (e.g. FortranSim.cpp):_
754-
@snippet help.snippets.fortran/FortranSim.cpp fortran_decl
754+
@snippet wares/FortranSim.cpp fortran_decl
755755

756756

757757

758758
_Example of call of the fortran subroutine from the initializeRun method (e.g. FortranSim.cpp):_
759-
@snippet help.snippets.fortran/FortranSim.cpp fortran_use
759+
@snippet wares/FortranSim.cpp fortran_use
760760

761761

762762

@@ -776,14 +776,14 @@ It also relies on the [Rcpp package](http://dirk.eddelbuettel.com/code/rcpp.html
776776
for handling data from and to the [R environment](https://www.r-project.org/).
777777

778778
In order to embed R code using RInside, the following inclusion must be added at the top of the simulator source code:
779-
@snippet help.snippets.R/RSim.cpp R_include
779+
@snippet wares/RSim.cpp R_include
780780

781781
A unique RInside variable is used to run R code, it should be declared as a member of the simulator class (named `m_R` in this example).
782-
@snippet help.snippets.R/RSim.cpp R_decl
782+
@snippet wares/RSim.cpp R_decl
783783

784784
The R environment can be acessed through the RInside variable
785785
and R commands can be run using its `parseEvalQ()` method.
786-
@snippet help.snippets.R/RSim.cpp R_use
786+
@snippet wares/RSim.cpp R_use
787787

788788
In this short example, simple variables and commands are used.
789789
It is possible to perform complex operations involving external R packages,
@@ -794,7 +794,7 @@ See the [RInside package](http://dirk.eddelbuettel.com/code/rinside.html) docume
794794
To help configuring the simulator which is using the RInside package, a CMake module is provided with OpenFLUID
795795
to setup the configuration variables when building the simulator.
796796
It should be used in the `CMake.in.cmake` file of the simulator.
797-
@include help.snippets.R/CMake.in.cmake
797+
@include wares/CMake.in.cmake.snippet
798798

799799
An adjustment of the CMake module path prefix may be required to find the provided R module for CMake
800800
```

0 commit comments

Comments
 (0)