24 #include <unordered_map> 28 #include <cuda_runtime.h> 50 typedef double (*
fnPtr) (double, double);
90 typedef void (*functionPtrA)(
double*,
double*,
double*,
91 double, double, double,
92 double, double, double,
93 double, double,
double*);
94 typedef void (*functionPtrV)(
double*,
double*,
double*,
double*,
95 double*,
double*,
double*,
double*);
96 typedef void (*functionPtrwfc)(
double*,
double*,
double*,
97 double*, double,
double*, double2*);
98 std::unordered_map<std::string, int> param_int;
99 std::unordered_map<std::string, double> param_double;
100 std::unordered_map<std::string, double*> param_dstar;
101 std::unordered_map<std::string, bool> param_bool;
102 std::unordered_map<std::string, cufftDoubleComplex*> sobel;
103 std::unordered_map<std::string, std::string> param_string;
104 std::unordered_map<std::string, EqnNode_gpu*> param_ast;
105 std::unordered_map<std::string, EqnNode> param_ast_cpu;
109 std::unordered_map<std::string, int> id_list;
124 void store(std::string
id, cufftDoubleComplex* d2param);
127 void store(std::string
id,
int iparam);
130 void store(std::string
id,
double dparam);
133 void store(std::string
id,
double *dsparam);
136 void store(std::string
id,
bool bparam);
139 void store(std::string
id, std::string sparam);
148 int ival(std::string
id);
151 double dval(std::string
id);
154 double *
dsval(std::string
id);
157 bool bval(std::string
id);
160 std::string
sval(std::string
id);
172 void write(std::string filename);
void write(std::string filename)
bool is_double(std::string id)
double dval(std::string id)
bool is_ast_cpu(std::string id)
void store(std::string id, cufftDoubleComplex *d2param)
void set_V_fn(std::string id)
void generate_plan_other3d(cufftHandle *plan_fft1d, Grid &par, int axis)
Generates CUFFT plan for 3D simulations.
void set_fns(Grid &par)
Sets default functions for all fields (A, K, V)
Struct to hold the node information for the AST on the CPU.
cufftDoubleComplex * cufftDoubleComplexval(std::string id)
double(* fnPtr)(double, double)
function pointer type
Struct to hold the node information for the AST on the GPU.
void set_A_fn(std::string id)
bool is_dstar(std::string id)
void generate_plan_other2d(cufftHandle *plan_fft1d, Grid &par)
Generates CUFFT plan for 2D simulations.
bool bval(std::string id)
EqnNode ast_cpuval(std::string id)
void set_wfc_fn(std::string id)
Struct for an x, y, z position.
std::string sval(std::string id)
% axis([1e4 1e7 5e-18 1e-10])
bool is_ast_gpu(std::string id)
Class to hold the variable map and grid information.
EqnNode_gpu * astval(std::string id)
double * dsval(std::string id)