XGCa
#include "globals.hpp"
#include "gradparx2.hpp"

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] grid is the grid object [in] nseg is the number of boundary segments(?) [in] sml_bt_sign is the user-input direction of the toroidal magnetic field [in] tr_fort is an array of the triangles the corresponding to the field-following path through the vertex [in] p_fort is an array of the weights of the three triangle vertices for tr_fort triangles [in] dx_fort is an array of distances [in] bd_fort is an array of the boundary segments [in] input is the potential [out] output is the gradient of the potential
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function: