8 #include "sll_assert.h"
9 #include "sll_memory.h"
10 #include "sll_working_precision.h"
22 sll_real64,
intent(in) :: eta1
23 sll_real64,
intent(in) :: eta2
24 sll_real,
dimension(:),
intent(in) :: params
38 sll_real64,
dimension(:),
pointer :: params
66 function get_x1( self, eta1, eta2 )
result(x1)
68 sll_real64,
intent(in) :: eta1
69 sll_real64,
intent(in) :: eta2
72 x1=self%x1_func(eta1,eta2,self%params)
76 function get_x2( self, eta1, eta2 )
result(x2)
78 sll_real64,
intent(in) :: eta1
79 sll_real64,
intent(in) :: eta2
81 x2=self%x2_func(eta1,eta2,self%params)
85 function get_x( self, eta1, eta2 )
result(x)
87 sll_real64,
intent(in) :: eta1
88 sll_real64,
intent(in) :: eta2
90 x(1)=self%x1_func(eta1,eta2,self%params)
91 x(2)=self%x2_func(eta1,eta2,self%params)
98 sll_real64,
intent(in) :: eta1
99 sll_real64,
intent(in) :: eta2
101 x=self%j_matrix(1,1)%f(eta1,eta2,self%params)*&
102 self%j_matrix(2,2)%f(eta1,eta2,self%params)-&
103 self%j_matrix(1,2)%f(eta1,eta2,self%params)*&
104 self%j_matrix(2,1)%f(eta1,eta2,self%params)
111 sll_real64,
intent(in) :: eta1
112 sll_real64,
intent(in) :: eta2
115 y(1,1)=self%j_matrix(1,1)%f(eta1,eta2,self%params)
116 y(1,2)=self%j_matrix(1,2)%f(eta1,eta2,self%params)
117 y(2,1)=self%j_matrix(2,1)%f(eta1,eta2,self%params)
118 y(2,2)=self%j_matrix(2,2)%f(eta1,eta2,self%params)
123 sll_real64,
intent(in) :: eta1
124 sll_real64,
intent(in) :: eta2
127 y(1,1)=self%j_matrix(2,2)%f(eta1,eta2,self%params)
128 y(1,2)=-self%j_matrix(1,2)%f(eta1,eta2,self%params)
129 y(2,1)=-self%j_matrix(2,1)%f(eta1,eta2,self%params)
130 y(2,2)=self%j_matrix(1,1)%f(eta1,eta2,self%params)
131 y=y/self%jacobian(eta1, eta2)
136 sll_real64,
intent(in) :: eta1
137 sll_real64,
intent(in) :: eta2
140 y(1,1)=self%j_matrix(2,2)%f(eta1,eta2,self%params)
141 y(1,2)=-self%j_matrix(2,1)%f(eta1,eta2,self%params)
142 y(2,1)=-self%j_matrix(1,2)%f(eta1,eta2,self%params)
143 y(2,2)=self%j_matrix(1,1)%f(eta1,eta2,self%params)
144 y=y/self%jacobian(eta1, eta2)
147 function metric(self, eta1, eta2)
result(g)
149 sll_real64,
intent(in) :: eta1
150 sll_real64,
intent(in) :: eta2
153 y=self%jacobian_matrix(eta1, eta2)
154 g(1,1)=y(1,1)**2+y(2,1)**2
155 g(1,2)=y(1,1)*y(1,2)+y(2,1)*y(2,2)
157 g(2,2)=y(1,2)**2+y(2,2)**2
163 sll_real64,
intent(in) :: eta1
164 sll_real64,
intent(in) :: eta2
167 y=self%jacobian_matrix_inverse_transposed(eta1, eta2)
168 g(1,1)=y(1,1)**2+y(2,1)**2
169 g(1,2)=y(1,1)*y(1,2)+y(2,1)*y(2,2)
171 g(2,2)=y(1,2)**2+y(2,2)**2
175 subroutine init(self,j11,j12,j21,j22,x1_func,x2_func,params)
183 sll_real64,
dimension(:),
intent(in) :: params
187 sll_allocate(self%j_matrix(2,2), ierr)
188 sll_allocate(self%params(
size(params)),ierr)
189 self%x1_func => x1_func
190 self%x2_func => x2_func
191 self%j_matrix(1,1)%f=>j11
192 self%j_matrix(1,2)%f=>j12
193 self%j_matrix(2,1)%f=>j21
194 self%j_matrix(2,2)%f=>j22
200 DEALLOCATE(self%j_matrix)
201 DEALLOCATE(self%params)
real(kind=f64) function, dimension(2, 2) jacobian_matrix_inverse(self, eta1, eta2)
real(kind=f64) function jacobian(self, eta1, eta2)
real(kind=f64) function, dimension(2, 2) jacobian_matrix_inverse_transposed(self, eta1, eta2)
real(kind=f64) function, dimension(2, 2) jacobian_matrix(self, eta1, eta2)
real(kind=f64) function get_x1(self, eta1, eta2)
subroutine init(self, j11, j12, j21, j22, x1_func, x2_func, params)
real(kind=f64) function, dimension(2, 2) metric(self, eta1, eta2)
real(kind=f64) function, dimension(2) get_x(self, eta1, eta2)
real(kind=f64) function, dimension(2, 2) metric_inverse(self, eta1, eta2)
real(kind=f64) function get_x2(self, eta1, eta2)
Module to select the kind parameter.