From 214c2c3b53351ebb04b8173b821ad5135683d311 Mon Sep 17 00:00:00 2001 From: Jean-Matthieu Etancelin <jean-matthieu.etancelin@univ-pau.fr> Date: Wed, 27 Jun 2018 10:55:29 +0200 Subject: [PATCH] improve doc (advection) --- docs/sphinx/users_guide/advection.rst | 66 +++++++++++++++---- .../operator/directional/advection_dir.py | 2 +- hysop/operator/advection.py | 39 +++++++++++ 3 files changed, 94 insertions(+), 13 deletions(-) diff --git a/docs/sphinx/users_guide/advection.rst b/docs/sphinx/users_guide/advection.rst index a2f80bb2e..40b1d7029 100644 --- a/docs/sphinx/users_guide/advection.rst +++ b/docs/sphinx/users_guide/advection.rst @@ -12,30 +12,42 @@ Advection of one or more fields, i.e. find field X which solves for a given velocity field and assuming incompressible flow. +All solvers (except pure python) are able to solve advection in a +bi-level configuration : velocity is known on a coarser grid than the +advected field. In that case, the velocity is linearly interpolated +before move particles. Linear interpolation is a default method and +the only one implemented for the moment. -Multi-CPU (scales) advection ----------------------------- -Scales : +Scales (Multi-CPU) : +-------------------- + +Scales library is iterfaced into HySoP (using :class:`~hysop.operator.advection.Advection` operator). * Fortran routines * 3D only Available solvers: ^^^^^^^^^^^^^^^^^^ + * 'p_O2' : order 4 method, corrected to allow large CFL number, untagged particles * 'p_O4' : order 4 method, corrected to allow large CFL number, untagged particles -* 'p_L2' : limited and corrected lambda 2 -* 'p_M4' : Lambda_2,1 (=M'4) 4 point formula -* 'p_M6' (default) : Lambda_4,2 (=M'6) 6 point formula -* 'p_M8' : M8prime formula -* 'p_44' : Lambda_4,4 formula -* 'p_64' : Lambda_6,4 formula -* 'p_66' : Lambda_6,6 formula -* 'p_84' : Lambda_8,4 formula +* 'p_L2' : limited and corrected :math:`\Lambda_2` +* 'p_M4' : :math:`\Lambda_{2,1} (=M'_4)` 4 point formula +* 'p_M6' (default) : :math:`\Lambda_{4,2} (=M'_6)` 6 point formula +* 'p_M8' : :math:`M8prime` formula +* 'p_44' : :math:`\Lambda_{4,4}` formula +* 'p_64' : :math:`\Lambda_{6,4}` formula +* 'p_66' : :math:`\Lambda_{6,6}` formula +* 'p_84' : :math:`\Lambda_{8,4}` formula + +Time integration: +^^^^^^^^^^^^^^^^^ + +* Runge-Kutta 2nd order Splitting @@ -44,7 +56,7 @@ Splitting Computations are performed with a dimensional splitting as follows: * 'strang' (2nd order): - + * X-dir, half time step * Y-dir, half time step * Z-dir, full time step @@ -52,6 +64,36 @@ Computations are performed with a dimensional splitting as follows: * X-dir, half time step * 'classic' (1st order): + * X-dir, full time step * Y-dir, full time step * Z-dir, full time step + + +HySoP (Multi-CPU an Multi-GPU) : +-------------------------------- + +* 1D, 2D or 3D advection +* Pure python code +* Generated OpenCL code +* Ghosts layers are computed from a maximum CFL number + + +Available solvers: +^^^^^^^^^^^^^^^^^^ + +* All :math:`\Lambda_{p,q}` kernels are computed + +Time integration: +^^^^^^^^^^^^^^^^^ + +Explicit time intergration solvers: + +* Euler +* Runge-Kutta (orders 1, 2, 3, 4, 4_38) + + +Splitting +^^^^^^^^^ + +Splitting is handled as a higer level from HySoP :class:`~hysop.numerics.splitting.directional_splitting.DirectionalSplitting` operators. diff --git a/hysop/backend/device/opencl/operator/directional/advection_dir.py b/hysop/backend/device/opencl/operator/directional/advection_dir.py index 286098128..9ef122f55 100644 --- a/hysop/backend/device/opencl/operator/directional/advection_dir.py +++ b/hysop/backend/device/opencl/operator/directional/advection_dir.py @@ -95,7 +95,7 @@ class OpenClDirectionalAdvection(DirectionalAdvectionBase, OpenClDirectionalOper kwds = {} kwds['velocity'] = self.dvelocity kwds['position'] = self.dposition - kwds['is_multiscale'] = self.is_multiscale + kwds['is_bilevel'] = self.is_bilevel kwds['direction'] = self.splitting_direction kwds['velocity_cfl'] = self.velocity_cfl diff --git a/hysop/operator/advection.py b/hysop/operator/advection.py index a09ddf54d..3da7f10ad 100644 --- a/hysop/operator/advection.py +++ b/hysop/operator/advection.py @@ -16,6 +16,45 @@ class Advection(ComputationalGraphNodeFrontend): """ Interface the Scales fortran advection solver. Available implementations are: Fortran + + Available remeshing formulas: + + * 'p_O2' : order 4 method, corrected to allow large CFL number, + untagged particles + * 'p_O4' : order 4 method, corrected to allow large CFL number, + untagged particles + * 'p_L2' : limited and corrected lambda 2 + * 'p_M4' : Lambda_2,1 (=M'4) 4 point formula + * 'p_M6' (default) : Lambda_4,2 (=M'6) 6 point formula + * 'p_M8' : M8prime formula + * 'p_44' : Lambda_4,4 formula + * 'p_64' : Lambda_6,4 formula + * 'p_66' : Lambda_6,6 formula + * 'p_84' : Lambda_8,4 formula + + Time integration: + + * Runge-Kutta 2nd order + + Splitting: + + Computations are performed with a dimensional splitting as follows: + + * 'strang' (2nd order): + + * X-dir, half time step + * Y-dir, half time step + * Z-dir, full time step + * Y-dir, half time step + * X-dir, half time step + + * 'classic' (1st order): + + * X-dir, full time step + * Y-dir, full time step + * Z-dir, full time step + + """ @classmethod -- GitLab