accelerInt  v0.1
ics.cu
Go to the documentation of this file.
1 
9 #include "header.h"
10 
11 #ifdef GENERATE_DOCS
12 //put this in the van der Pol namespace for documentation
13 namespace van_der_pol_cu {
14 #endif
15 
16 
25 void set_same_initial_conditions(int NUM, double** y_host, double** var_host)
26 {
27  //init vectors
28  (*y_host) = (double*)malloc(NUM * NSP * sizeof(double));
29  (*var_host) = (double*)malloc(NUM * sizeof(double));
30  //now set the values
31  for (int i = 0; i < NUM; ++i){
32  //set mu
33  (*var_host)[i] = 1000;
34  //set y1, y2
35  (*y_host)[i] = 2;
36  (*y_host)[i + NUM] = 0;
37  }
38 }
39 
46 void apply_mask(double* y_host) {}
53 void apply_reverse_mask(double* y_host) {}
54 
55 #ifdef GENERATE_DOCS
56 }
57 #endif
An example header file that defines system size and other required methods for integration of the van...
#define NSP
The IVP system size.
Definition: header.cuh:20
void apply_reverse_mask(double *y_host)
Not needed for van der Pol.
Definition: ics.cu:53
void apply_mask(double *y_host)
Not needed for van der Pol.
Definition: ics.cu:46
void set_same_initial_conditions(int NUM, double **y_host, double **var_host)
Set same ICs for all problems.
Definition: ics.cu:25