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

Functions

void negative_gradparx2 (const Grid< DeviceType > &grid, const GradParXTmp &gpxt, const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &input, const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &output, Order derivative_order)
 

Function Documentation

void negative_gradparx2 ( const Grid< DeviceType > &  grid,
const GradParXTmp gpxt,
const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &  input,
const Kokkos::View< double **, Kokkos::LayoutRight, DeviceType > &  output,
Order  derivative_order 
)

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
[in]derivative_orderis which derivative to take
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function: