Skip to content

Commit a2616a8

Browse files
authored
Update first simulation documentation (chaos-polymtl#1603)
Description I did not like the first simulation part of the documentation. It teaches user to work in a very weird fashion in which they do not install the executables but either copy the executables or run them directly from the build folder. This is not a typical linux fashion. I have streamlined the documentation to focus on people installing, but I still note the other alternatives.
1 parent 6e56cbd commit a2616a8

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

doc/source/first_simulation.rst

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@ Launching Your First Simulation
44

55
The objective of this section is to highlight the steps that are necessary to launch your first simulation after you have cloned and compiled Lethe.
66

7-
Launching an application requires an executable of the required solver, and a parameters file (with extension .prm). After building Lethe, the solver executable files can be found in : ``$BUILD_FOLDER/applications`` directory.
7+
Launching an application requires an executable of the required solver, and a parameters file (with extension .prm). After building Lethe, the solver executable files can be found in : ``$INSTALLATION_FOLDER/bin`` directory.
88

9-
For instance, ``lethe-fluid-block`` executable is located in the ``$BUILD_FOLDER/applications/lethe-fluid-block`` directory.
9+
The executable for the solvers can be used from any folder. Simulations can be launched by:
1010

11-
The executable for the solvers can be used directly from the folder it is compiled to. This can be achieved by:
12-
13-
* Writing the absolute path of the solver (e.g. ``$BUILD_FOLDER/applications/lethe-fluid-block/lethe-fluid-block``);
1411
* Adding the lethe folder paths to your ``PATH`` environment variable;
15-
* Specifying an installation folder when you compile Lethe to ensure that all the applications are grouped within a single folder;
12+
* Writing the absolute path of the solver (e.g. ``$INSTALLATION_FOLDER/bin/lethe-fluid``);
1613
* Locally copying the executable to the folder you are running your simulation from.
1714

18-
All these workflows can achieve the same result.
15+
All these workflows achieve the same result.
1916

2017
To launch a simulation, you must specify the solver executable and the parameter file in the following format: ``solver parameter_file``. For example, ``lethe-fluid poiseuille2d.prm``
2118

@@ -33,18 +30,9 @@ The source folder of lethe contains an examples folder. This folder contains rea
3330
Step 2: Launching the Example
3431
-----------------------------
3532

36-
The cavity example we are launching uses the *lethe-fluid* solver. All of the solvers of Lethe can be found in the build folder where you have compiled Lethe or within the installation folder. Inside of your build folder, six sub folders should be found:
37-
38-
* ``/applications``
39-
* ``/applications_tests``
40-
* ``/CMakeFiles``
41-
* ``/prototypes``
42-
* ``/source``
43-
* ``/tests``
44-
45-
Inside the ``/applications`` folder, there is one folder for each solver of Lethe. In the ``/lethe-fluid`` folder, we find the executable file with the same name as the folder: ``lethe-fluid``. This solver solves the 2D incompressible Navier-Stokes equations using a Galerkin Least-Square formulation.
33+
The cavity example we are launching uses the *lethe-fluid* solver. All of the solvers of Lethe can be found within the ``bin`` folder of the installation folder. The installation folder is the folder you have specified (``-DCMAKE_INSTALL_PREFIX=...``) when you ran the cmake command to compile Lethe.
4634

47-
From the ``/first_simulation`` folder we have created, we can launch the simulation directly. If you have decided to copy the executable to the ``first_simulation`` folder, you can launch using the following command: ``./lethe-fluid cavity.prm``. You can also launch the simulation using the absolute path of the executable: ``$BUILD_FOLDER/applications/lethe-fluid/lethe-fluid cavity.prm``.
35+
From the ``first_simulation`` folder we have created, we can launch the simulation directly. If the executable is within your path, you can launch the simulation using the following command: ``lethe-fluid cavity.prm``. If you have decided to copy the executable to the ``first_simulation`` folder, you can launch using the following command: ``./lethe-fluid cavity.prm``. You can also launch the simulation using the absolute path of the executable: ``$INSTALLATION_FOLDER/bin/lethe-fluid cavity.prm``.
4836

4937

5038
Step 3: Post-processing the Results
@@ -55,4 +43,4 @@ Once the application has run, the simulation results can be looked at by opening
5543
Understanding the Examples
5644
---------------------------
5745

58-
Lethe comes pre-packaged with some examples which are documented on the present documentation in the :doc:`examples/examples` tab. We greatly encourage you to look at these examples to understand how Lethe can be used to solve different problems. For a more in-depth understanding of the parameter file, the reader can take a look at the :doc:`parameters/parameters` section for general and application specific parameters. Tutorial examples offer basic cases, focusing on a specific aspect, whereas Engineering Applications provide complex cases to showcase some of the features of Lethe.
46+
Lethe comes pre-packaged with some examples which are documented on the present documentation in the :doc:`examples/examples` tab. We greatly encourage you to look at these examples to understand how Lethe can be used to solve different problems. For a more in-depth understanding of the parameter file, the reader can take a look at the :doc:`parameters/parameters` section for general and application specific parameters.

0 commit comments

Comments
 (0)