#include"nanocpp.h" #include"dft_in_place.h" using namespace std; int main(int argc, char* argv[]){ ////////////////////// INIT THE CODE ///////////////// nanocpp n(argc,argv); cout< vv; vv.init(cds,n.get_grid(),fc); //init a DFT object double fw[20]; for(int i=0;i<20;i++) fw[i]=1e9+i*0.5e9/19.; int wsiz=20; double dt=n.get_dt(); dft_vol df(vv,fw,wsiz,dt); ///////////////////////////////////////////////////// ///////////////////// CYCLE ///////////////////// double sta=MPI_Wtime(); for(n.tcurr;n.tcurr<=n.total_steps;n.tcurr++){ n.time=n.tcurr*n.dt; //update time; n.single_step(); //single step /////////////////// MY CODE //////////////////// n.erg_exch(); //exchange boundaries df.accum_dft_all(n,n.tcurr);// accumulate dft results ///////////////////////////////////////////////////// } /////////////////// MY CODE //////////////////// //DFT string fn="res"; df.save_fields(n,fn); fn="res/data.bin"; df.save_erg(n,fn); ///////////////////////////////////////////////////// //////////////////// SAVE OUTPUT AND LOGOUT ///////////// n.post_process(); //process data n.goodbye(sta); //get time and print goodbye //////////////////////////////////////////////////////// }