XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
get_potential_grad.hpp
Go to the documentation of this file.
1 #ifndef GET_POTENTIAL_GRAD
2 #define GET_POTENTIAL_GRAD
3 
4 #include "sml.hpp"
5 #include "grid.hpp"
7 #include "magnetic_field.hpp"
8 #include "my_mirror_view.hpp"
9 #include "gradparx2.hpp"
11 #include "gradient_matrices.hpp"
12 #include "gyro_avg_mat.hpp"
13 #include "task_group.hpp"
14 #include "grid_field.hpp"
15 #include "grid_deriv.hpp"
16 #include "em_field_filter.hpp"
17 #include "smoothing.hpp"
18 
19 // Fortran routines
20 
21 extern "C" void get_pot_epar_em_filter(double* tmp, double* E_para_em, double* spitzer_res, int* bndry);
22 
23 template<class Device>
25  View<double**,CLayout,Device> field;
26 
27  public:
28 
29  AlternatingStorage(const std::string& name, int nnode)
30  : field(NoInit(name), 2, nnode)
31  {}
32 
33  // Functions to access the "alternating" Views
34  View<double*,CLayout, Device> left(int i_plane){
35  int i_left_alt = i_plane%2;
36  return my_subview(field,i_left_alt);
37  }
38 
39  View<double*,CLayout, Device> right(int i_plane){
40  int i_right_alt = (i_plane+1)%2;
41  return my_subview(field,i_right_alt);
42  }
43 };
44 
45 template<class Device, class DeviceOut>
47 
48  int nnode;
49  int nrho;
50  int nphi;
51  int ndim;
52 
53  View<double**,CLayout,Device> input_potential;
57  View<double**,CLayout,Device> potential;
58  View<double***,CLayout, Device> gradient;
59  View<double****,CLayout, Device> gradient_rho;
60  View<double***,CLayout, Device> potential_rho;
61 
62  View<double*,CLayout,Device> scratch;
63 
64  // Additional objects that should go elsewhere eventually, but are here
65  // because they are needed for get_pot_grad and can be reused for the different fields
70 
71  GetPotentialGradTemp(const Simulation<DeviceType>& sml, const Grid<DeviceType>& grid, const DomainDecomposition<DeviceType>& pol_decomp, const MagneticField<DeviceType>& magnetic_field, const Boundary& boundary, int n_input_potential_planes, bool gradient_requested, bool gyroavg_requested, const GyroAverageMatrices<DeviceType>& gyro_avg_matrices_in = GyroAverageMatrices<DeviceType>())
72  : nnode(grid.nnode),
73  nrho(gyroavg_requested ? gyro_avg_matrices_in.nrho : 0),
74  nphi((PIT_GLOBAL==PhiInterpType::Planes) ? 2 : 1),
76  potential_alt("potential_alt", nnode),
77  gradient_r_alt("gradient_r_alt", gradient_requested ? nnode : 0),
78  gradient_z_alt("gradient_r_alt", gradient_requested ? nnode : 0),
79  potential(NoInit("potential"), nphi, nnode),
80  gradient(NoInit("gradient"), ndim, nphi, gradient_requested ? nnode : 0),
81  potential_rho(NoInit("potential_rho"), nrho+1, nphi, nnode),
82  gradient_rho(NoInit("gradient_rho"), nrho+1, nphi, gradient_requested ? nnode : 0, ndim),
83  gyro_avg_matrices(gyro_avg_matrices_in) // Send gyromatrices to GPU
84  {
85  // Use scratch for transpose on device if the fields can't be written directly
86  if(!std::is_same<DeviceOut,Device>()){
87  scratch = View<double*,CLayout,Device>(NoInit("scratch"), gradient_requested ? gradient_rho.size() : potential_rho.size() );
88  input_potential = View<double**,CLayout,Device>(NoInit("input_potential"), n_input_potential_planes, nnode);
89  }
90 
91  GPTLstart("GET_POT_GRAD_MAT_SETUP");
92  if(gradient_requested){
93 #ifdef NO_FORTRAN_MODULES
94  grad_matrices = grid.gradient_matrices_h.template mirror<DeviceType>();
95 #else
96  grad_matrices = GradientMatrices<DeviceType>(true); // Copy in fortran data
97 #endif
98  }
99  GPTLstop("GET_POT_GRAD_MAT_SETUP");
100 
101  // This could be set up only once (if it doesnt take up too much device memory)
102  GPTLstart("GET_POT_GRAD_FF_SETUP");
104  GPTLstop("GET_POT_GRAD_FF_SETUP");
105 
106  // Set up for parallel gradient
107  GPTLstart("GET_POT_GRAD_GPTX_SETUP");
108  if(gradient_requested && !sml.is_XGCa){
109  gptx = GradParXTmp(grid, boundary, magnetic_field.bt_sign);
110  }
111  GPTLstop("GET_POT_GRAD_GPTX_SETUP");
112  }
113 };
114 
115 template<class Device>
116 struct Field00{
119 
120  View<Field<VarType::Scalar,PhiInterpType::None>*,CLayout, Device> pot_managed; // Use if device != host
121  View<double*,CLayout, Device, Kokkos::MemoryTraits<Kokkos::Unmanaged>> pot;
122  View<double*,CLayout, Device> r;
123  View<double*,CLayout, Device> z;
124 
126  : is_provided(false)
127  {}
128 
129  template<class DeviceIn>
131  : r(NoInit("r"), field_in.f.extent(0)),
132  z(NoInit("z"), field_in.f.extent(0)),
133  is_provided(true),
134  discard_when_basis_is_one(discard_when_basis_is_one_in)
135  {
136  // Create a mirror if Device is different from the input DeviceIn
137  pot_managed = my_mirror_view(field_in.f, Device());
138  mirror_copy(pot_managed, field_in.f);
139  pot = View<double*,CLayout,Device, Kokkos::MemoryTraits<Kokkos::Unmanaged>>((double*)(pot_managed.data()), pot_managed.layout());
140  }
141 
142  void calculate_gradient(const Grid<DeviceType>& grid, const GradientMatrices<DeviceType>& grad_matrices){
143  grid_deriv(grad_matrices, grid,pot,r,z, discard_when_basis_is_one);
144 
145  auto r_tmp = r; // Use these to avoid using member function in kernel
146  auto z_tmp = z; // Use these to avoid using member function in kernel
147 
148  // rh This is general now --->
149  // We compute the electric field --> flip sign
150  // E=-E
151  Kokkos::parallel_for("get_pot_grad_flip_00", Kokkos::RangePolicy<ExSpace>(0,grid.nnode), KOKKOS_LAMBDA( const int i ){
152  r_tmp(i)=-r_tmp(i);
153  z_tmp(i)=-z_tmp(i);
154  });
155  }
156 
157  template<class DeviceOut, PhiInterpType PIT>
158  void set_field(const Grid<DeviceType>& grid, const FieldFollowingCoordinates& ff, View<Field<VarType::Vector2D,PIT>*,CLayout,DeviceOut>& field00_ff_h){
159  if (is_provided){
160  // Copy to two planes if field following is needed
161  int nphi = (PIT==PhiInterpType::Planes) ? 2 : 1;
162  View<double**,CLayout, Device> r_tmp(NoInit("r_tmp"), nphi, r.size());
163  View<double**,CLayout, Device> z_tmp(NoInit("z_tmp"), nphi, z.size());
164 
165  for(int iphi=0; iphi<nphi; iphi++){
166  Kokkos::deep_copy(my_subview(r_tmp, iphi), r);
167  Kokkos::deep_copy(my_subview(z_tmp, iphi), z);
168  }
169 
170  if(PIT==PhiInterpType::Planes){
171  ff.cnvt_grid_real2ff(grid,r_tmp);
172  ff.cnvt_grid_real2ff(grid,z_tmp);
173  }
174 
175  auto field00_ff = my_mirror_view(field00_ff_h, Device());
176  for(int iphi=0; iphi<nphi; iphi++){
177  Kokkos::parallel_for("set_field", Kokkos::RangePolicy<ExSpace>(0,field00_ff_h.extent(0)), KOKKOS_LAMBDA( const int i ){
178 #ifdef XGC1
179  field00_ff(i).V[iphi][0]=r_tmp(iphi,i);
180  field00_ff(i).V[iphi][1]=z_tmp(iphi,i);
181 #else
182  field00_ff(i).E[0]=r_tmp(iphi,i);
183  field00_ff(i).E[1]=z_tmp(iphi,i);
184 #endif
185  });
186  }
187  Kokkos::fence();
188  // Copy if not a mirror
189  mirror_copy(field00_ff_h, field00_ff);
190  }else{
191  Kokkos::parallel_for("set_field", Kokkos::RangePolicy<typename DeviceOut::execution_space>(0,field00_ff_h.extent(0)), KOKKOS_LAMBDA( const int i ){
192 #ifdef XGC1
193  field00_ff_h(i).V[0][0]=0.0;
194  field00_ff_h(i).V[0][1]=0.0;
195  field00_ff_h(i).V[1][0]=0.0;
196  field00_ff_h(i).V[1][1]=0.0;
197 #else
198  field00_ff_h(i).E[0]=0.0;
199  field00_ff_h(i).E[1]=0.0;
200 #endif
201  });
202  }
203  }
204 };
205 
206 template<class Device, class DeviceOut>
207 struct EMParField{
208  bool requested;
209 
210  View<double**,CLayout, Device> field;
211  View<double***,CLayout, Device> field_rho;
212 
214  View<double*,CLayout, HostType> spitzer_resistivity;
216 
218 
220  : requested(false)
221  {}
222 
223  void request(const GridField<DeviceOut,VarType::Scalar,PhiInterpType::Planes,TorType::OnePlane,KinType::GyroKin>& output_field, double em_pullback_dampfac_in, const View<double*,CLayout, HostType>& spitzer_resistivity_in, const Boundary& boundary, bool gyroaverage_requested){
224  requested = true;
225  field_out = output_field;
226  int nrhop1 = gyroaverage_requested ? field_out.f.extent(1) : 1;
227 #ifndef MULTI_RATE
228  if(!gyroaverage_requested) exit_XGC("\nError: EMParField gyroaverage_requested=false is only supported for multirate at the moment.\n");
229 #endif
230  field_rho = View<double***,CLayout, Device>(NoInit("E_para_em_rho"), nrhop1, 2, field_out.f.extent(0));
231  field = View<double**,CLayout, Device>(NoInit("E_para_em"), 2, field_out.f.extent(0));
232  em_pullback_dampfac = em_pullback_dampfac_in;
233  spitzer_resistivity = spitzer_resistivity_in;
234  filter_bndry = boundary;
235  }
236 
237  void calculate(const Simulation<DeviceType>& sml, const MagneticField<DeviceType>& magnetic_field, const Grid<DeviceType>& grid, const DomainDecomposition<DeviceType>& pol_decomp, Smoothing& smoothing, const View<double**,CLayout, Device>& field_para){
238  // Obtain E_para with the same filters that are applied in push_As
239  // This filtered E_para must be used in the equation of motion
240  // for dA_s/dt in case of pullback-mode 4.
241  GPTLstart("GET_POT_EPAR_EM");
242  // tmp_copy gets copied in and modified internally
243  View<double**,CLayout, HostType> tmp_copy(NoInit("tmp"),2,grid.nnode);
244  Kokkos::deep_copy(tmp_copy, field_para);
245 
246  // Output:
247  auto field_h = my_mirror_view(field, HostType());
248 
249  auto is_inside = filter_bndry.get_view_int_not_in_list<HostType>(grid.nnode);
250  get_pot_epar_em_filter(tmp_copy.data(), field_h.data(), spitzer_resistivity.data(), is_inside.data());
251 
252  // Filter
253  for(int iphi=0; iphi<2; iphi++){
254  bool filt_on = false;
255  em_field_filter(sml, magnetic_field, grid, pol_decomp, smoothing, my_subview(tmp_copy, iphi), my_subview(field_h, iphi), filt_on, filter_bndry, filter_bndry);
256  }
257 
258  // Copy result of get_pot_epar_em_filter back to device
259  mirror_copy(field, field_h);
260 
261  // Damp
262  auto field_k = field; // To copy class member into kernel
263  auto em_pullback_dampfac_k = em_pullback_dampfac;
264  for(int iphi=0; iphi<2; iphi++){
265  Kokkos::parallel_for("epara_damp", Kokkos::RangePolicy<ExSpace>(0,grid.nnode), KOKKOS_LAMBDA( const int inode ){
266  field_k(iphi, inode) *= em_pullback_dampfac_k;
267  });
268  }
269  Kokkos::fence();
270 
271  GPTLstop("GET_POT_EPAR_EM");
272  }
273 };
274 
275 template<class DeviceIn, class DeviceOut, VarType VT, PhiInterpType PIT, TorType TT, KinType KT>
277  View<double**,CLayout,DeviceIn, Kokkos::MemoryTraits<Kokkos::Unmanaged>> input_potential;
285 
286  // Constructor if passed an unmanaged view
287  GetPotGradFieldArgs(const View<double**,CLayout,DeviceIn, Kokkos::MemoryTraits<Kokkos::Unmanaged>>& input_potential_in, bool ignore_poloidal_dpot_in=false)
288  : input_potential(input_potential_in),
289  ignore_poloidal_dpot(ignore_poloidal_dpot_in),
290  potential_is_requested(false),
291  gradient_is_requested(false)
292  {}
293 
294  // Constructor if passed a 1D managed view
295  GetPotGradFieldArgs(const View<double*,CLayout,DeviceIn>& input_potential_in, bool ignore_poloidal_dpot_in=false)
296  : input_potential(View<double**,CLayout,DeviceIn,Kokkos::MemoryTraits<Kokkos::Unmanaged>>((double*)(input_potential_in.data()), 1, input_potential_in.extent(0))),
297  ignore_poloidal_dpot(ignore_poloidal_dpot_in),
298  potential_is_requested(false),
299  gradient_is_requested(false)
300  {}
301 
303  potential = potential_in;
304  potential_is_requested = true;
305  }
306 
308  gradient = gradient_in;
309  gradient_is_requested = true;
310  }
311 
312  void request_para_em(const GridField<DeviceOut,VarType::Scalar,PhiInterpType::Planes,TorType::OnePlane,KinType::GyroKin>& output_field, double em_pullback_dampfac_in, const View<double*, CLayout, HostType>& spitzer_resistivity, const Boundary& boundary, bool gyroaverage_requested){
313  E_para_em.request(output_field, em_pullback_dampfac_in, spitzer_resistivity, boundary, gyroaverage_requested);
314  }
315 };
316 
318 
319 template<class DeviceIn, class DeviceOut, VarType VT, PhiInterpType PIT, TorType TT, KinType KT>
320 void get_field_grad(const Simulation<DeviceType>& sml, const Grid<DeviceType>& grid,
321  const DomainDecomposition<DeviceType>& pol_decomp,
323  Smoothing& smoothing,
326 
327 #endif
VarType
Definition: field.hpp:11
AlternatingStorage(const std::string &name, int nnode)
Definition: get_potential_grad.hpp:29
View< double **, CLayout, Device > input_potential
Definition: get_potential_grad.hpp:53
Definition: field_following_coordinates.hpp:9
static int GPTLstart(const char *name)
Definition: timer_macro.hpp:9
int nrho
Definition: get_potential_grad.hpp:49
View< double *, CLayout, Device > left(int i_plane)
Definition: get_potential_grad.hpp:34
constexpr VarType vec2d_if_axisym()
View< double *, CLayout, Device > scratch
Definition: get_potential_grad.hpp:62
int ndim
Definition: get_potential_grad.hpp:51
View< Field< VarType::Scalar, PhiInterpType::None > *, CLayout, Device > pot_managed
Definition: get_potential_grad.hpp:120
void mirror_copy(T1 &view_dest, const T2 &view_src)
Definition: my_mirror_view.hpp:122
bool ignore_poloidal_dpot
Definition: get_potential_grad.hpp:280
bool is_provided
Definition: get_potential_grad.hpp:117
Field00()
Definition: get_potential_grad.hpp:125
Definition: sml.hpp:8
void request_para_em(const GridField< DeviceOut, VarType::Scalar, PhiInterpType::Planes, TorType::OnePlane, KinType::GyroKin > &output_field, double em_pullback_dampfac_in, const View< double *, CLayout, HostType > &spitzer_resistivity, const Boundary &boundary, bool gyroaverage_requested)
Definition: get_potential_grad.hpp:312
static constexpr bool is_XGCa
Equivalent to the preprocessor flag for now.
Definition: sml.hpp:17
Kokkos::Device< HostExSpace, HostMemSpace > HostType
Definition: space_settings.hpp:57
FieldFollowingCoordinates ff
Definition: get_potential_grad.hpp:68
View< double **, CLayout, Device > potential
Definition: get_potential_grad.hpp:57
int nphi
Definition: get_potential_grad.hpp:50
Definition: magnetic_field.hpp:12
Definition: get_potential_grad.hpp:276
void cnvt_grid_real2ff(const Grid< DeviceType > &grid, const View< double **, CLayout, DeviceType > &input, const View< double **, Kokkos::LayoutRight, DeviceType > &output) const
Definition: field_following_coordinates.hpp:142
bool discard_when_basis_is_one
Definition: get_potential_grad.hpp:118
void get_field_grad(const Simulation< DeviceType > &sml, const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, const MagneticField< DeviceType > &magnetic_field, Smoothing &smoothing, GetPotGradFieldArgs< DeviceIn, DeviceOut, VT, PIT, TT, KT > &args, GetPotentialGradTemp< DeviceType, DeviceOut > &tmp)
Definition: get_potential_grad.cpp:395
Definition: gradparx2.hpp:8
void em_field_filter(const Simulation< DeviceType > &sml, const MagneticField< DeviceType > &magnetic_field, const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, Smoothing &smoothing, const View< double *, CLayout, HostType > &input, const View< double *, CLayout, HostType > &output, bool filt_on, const Boundary &bd_turb, const Boundary &bd_hyp_visc)
Definition: em_field_filter.cpp:46
Definition: get_potential_grad.hpp:116
Boundary filter_bndry
Definition: get_potential_grad.hpp:215
Kokkos::LayoutRight CLayout
Definition: space_settings.hpp:68
EMParField< DeviceType, DeviceOut > E_para_em
Definition: get_potential_grad.hpp:284
GradientMatrices< DeviceType > grad_matrices
Definition: get_potential_grad.hpp:67
GridField< DeviceOut, VT, PIT, TT, KT > gradient
Definition: get_potential_grad.hpp:278
bool potential_is_requested
Definition: get_potential_grad.hpp:281
Projection< HostType > half_plane_ff
Definition: grid.hpp:179
Definition: grid_field.hpp:22
View< double *, CLayout, Device, Kokkos::MemoryTraits< Kokkos::Unmanaged > > pot
Definition: get_potential_grad.hpp:121
AlternatingStorage< Device > gradient_z_alt
Definition: get_potential_grad.hpp:56
bool gradient_is_requested
Definition: get_potential_grad.hpp:282
Definition: boundary.hpp:85
View< double **, CLayout, DeviceIn, Kokkos::MemoryTraits< Kokkos::Unmanaged > > input_potential
Definition: get_potential_grad.hpp:277
View< double ***, CLayout, Device > gradient
Definition: get_potential_grad.hpp:58
PhiInterpType
Definition: globals.hpp:95
View< double ***, CLayout, Device > potential_rho
Definition: get_potential_grad.hpp:60
View< double *, CLayout, Device > right(int i_plane)
Definition: get_potential_grad.hpp:39
subroutine grid_deriv(grid, qty, qty_deriv_x, qty_deriv_y, psi_only)
Definition: search.F90:2895
constexpr PhiInterpType PIT_GLOBAL
Definition: globals.hpp:105
AlternatingStorage< Device > gradient_r_alt
Definition: get_potential_grad.hpp:55
double bt_sign
Whether toroidal field is reversed?
Definition: magnetic_field.hpp:39
Definition: smoothing.hpp:8
View< double ***, CLayout, Device > field_rho
Definition: get_potential_grad.hpp:211
Field00< DeviceType > field00
Definition: get_potential_grad.hpp:283
GetPotGradFieldArgs(const View< double *, CLayout, DeviceIn > &input_potential_in, bool ignore_poloidal_dpot_in=false)
Definition: get_potential_grad.hpp:295
EMParField()
Definition: get_potential_grad.hpp:219
void request_potential(const GridField< DeviceOut, VarType::Scalar, PIT, TT, KT > &potential_in)
Definition: get_potential_grad.hpp:302
View< int *, CLayout, Device > get_view_int_not_in_list(int nnode_in) const
Definition: vertex_list.hpp:185
GyroAverageMatrices< DeviceType > gyro_avg_matrices
Definition: get_potential_grad.hpp:66
View< double *, CLayout, Device > z
Definition: get_potential_grad.hpp:123
Field00(const GridField< DeviceIn, VarType::Scalar, PhiInterpType::None, TorType::OnePlane, KinType::DriftKin > &field_in, bool discard_when_basis_is_one_in)
Definition: get_potential_grad.hpp:130
int nnode
Definition: get_potential_grad.hpp:48
Definition: field.hpp:45
double em_pullback_dampfac
Definition: get_potential_grad.hpp:213
Definition: get_potential_grad.hpp:207
View< T *, CLayout, Device > my_mirror_view(const View< T *, CLayout, Device > &view, Device nd)
Definition: my_mirror_view.hpp:14
void exit_XGC(std::string msg)
Definition: globals.hpp:37
GridField< DeviceOut, VarType::Scalar, PhiInterpType::Planes, TorType::OnePlane, KinType::GyroKin > field_out
Definition: get_potential_grad.hpp:217
Kokkos::View< T *, Kokkos::LayoutRight, Device > my_subview(const Kokkos::View< T ****, Kokkos::LayoutRight, Device > &view, int i, int j, int k)
Definition: my_subview.hpp:8
Definition: magnetic_field.F90:1
void request(const GridField< DeviceOut, VarType::Scalar, PhiInterpType::Planes, TorType::OnePlane, KinType::GyroKin > &output_field, double em_pullback_dampfac_in, const View< double *, CLayout, HostType > &spitzer_resistivity_in, const Boundary &boundary, bool gyroaverage_requested)
Definition: get_potential_grad.hpp:223
GridField< DeviceOut, VarType::Scalar, PIT, TT, KT > potential
Definition: get_potential_grad.hpp:279
Definition: get_potential_grad.hpp:24
AlternatingStorage< Device > potential_alt
Definition: get_potential_grad.hpp:54
void get_pot_epar_em_filter(double *tmp, double *E_para_em, double *spitzer_res, int *bndry)
void request_gradient(const GridField< DeviceOut, VT, PIT, TT, KT > &gradient_in)
Definition: get_potential_grad.hpp:307
void get_field_Ah_cv_ff(const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, const GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::MultiplePlanes, KinType::DriftKin > &Ah_cv_h, const GridField< HostType, VarType::Scalar, PhiInterpType::Planes, TorType::OnePlane, KinType::DriftKin > &Ah_cv_ff)
Definition: get_potential_grad.cpp:7
void parallel_for(const std::string name, int n_ptl, Function func, Option option, HostAoSoA aosoa_h, DeviceAoSoA aosoa_d)
Definition: streamed_parallel_for.hpp:252
void calculate_gradient(const Grid< DeviceType > &grid, const GradientMatrices< DeviceType > &grad_matrices)
Definition: get_potential_grad.hpp:142
View< double **, CLayout, Device > field
Definition: get_potential_grad.hpp:210
int nnode
Number of grid nodes.
Definition: grid.hpp:159
GradParXTmp gptx
Definition: get_potential_grad.hpp:69
View< double *, CLayout, Device > r
Definition: get_potential_grad.hpp:122
View< double **, CLayout, Device > field
Definition: get_potential_grad.hpp:25
void set_field(const Grid< DeviceType > &grid, const FieldFollowingCoordinates &ff, View< Field< VarType::Vector2D, PIT > *, CLayout, DeviceOut > &field00_ff_h)
Definition: get_potential_grad.hpp:158
Kokkos::ViewAllocateWithoutInitializing NoInit
Definition: space_settings.hpp:69
bool requested
Definition: get_potential_grad.hpp:208
GetPotGradFieldArgs(const View< double **, CLayout, DeviceIn, Kokkos::MemoryTraits< Kokkos::Unmanaged >> &input_potential_in, bool ignore_poloidal_dpot_in=false)
Definition: get_potential_grad.hpp:287
View< double ****, CLayout, Device > gradient_rho
Definition: get_potential_grad.hpp:59
View< double *, CLayout, HostType > spitzer_resistivity
Definition: get_potential_grad.hpp:214
static int GPTLstop(const char *name)
Definition: timer_macro.hpp:10
void calculate(const Simulation< DeviceType > &sml, const MagneticField< DeviceType > &magnetic_field, const Grid< DeviceType > &grid, const DomainDecomposition< DeviceType > &pol_decomp, Smoothing &smoothing, const View< double **, CLayout, Device > &field_para)
Definition: get_potential_grad.hpp:237
Definition: get_potential_grad.hpp:46