Add documentation

This commit is contained in:
Yoann Audouin 2023-01-16 14:43:55 +01:00
parent 419f8f46e5
commit 5fa7f9af0a
7 changed files with 82 additions and 1 deletions

View File

@ -129,6 +129,7 @@ SET(BAD_TESTS
viewing_meshes_ex01.py
radial_prism_3d_algo.py
create_dual_mesh.py
creating_parallel_mesh.py
)
IF(NOT WIN32)
LIST(APPEND BAD_TESTS

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -71,6 +71,8 @@ Quadratic mesh can be obtained in three ways:
* Using :ref:`convert_to_from_quadratic_mesh_page` operation.
* Using an appropriate option of some meshing algorithms, which generate elements of several dimensions starting from mesh segments.
A work in progress allow you to compute your mesh in parralle :ref:`Parallel Computing<parallel_compute>`
**Table of Contents**
@ -86,3 +88,4 @@ Quadratic mesh can be obtained in three ways:
copy_mesh.rst
create_dual_mesh.rst
connectivity.rst
parallel_compute.rst

View File

@ -0,0 +1,69 @@
.. _parallel_compute_page:
******************
Parallel Computing
******************
.. warning::
This functionality is a work in progress.
It is only available for NETGEN.
It is only available in TUI.
The goal here is to speed up computation by running sub-meshes in parallel
(multi-threading).
*******
Concept
*******
.. image:: ../images/diagram_parallel_mesh.png
In order to parallelise the computation of the mesh we split the geometry into:
* A 1D+2D compound
* A list of 3D solids
Then create a sub-mesh for each of those geometry.
And associate Hypothesis to the mesh using a hypothesis on the whole geometry
We will first compute sequentially the 1D+2D compound with NETGEN_1D2D.
Then we will compute all the solids in parallel. Having done the 1D+2D first
ensure that all the solids can be computed without any concurrency.
******
How to
******
You follow the same principle as the creation of a sequential Mesh.
#. First you create the mesh:
.. code-block:: python
par_mesh = smesh.ParallelMesh(geom, name="par_mesh")
#. Define the Global Hypothesis that will be split into an hypothesis for the
1D+2D compound and one for each of the 3D solids:
.. code-block:: python
NETGEN_3D_Parameters_1 = smesh.CreateHypothesisByAverageLength( 'NETGEN_Parameters',
'NETGENEngine', 34.641, 0 )
par_mesh.AddGlobalHypothesis(netgen_parameters)
#. Set the parameters for the parallelisation:
.. code-block:: python
par_mesh.SetNbThreads()Compute()
#. Compute the mesh:
.. code-block:: python
mesh.Compute()
**See Also** a sample script of :ref:`tui_create_parallel_mesh`.

View File

@ -117,3 +117,12 @@ Creating Dual Mesh
:download:`Download this script <../../examples/create_dual_mesh.py>`
.. _tui_create_parallel_mesh:
Creating Parallel Mesh
======================
.. literalinclude:: ../../examples/creating_parallel_mesh.py
:language: python
:download:`Download this script <../../examples/creating_parallel_mesh.py>`

View File

@ -65,7 +65,6 @@ SET(BAD_TESTS
SMESH_create_dual_mesh_adapt.py
SMESH_create_dual_mesh_tpipe.py
netgen_runner.py
SMESH_ParallelCompute.py
)
IF(NOT WIN32)
LIST(APPEND BAD_TESTS