See section Programming Environment for more information about Feel++ installation.
Let's begin with our first program using the Feel++ framework (source: doc/manual/tutorial/myapp.cpp
). Before all, you have to include the Feel++ headers.
We use the C++ namespace
to avoid Feel::
prefix before Feel++ objects.
We initialize the environment variables through the Feel++ Environment
class.
po::
which is a Feel++ alias for the Boost::program_options namespace. To add a new Feel++ option, we must create a newFeel++ options_description
. You must add the default Feel++ options and the new one that we choose here as a double value. Note that the default value will be assigned if not specified by the user.
To compile a tutorial, just use the GNU make command.
make feelpp_doc_<appname>
where <appname>
is the name of the application you wish to compile (here, myapp
). Go to the execution directory as specified in the program, and execute it. You can change your option value.
./feelpp_doc_myapp [--value 6.6]
You can list the log files created.
ls /tmp/<your login>/feelpp_doc_myapp/
If you open one of these log, you should be able to see your value and the processor number used to compute. You can run your application on several processors using MPI.
mpirun -np 2 feelpp_doc_myapp
Note that there will be one log for each processor in that case.
A config file can be parsed to the program to profile your options. The default config paths are,
$HOME/feel/config/
$INSTALL_PREFIX/share/feel/config/
then you have to write inside one of these folders a file called <app_name>.cfg
or feelpp_<app_name>.cfg
. For example, our myapp.cfg
would looks like,
value=0.53
Note that you can specify the config file through the option –config-file=<path>
PETSc is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. It employs the MPI standard for parallelism.
Feel++ supports the PETSc framework, the Environment
takes care of initializing the associated PETSc environment.