Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub CI Documentation builder committed Jan 8, 2025
1 parent 5a205d9 commit 5a9314f
Show file tree
Hide file tree
Showing 56 changed files with 2,816 additions and 2,594 deletions.
179 changes: 179 additions & 0 deletions docs_getting_started.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Gyselalib++: Getting Started with Gyselalib++</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
<td id="projectalign">
<div id="projectname">Gyselalib++
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('docs_getting_started.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div><div class="header">
<div class="headertitle"><div class="title">Getting Started with Gyselalib++</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Welcome to the gyselalib++ project! This guide is designed to help new developers understand how to get started with the project. Please bear in mind that developers unfamiliar with C++ will not find the answers to all their questions in the documentation. While we aim to provide documentation where relevant, this is not a replacement for foundational C++ knowledge; instead, it focuses on the specific challenges and paradigms relevant to gyselalib++. If you encounter unfamiliar keywords or concepts in the code, we recommend looking them up online as a first step. This will help you build a deeper understanding and use your time more effectively before seeking further assistance.</p>
<hr />
<h1><a class="anchor" id="docs_getting_started__Understanding_Functional_Programming_in_Gyselalibxx"></a>
Understanding Functional Programming in Gyselalib++</h1>
<p>There are multiple coding paradigms possible when writing code in C++. Two of the most common are object-oriented programming and functional programming. You may be familiar with object-oriented programming however gyselalib++ uses functional programming.</p>
<h3><a class="anchor" id="autotoc_md22"></a>
Key Difference: Functional vs. Object-Oriented Programming (OOP)</h3>
<p><b>Object-Oriented Programming (OOP)</b> is built around the concept of objects that encapsulate data and behavior. Developers used to OOP often think in terms of classes, inheritance, and polymorphism. While these are powerful concepts, they are not central to how gyselalib++ is structured. This is notably because inheritance, and polymorphism are often incompatible with GPU programming.</p>
<p><b>Functional Programming (FP)</b> aims to make code more readable by making it more obvious where data is modified. This is done by separating data storage from operators. This way, data can never be modified inside its class without passing through an operator. In our code the functional programming paradigm was chosen as it allows us to write the code in a way which more closely resembles the equations.</p>
<h3><a class="anchor" id="autotoc_md23"></a>
Operators and Data Structures</h3>
<p>When using functional programming classes fit into one of two groups:</p>
<ul>
<li><b>Data Structures</b>:<ul>
<li>Serve as containers for data, often passed into operators for processing.</li>
<li>Avoid embedding behavior directly into data structures; instead, let operators handle transformations.</li>
</ul>
</li>
<li><b>Operators</b>:<ul>
<li>Should implement an <code>operator()</code> method, allowing them to be used as callable objects.</li>
<li>Their internal variables should remain constant to align with functional programming principles.</li>
<li>Break problems into small, composable functions. Avoid the temptation to design large, monolithic classes.</li>
<li>Can be thought of as a function. Classes are used instead so the functions called by this function can be decided at compile time.</li>
</ul>
</li>
</ul>
<p>By separating operators (behavior) from data structures (data), you ensure clarity, reusability, and better adherence to the functional programming style.</p>
<p>For example consider the case of a semi-Lagrangian advection. The operator is similar to a function which modifies a data structure containing the distribution function. By using a class the method used to interpolate the function (e.g. spline interpolation or <a class="el" href="classLagrange.html" title="A class which implements Lagrange polynomials.">Lagrange</a> interpolation) can be specified without duplicating code.</p>
<hr />
<h1><a class="anchor" id="docs_getting_started__Navigating_the_Gyselalibxx_Codebase"></a>
Navigating the Gyselalib++ Codebase</h1>
<p>The gyselalib++ codebase is organised into several folders. The main folders of interest are:</p><ul>
<li><b>src/</b> : This folder contains the source code for the library. It contains folders grouping the code by subject. The <code>src/</code> folder and each sub-folder contains a <code>README.md</code> detailing its contents. It is simple to navigate within this documentation : <a class="el" href="src.html">Gyselalib++ contents</a><ul>
<li><b>geometry...</b> : The <code>src/</code> folder contains sub-folders whose names begin with <code>geometry</code>. These sub-folders contain code which is specific to a given geometry. Each geometry is defined by the dimensions on which its equations are defined. In these folders you will also find sub-folders grouping the code by subject. Each <code>geometry...</code> folder will contain a folder called <code>geometry</code> containing a file <code>geometry.hpp</code>. This file contains type aliases which are useful for this geometry. This includes the definition of the classes representing the dimensions. If a <code>geometry.hpp</code> is included in a file then this file can only be used for that specific geometry. Therefore files in a <code>geometry...</code> folder cannot be used for other geometries even if the two appear to be compatible at first glance (e.g. files from the <code>geometryRTheta</code> folder cannot be used for the <code>geometryAxi</code> simulations, files from the <code>geometryXVx</code> folder cannot be used for the <code>geometryXYVxVy</code> simulations).</li>
</ul>
</li>
<li><b>tests/</b> : This folder contains the unit tests for the library. The folder structure is similar to that found in the <code>src/</code> folder.</li>
<li><b>simulations/</b> : This folder contains examples of simulations. In order to use the gyselalib++ library for research applications we usually create a new repository which contains this repository as a sub-module, however there are still some simulations hosted in this repository. This is notably the case for simulations which have known properties that can be used as end-to-end tests. For example the Landau damping case.</li>
</ul>
<hr />
<h1><a class="anchor" id="docs_getting_started__Recommended_Steps_for_Getting_Started"></a>
Recommended Steps for Getting Started</h1>
<ol type="1">
<li><b>Familiarize yourself with DDC:</b><ul>
<li>Gyselalib++ relies heavily on <a href="https://ddc.mdls.fr/">DDC (Discrete Domain Decomposition Library)</a> for data management. Understanding its usage is key to contributing effectively.</li>
<li>See our detailed guide on DDC integration: <a class="el" href="docs_DDC_in_gyselalibxx.html">Using DDC in Gyselalibxx</a>.</li>
</ul>
</li>
<li><b>Build the project:</b><ul>
<li>Follow the build instructions in the repository's README.</li>
<li>More detailed instructions especially instructions for specific systems like the CEA's persee can be found in the toolchain documentation: <a class="el" href="toolchains.html">Pre-made build settings</a>.</li>
</ul>
</li>
<li><b>Identify a simple task:</b><ul>
<li>Start with a small, well-scoped issue to familiarize yourself with the contribution process and code review workflow.</li>
</ul>
</li>
</ol>
<hr />
<p>We hope this guide sets you on the right path to contributing to gyselalib++. Happy coding! </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<div class="headertitle"><div class="title">Gyselalib++ </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Gyselalib++ is a collection of C++ components for writing gyrokinetic semi-lagrangian codes and similar as well as a collection of such codes. It is based on <a href="https://ddc.mdls.fr/">DDC</a>. We strongly encourage new developers to begin by reading our documentation about <a class="el" href="docs_DDC_in_gyselalibxx.html">Using DDC in Gyselalibxx</a>.</p>
<div class="textblock"><p>Gyselalib++ is a collection of C++ components for writing gyrokinetic semi-lagrangian codes. If this is your first interaction with gyselalib++ please check out the documentation on <a class="el" href="docs_getting_started.html">Getting Started with Gyselalib++</a>.</p>
<h1><a class="anchor" id="__Set-up"></a>
Set-up</h1>
<p>In order to set up Gyselalib++ on a new machine, simply run: </p><div class="fragment"><div class="line">git clone --recurse-submodules git@gitlab.maisondelasimulation.fr:gysela-developpers/gyselalibxx.git gyselalibxx</div>
Expand Down
19 changes: 12 additions & 7 deletions navtreedata.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ var NAVTREE =
[ "What is the difference between Debug and Release mode?", "docs_developer_FAQ.html#docs_developer_FAQ__What_is_the_difference_between_Debug_and_Release_mode", null ],
[ "Should I use abort, assert, or static_assert to raise an error?", "docs_developer_FAQ.html#docs_developer_FAQ__Should_I_use_abort_assert_or_static_assert_to_raise_an_error", null ]
] ],
[ "Getting Started with Gyselalib++", "docs_getting_started.html", [
[ "Understanding Functional Programming in Gyselalib++", "docs_getting_started.html#docs_getting_started__Understanding_Functional_Programming_in_Gyselalibxx", null ],
[ "Navigating the Gyselalib++ Codebase", "docs_getting_started.html#docs_getting_started__Navigating_the_Gyselalibxx_Codebase", null ],
[ "Recommended Steps for Getting Started", "docs_getting_started.html#docs_getting_started__Recommended_Steps_for_Getting_Started", null ]
] ],
[ "Gyselalib++ simulations", "simulations.html", [
[ "Simulations in (r, theta) geometry", "simulations_geometryRTheta.html", [
[ "Diocotron instability", "simulations_geometryRTheta_diocotron.html", [
Expand Down Expand Up @@ -124,14 +129,14 @@ var NAVTREE =
[ "Time integration methods", "src_geometryRTheta_advection.html#src_geometryRTheta_advection__Time_integration_methods", null ],
[ "Advection domain", "src_geometryRTheta_advection.html#src_geometryRTheta_advection__Advection_domain", null ],
[ "Advection Field", "src_geometryRTheta_advection.html#src_geometryRTheta_advection__Advection_Field", null ],
[ "Unit tests", "src_geometryRTheta_advection.html#autotoc_md45", null ],
[ "References", "src_geometryRTheta_advection.html#autotoc_md46", null ],
[ "Contents", "src_geometryRTheta_advection.html#autotoc_md47", null ]
[ "Unit tests", "src_geometryRTheta_advection.html#autotoc_md51", null ],
[ "References", "src_geometryRTheta_advection.html#autotoc_md52", null ],
[ "Contents", "src_geometryRTheta_advection.html#autotoc_md53", null ]
] ],
[ "Advection Field finder", "src_geometryRTheta_advection_field.html", [
[ "Guiding center case", "src_geometryRTheta_advection_field.html#src_geometryRTheta_advection_field__Guiding_center_case", null ],
[ "References", "src_geometryRTheta_advection_field.html#autotoc_md52", null ],
[ "Contents", "src_geometryRTheta_advection_field.html#autotoc_md53", null ]
[ "References", "src_geometryRTheta_advection_field.html#autotoc_md58", null ],
[ "Contents", "src_geometryRTheta_advection_field.html#autotoc_md59", null ]
] ],
[ "Geometry RTheta", "src_geometryRTheta_geometry.html", [
[ "Shortcuts", "src_geometryRTheta_geometry.html#src_geometryRTheta_geometry__Shortcuts", null ]
Expand Down Expand Up @@ -268,8 +273,8 @@ var NAVTREEINDEX =
"classMaxwellianEquilibrium.html#af3b41f93de3bb96ae0b44d8f89ee2a0a",
"classRK2.html#a9a7f95c2396c54b9f6323cbd444dd8c1",
"dir_fff31245b39ef81c8e6b4b2456b9c284.html",
"src_geometryRTheta_initialization.html#src_geometryRTheta_initialization__Contents",
"structonion__shape__uniform__2d__2patches_1_1GridR.html"
"src_geometryRTheta_advection_field.html#src_geometryRTheta_advection_field__Guiding_center_case",
"structonion__shape__non__uniform__2d__2patches_1_1R.html"
];

var SYNCONMSG = 'click to disable panel synchronisation';
Expand Down
Loading

0 comments on commit 5a9314f

Please sign in to comment.