Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
sll_m_wedge_product_generaldim.F90
Go to the documentation of this file.
1 !**************************************************************
2 ! Author: Jakob Ameres, jakob.ameres@tum.de
3 !**************************************************************
4 !This module should provide the wedge product for arbitrary dimensions
5 !such that it is possible to define Vlasov equation with a kind of
6 !v x B term for any dimension
8 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9 #include "sll_memory.h"
10 #include "sll_working_precision.h"
11 
12  implicit none
13 
14  public :: &
17 
18  private
19 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
20 
21 contains
22 
23 !This is just an arbitrary definition
24  pure function sll_f_cross_product_2d(v, w) result(cross)
25 
26  sll_real64, dimension(:, :), intent(in) :: v, w
27  sll_real64, dimension(2, size(v, 2)) :: cross
28  sll_real64, dimension(size(v, 2)) :: determinante
29 
30  determinante(:) = v(1, :)*w(2, :) - v(2, :)*w(1, :)
31  cross(1, :) = v(1, :)*determinante
32  cross(2, :) = v(2, :)*determinante
33 
34  end function
35 
36  pure function sll_f_cross_product_3d(v, w) result(cross)
37 
38  sll_real64, dimension(:, :), intent(in) :: v, w
39  sll_real64, dimension(3, size(v, 2)) :: cross
40 
41  cross(1, :) = v(2, :)*w(3, :) - v(3, :)*w(2, :)
42  cross(2, :) = v(3, :)*w(1, :) - v(1, :)*w(3, :)
43  cross(3, :) = v(1, :)*w(2, :) - v(2, :)*w(1, :)
44 
45  end function
46 
47 end module
pure real(kind=f64) function, dimension(2, size(v, 2)), public sll_f_cross_product_2d(v, w)
pure real(kind=f64) function, dimension(3, size(v, 2)), public sll_f_cross_product_3d(v, w)
    Report Typos and Errors