Skip to content

feelpp/feelpp-book

Repository files navigation

FEEL++ BOOK

1. Finite Element Embedded Library in C++

Feel++ is a unified C++ implementation of Galerkin methods (finite and spectral element methods) in 1D, 2D and 3D to solve partial differential equations.

Feel++ is

  1. a versatile mathematical kernel solving easily problems using different techniques thus allowing testing and comparing methods, e.g. cG versus dG.

  2. a small and manageable library which nevertheless encompasses a wide range of numerical methods and techniques and in particular reduced order methods such as the reduced basis method.

  3. a software that follows closely the mathematical abstractions associated with partial differential equations (PDE) and in particular the finite element mathematical framework and variational formulations.

  4. a library that offers solving strategies that scales up to thousands and even tens of thousands of cores.

  5. a library entirely in C++ allowing to create C++ complex and typically non-linear multi-physics applications currently in industry, physics and health-care.

2. Help and Support

We’re always happy to help out with Feel++ or any other questions you might have. You can ask a question or signal an issue at the Gitter Feel++ salon.

3. Contribute to this documentation

You can contribute to improve this documentation on GitHub and follow the Gitter Feel++ Book forum.

4. How to view the book

The book can be read online at https://book.feelpp.org/content

To compile the book on your machine.

  1. Install gitbook library to get access to command tools. We recommend using npm

npm install gitbook
  1. Clone this repository. Place yourself in the repository directory, then install the gitbook requirements. Finally, compile the book.

git clone [email protected]:feelpp/feelpp-book.git
cd feelpp-book
gitbook install
gitbook serve
  1. Visualize the book in your browser, generally http://localhost:4000

Remark:

For more output format option, type

gitbook help

5. How to edit the book

Feel++ developers can edit the book online via https://www.gitbook.com.

But we recommend to proceed via Pull Request on the github repository

  1. Fork this repository.

  2. Add a new "upstream" remote which point to this repository

  3. Set your master branch to point on this repository master branch.

  4. Create and place yourself in a new branch for writting your change

git remote add upstream git://github.com/wp-cli/wp-cli.git
git fetch upstream
git checkout upstream/master -B master
git checkout -b branchname
  1. Commit you change in your own branch, then create a pull-request targetting the prepub branch.

  2. Once the pull-request is accepted, you can delete your fork.

  3. Once the prepub branch is reviewed, the new version is published to master.

6. How to write the book (convention)

All this book is written in asciidoc. Avoid using other format. The book is divided in Part, Chapters, Sections.

6.1 Chapters, sections

Each chapter is a directory named <number>-<shortname> where <number> respect the chapter numbering. Each chapter contains a README.adoc files which contains the table of content for the whole chapter similar to the file SUMMARY.adoc.

Example of chapter
03-mychapter/README.adoc    # chapter toc
03-mychapter/01-myfirstsection.adoc
03-mychapter/02-mysecondsection.adoc

If the section contains many big subsection, proceed the same way.

Example of big section
03-mychapter/README.adoc                 # chapter toc
03-mychapter/01-mysection/README.adoc    # section toc
03-mychapter/01-mysection/01-subsection.adoc

See existing files in the book to well understand the book structure before editing any files.

6.2 Codes

To keep the book look coherent, we use two plugins for source codes: - .gitbook-plugin-include-codeblock - .gitbook-plugin-ace Note that include-codeblock use ace, see their documentation for more details. The styling option are set globally, please do not change them with local commands.

In most case, we recommend keeping code aside from the book, and include it using snippet features of include-codeblock. Do include a code, just use

[include,lang:"feelpp"](path/to/file.cpp)

If the code contains doxygen snippet tag, you can call inner code using this way

[include:"tag",lang:"feelpp"](path/to/file.cpp)

Note that if you do not pass the lang key, it will determine the syntax from file extension, so in this case C++.

6.2.2 Inner codes

If the code is really short, you can write it directly in the asciidoc file. We ask you to avoid this practice if it can be avoided.

{%ace lang:"feelpp"}
    // your code
{%endace}

It detect automatically the C++ syntax + feelpp syntax (.ace-mode-feelpp plugin)

6.3 Math

There’re many ways to write math formula. We ask you to use this latex delimiters \( \) and \[ \] for keeping latex and asciidoctor compatibility.

You might have to escape these delimiters with \ and write \\( \\) or \\[ \\] instead! See other source codes

Example of usage:

This is an inline formula \( \lambda \) math
This is an block formula
\[
    \lambda
\]