Hi all,
Would you please guide me about my problem?
The code below is not yet complete and I have to add a lot. BUT
My teacher told me to call the particle velocity array from void function and add it to line 46 (between two for loops). Would you please tell me how to do it?
int np=100;
int nx=200, ny=200;
int dt=0.1;
double dist;
...
int main(){
int n; int i;
int tmax, t;
int n1,n2;
double x[np][2], u[np][2]; // np must be a compile time const.
double u_previous_time_step[n][2]; // n must be a compile constant, plus you use n uninitialized here.
double fluid_u[nx][ny][2];
In C++ array sizes must be compile time constants.
My teacher told me to call the particle velocity array from void function and add it to line 46 (between two for loops). Would you please tell me how to do it?
What have you tried? What exactly don't you understand?