Report Typos and Errors    
Semi-Lagrangian Library
Modular library for kinetic and gyrokinetic simulations of plasmas in fusion energy devices.
sll_m_map_function.F90
Go to the documentation of this file.
2 
3 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4  use sll_m_cartesian_meshes, only: &
6 
9 
10  implicit none
11 
12  public :: &
13  sll_s_map, &
15 
16  private
17 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
18 
20 
21 contains
22 
23  subroutine sll_s_set_map_function(mytau)
24  class(sll_c_coordinate_transformation_2d_base), target :: mytau
25 
26  tau => mytau
27 
28  end subroutine sll_s_set_map_function
29 
30  ! fonction qui envoie le carré [0,1]x[0,1] sur le vrai domaine de calcul
31  ! variables de référence: (u,v)
32  ! variables physiques: (x,y)
33  ! autres données calculées:
34  ! jac, invjac, det: jacobienne, son inverse et déterminant de la jacobienne
35  ! subroutine sll_s_map(u,v,x,y,jac,invjac,det)
36  ! pour l'instant on n'utilise pas la jacobienne
37  subroutine sll_s_map(u, v, x, y)
38  implicit none
39  real(8), intent(in) :: u, v
40  real(8), intent(out) :: x, y
41  real(8) :: eta1, eta2
42 
43  !x=(1+u)*(1+v)*cos(pi*v)
44  !y=(1+u)*sin(pi*v)
45  associate(mesh => tau%mesh)
46 
47  eta1 = mesh%eta1_min + u*(mesh%eta1_max - mesh%eta1_min)
48  eta2 = mesh%eta2_min + v*(mesh%eta2_max - mesh%eta2_min)
49  x = tau%x1(eta1, eta2)
50  y = tau%x2(eta1, eta2)
51 
52  end associate
53 
54  end subroutine sll_s_map
55 
56 end module sll_m_map_function
57 
Cartesian mesh basic types.
Abstract class for coordinate transformations.
class(sll_c_coordinate_transformation_2d_base), pointer tau
subroutine, public sll_s_set_map_function(mytau)
subroutine, public sll_s_map(u, v, x, y)
    Report Typos and Errors