13 double get_analytic_I(
double psi,
double magnitude){
14 return magnitude/(psi+0.1);
17 double get_analytic_dIdpsi(
double psi,
double magnitude){
18 return -magnitude/((psi+0.1)*(psi+0.1));
22 View<double*, HostType> analytic_I_grid(
double magnitude,
const View<double*, HostType>& psi){
23 View<double*, HostType> I_grid(
"I_grid",psi.size());
24 for (
int i=0; i<psi.size(); i++){
25 I_grid(i) = get_analytic_I(psi(i), magnitude);