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