From 8d5d0a122500fca96c12ad4421caf29044aec80c Mon Sep 17 00:00:00 2001
From: Chloe Mimeau <Chloe.Mimeau@imag.fr>
Date: Wed, 27 Feb 2013 13:40:44 +0000
Subject: [PATCH] add diffusion filter in python interf

---
 HySoP/hysop/f2py/fftw2py.f90 | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/HySoP/hysop/f2py/fftw2py.f90 b/HySoP/hysop/f2py/fftw2py.f90
index 98b885124..8d63c42df 100755
--- a/HySoP/hysop/f2py/fftw2py.f90
+++ b/HySoP/hysop/f2py/fftw2py.f90
@@ -126,7 +126,7 @@ contains
   !> Solve 
   !! \f{eqnarray*} \omega &=& \nabla \times v \\ \frac{\partial \omega}{\partial t} &=& \nu \Delta \omega \f}
   !! velocity and omega being 3D vector fields.
-  subroutine solve_diffusion_3d(nudt,velocity_x,velocity_y,velocity_z,omega_x,omega_y,omega_z)
+  subroutine solve_curl_diffusion_3d(nudt,velocity_x,velocity_y,velocity_z,omega_x,omega_y,omega_z)
     real(pk), intent(in) :: nudt
     real(pk),dimension(:,:,:),intent(in):: velocity_x,velocity_y,velocity_z
     real(pk),dimension(size(velocity_x,1),size(velocity_y,2),size(velocity_z,3)),intent(out) :: omega_x,omega_y,omega_z
@@ -134,6 +134,22 @@ contains
     
     call r2c_3d(velocity_x,velocity_y,velocity_z)
     
+    call filter_curl_diffusion_3d(nudt)
+    
+    call c2r_3d(omega_x,omega_y,omega_z)
+
+  end subroutine solve_curl_diffusion_3d
+
+  !> Solve 
+  !! \f{eqnarray*} \frac{\partial \omega}{\partial t} &=& \nu \Delta \omega \f}
+  !! omega being 3D vector field.
+  subroutine solve_diffusion_3d(nudt,omega_x,omega_y,omega_z)
+    real(pk), intent(in) :: nudt
+    real(pk),dimension(:,:,:),intent(inout):: omega_x,omega_y,omega_z
+    !f2py intent(in,out) :: omega_x,omega_y,omega_z
+    
+    call r2c_3d(omega_x,omega_y,omega_z)
+    
     call filter_diffusion_3d(nudt)
     
     call c2r_3d(omega_x,omega_y,omega_z)
-- 
GitLab