accelerInt  v0.1
ics.c
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 {
14 #endif
15 
16 
20 void set_same_initial_conditions(int NUM, double** y_host, double** var_host)
21 {
22  //init vectors
23  (*y_host) = (double*)malloc(NUM * NSP * sizeof(double));
24  (*var_host) = (double*)malloc(NUM * sizeof(double));
25  //now set the values
26  for (int i = 0; i < NUM; ++i){
27  //set mu
28  (*var_host)[i] = 1000;
29  //set y1, y2
30  (*y_host)[i] = 2;
31  (*y_host)[i + NUM] = 0;
32  }
33 }
34 
41 void apply_mask(double* y_host) {}
48 void apply_reverse_mask(double* y_host) {}
49 
50 #ifdef GENERATE_DOCS
51 }
52 #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_mask(double *y_host)
Not needed for van der Pol.
Definition: ics.c:41
void set_same_initial_conditions(int NUM, double **y_host, double **var_host)
Set same ICs for all problems.
Definition: ics.c:20
void apply_reverse_mask(double *y_host)
Not needed for van der Pol.
Definition: ics.c:48