XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Functions
gradparx2.cpp File Reference
#include "globals.hpp"
#include "gradparx2.hpp"
Include dependency graph for gradparx2.cpp:

Classes

class  Boundary
 

Functions

void negative_gradparx2 (const Grid< DeviceType > &grid, int nseg, double sml_bt_sign, int *tr_fort, double *p_fort, double *dx_fort, rtype *bd_fort, const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &input, const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &output)
 

Function Documentation

void negative_gradparx2 ( const Grid< DeviceType > &  grid,
int  nseg,
double  sml_bt_sign,
int *  tr_fort,
double *  p_fort,
double *  dx_fort,
rtype bd_fort,
const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &  input,
const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &  output 
)

Calculates the gradient of the input array. Includes a precomputation to check which nodes are inside the boundary provided. This could be done once in grid setup and stored. This code is called from Fortran and is self-contained. Thus, everything needed is passed from Fortran to C++ even though grid information is already in the C++ grid object. It will eventually be refactored accordingly.

Parameters
[in]gridis the grid object
[in]nsegis the number of boundary segments(?)
[in]sml_bt_signis the user-input direction of the toroidal magnetic field
[in]tr_fortis an array of the triangles the corresponding to the field-following path through the vertex
[in]p_fortis an array of the weights of the three triangle vertices for tr_fort triangles
[in]dx_fortis an array of distances
[in]bd_fortis an array of the boundary segments
[in]inputis the potential
[out]outputis the gradient of the potential
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function: