// Note that in initbase.c that many required things are computed during restart setup // For example, post_init() calls compute_EOS_parms_full() that fills EOSextraglobal[] if doing WHICHEOS==KAZFULL, so don't have to store that in restart file. int rdump_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { // always NPR myset(datatype,GLOBALMAC(pglobal,i,j,k),0,NPR,writebuf); myset(datatype,GLOBALMAC(unewglobal,i,j,k),0,NPR,writebuf); return(0); }
int dumpother_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { int pl; myset(datatype,&panalytic[i][j][k],0,NPR,writebuf); for(pl=0;pl<NUMPOTHER;pl++){ myset(datatype,&pother[pl][i][j][k],0,1,writebuf); } return (0); }
int avg2_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { int pl = 0, l = 0, col = 0; struct of_geom geom; FTYPE X[NDIM],V[NDIM]; FTYPE ftemp; coord(i, j, k, CENT, X); bl_coord(X, V); get_geometry(i, j, k, CENT, &geom); // if you change # of outputted vars, remember to change numcolumns above if(!GAMMIEDUMP){ ftemp=(FTYPE)(i+startpos[1]); myset(datatype,&ftemp,0,1,writebuf); ftemp=(FTYPE)(j+startpos[2]); myset(datatype,&ftemp,0,1,writebuf); ftemp=(FTYPE)(k+startpos[3]); myset(datatype,&ftemp,0,1,writebuf); } myset(datatype,X,1,3,writebuf); myset(datatype,V,1,3,writebuf); myset(datatype,&geom.g,0,1,writebuf); // 10 myset(datatype,tudtavg[i][j][k],0,NUMSTRESSTERMS,writebuf); myset(datatype,atudtavg[i][j][k],0,NUMSTRESSTERMS,writebuf); // 112*2 // total=10+112*2=234 return(0); }
int eosdump_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { FTYPE rho,u; FTYPE height,ye,ynu,temp; FTYPE extras[MAXNUMEXTRAS]; FTYPE processed[MAXPROCESSEDEXTRAS]; int numextras; int extraiter; int numparms; FTYPE parlist[MAXPARLIST]; ////////////////////////// // // do the assignments // // if you change # of outputted vars, remember to change numcolumns // below needed for computing H and EOS icurr=i; jcurr=j; kcurr=k; pcurr=CENT; //////////// // // output some EOS stuff since in general not simple function of rho0,u rho = pdump[i][j][k][RHO]; u = pdump[i][j][k][UU]; // compute EOS stuff get_EOS_parms(i, j, k, &numparms, parlist); temp = compute_temp(rho,u); // get extra EOS stuff get_extrasprocessed(1, i, j, k, pdump[i][j][k], extras, processed); // compute_allextras(0,rho,u,&numextras,extras); // write EOS stuff // write out all stuff for all EOSs so uniform format to read for any run (otherwise need version information in file) myset(datatype,&parlist,0,MAXPARLIST,writebuf); // numparms=6 myset(datatype,&temp,0,1,writebuf); // 1 // write extras EOS stuff myset(datatype,extras,0,MAXNUMEXTRAS,writebuf); // numextras myset(datatype,processed,0,MAXPROCESSEDEXTRAS,writebuf); // numprocessedextras return (0); }
int main(const int argc, char** argv) { if (argc != 2) { printf("./test KEYSIZE\n"); return 1; } const uint32_t KEYSIZE = atoi(argv[1]); diskset myset("./data/", false); struct timeval btv; struct timeval etv; gettimeofday(&btv, NULL); uint32_t value = 0; for (uint32_t ukey=0; ukey<KEYSIZE; ukey++) { myset.select(ukey, value); assert((uint32_t)ukey == value); } gettimeofday(&etv, NULL); ROUTN ("termCount[%u] get_time-consumed[%u]us", KEYSIZE, (etv.tv_sec - btv.tv_sec)*1000000+(etv.tv_usec - btv.tv_usec)); return 0; }
int dissdump_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { myset(datatype,&dissfunpos[i][j][k],0,NUMDISSFUNPOS,writebuf); return (0); }
int debug_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { // could also make everything FTYPE and convert like for normal i,j dump file myset(datatype,failfloorcount[i][j][k][0],0,NUMTSCALES*NUMFAILFLOORFLAGS,writebuf); return(0); }
int enodebug_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { // could also make everything FTYPE and convert like for normal i,j dump file //myset(datatype,enodebugarray[i][j][k],0,3*NUMINTERPTYPES*NPR*NUMENODEBUGS,writebuf); myset(datatype,enodebugarray[i][j][k],0,(3-1)*NUMINTERPTYPES*(NPR-4)*NUMENODEBUGS,writebuf); //atch corrected return(0); }
int fluxdump_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { int pl; myset(datatype,&fluxdump[i][j][k],0,NUMFLUXDUMP,writebuf); return (0); }
int vpotdump_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { int jj; DLOOPA(jj){ myset(datatype,&vpotarray[jj][i][j][k],0,1,writebuf); // 1 each } return (0); }
int main() { int myints[] = {3, 5}; std::set<int> myset (myints, myints + 2); int limit = 1000; std::cout << multiples(myset, limit) << std::endl; return 0; }
/** * Sets up the SVM classifier: * - divide dataset into training and test sets for each fold * - set parameters (fdr, soft margin) * @param w_ vector of SVM weights * @return number of positives for initial setup */ int CrossValidation::preIterationSetup(Scores & fullset, SanityCheck * pCheck, Normalizer * pNorm) { // initialize weights vector for all folds w_ = vector<vector<double> >(numFolds_, vector<double> (FeatureNames::getNumFeatures() + 1)); // One input set, to be reused multiple times for (unsigned int set = 0; set < numAlgInObjects_; ++set) { svmInputs_.push_back(new AlgIn(fullset.size(), FeatureNames::getNumFeatures() + 1)); assert( svmInputs_.back() ); } if (selectedCpos_ >= 0 && selectedCneg_ >= 0) { trainScores_.resize(numFolds_); testScores_.resize(numFolds_); fullset.createXvalSetsBySpectrum(trainScores_, testScores_, numFolds_); if (selectionFdr_ <= 0.0) { selectionFdr_ = testFdr_; } if (selectedCpos_ > 0) { candidatesCpos_.push_back(selectedCpos_); } else { candidatesCpos_.push_back(10); candidatesCpos_.push_back(1); candidatesCpos_.push_back(0.1); if (VERB > 0) { cerr << "selecting cpos by cross validation" << endl; } } if (selectedCpos_ > 0 && selectedCneg_ > 0) { candidatesCfrac_.push_back(selectedCneg_ / selectedCpos_); } else { candidatesCfrac_.push_back(1.0 * fullset.getTargetDecoySizeRatio()); candidatesCfrac_.push_back(3.0 * fullset.getTargetDecoySizeRatio()); candidatesCfrac_.push_back(10.0 * fullset.getTargetDecoySizeRatio()); if (VERB > 0) { cerr << "selecting cneg by cross validation" << endl; } } return pCheck->getInitDirection(testScores_, trainScores_, pNorm, w_, testFdr_); } else { vector<Scores> myset(1, fullset); cerr << "B" << endl; return pCheck->getInitDirection(myset, myset, pNorm, w_, testFdr_); } }
/** * Sets up the SVM classifier: * - divide dataset into training and test sets for each fold * - set parameters (fdr, soft margin) * @param w list of normal vectors * @return number of positives for initial setup */ int CrossValidation::preIterationSetup(Scores & fullset, SanityCheck * pCheck, Normalizer * pNorm) { w = vector<vector<double> > (xval_fold,vector<double> (FeatureNames::getNumFeatures()+ 1)); svmInput = new AlgIn(fullset.size(), FeatureNames::getNumFeatures() + 1); // One input set, to be reused multiple times assert( svmInput ); if (selectedCpos >= 0 && selectedCneg >= 0) { xv_train.resize(xval_fold); xv_test.resize(xval_fold); fullset.createXvalSetsBySpectrum(xv_train, xv_test, xval_fold); if (selectionFdr <= 0.0) { selectionFdr = testFdr; } if (selectedCpos > 0) { xv_cposs.push_back(selectedCpos); } else { xv_cposs.push_back(10); xv_cposs.push_back(1); xv_cposs.push_back(0.1); if (VERB > 0) { cerr << "selecting cpos by cross validation" << endl; } } if (selectedCpos > 0 && selectedCneg > 0) { xv_cfracs.push_back(selectedCneg / selectedCpos); } else { xv_cfracs.push_back(1.0 * fullset.getTargetDecoySizeRatio()); xv_cfracs.push_back(3.0 * fullset.getTargetDecoySizeRatio()); xv_cfracs.push_back(10.0 * fullset.getTargetDecoySizeRatio()); if (VERB > 0) { cerr << "selecting cneg by cross validation" << endl; } } return pCheck->getInitDirection(xv_test, xv_train, pNorm, w, testFdr); } else { vector<Scores> myset(1, fullset); cerr << "B" << endl; return pCheck->getInitDirection(myset, myset, pNorm, w, testFdr); } }
int fieldline_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { int pl = 0, l = 0, col = 0; struct of_geom geom; struct of_state q; //FTYPE U[NPR]; FTYPE FL[NPR]; // must be same precision as written content float ftemp; ////////////// // // some calculations // // if failed, then data output for below invalid, but columns still must exist get_geometry(i, j, k, CENT, &geom); if (!failed) { if (get_state(pdump[i][j][k], &geom, &q) >= 1) FAILSTATEMENT("dump.c:dump()", "get_state() dir=0", 1); } else {// do a per zone check, otherwise set to 0 whocalleducon=1; // force no failure mode, just return like failure, and don't return if failure, just set to 0 and continue if (get_state(pdump[i][j][k], &geom, &q) >= 1){ for (pl = 0; pl < NDIM; pl++) q.ucon[pl]=0; for (pl = 0; pl < NDIM; pl++) q.ucov[pl]=0; for (pl = 0; pl < NDIM; pl++) q.bcon[pl]=0; for (pl = 0; pl < NDIM; pl++) q.bcov[pl]=0; } whocalleducon=0; // return to normal state } MYFUN(primtoflux(UDIAG,pdump[i][j][k], &q, RR, &geom, FL),"step_ch.c:fluxcalc()", "primtoflux_calc() dir=1/2 l", RR); ////////////////////////// // // do the assignments // // if you change # of outputted vars, remember to change numcolumns //////////////////// // // 2 various things // rho (for various things) ftemp=(float)pdump[i][j][k][RHO]; myset(datatype,&ftemp,0,1,writebuf); // u (for various things) ftemp=(float)pdump[i][j][k][UU]; myset(datatype,&ftemp,0,1,writebuf); ////////////////////// // // 2 things for jet/energy per baryon at infinity // -u_t (-hu_t can be found from this and rho/u/p above) ftemp=(float)(-q.ucov[0]); myset(datatype,&ftemp,0,1,writebuf); // -T^t_t/(gdet rho u^t) // ftemp=(float)(-U[UU]/(geom.g * pdump[i][j][k][RHO]*q.ucon[TT])); //myset(datatype,&ftemp,0,1,writebuf); // -T^r_t/(rho u^r) if(q.ucon[RR]!=0.0){ ftemp=(float)(-FL[UU]/(geom.g * pdump[i][j][k][RHO]*q.ucon[RR])); } else ftemp=0.0; myset(datatype,&ftemp,0,1,writebuf); // 1 extra thing // u^t ftemp=(float)(q.ucon[0]); myset(datatype,&ftemp,0,1,writebuf); /////////////////////////// // // 6 things for the field line stuff // v^r [ in grid frame] ftemp=(float)(q.ucon[1]/q.ucon[0]); myset(datatype,&ftemp,0,1,writebuf); // v^\theta ftemp=(float)(q.ucon[2]/q.ucon[0]); myset(datatype,&ftemp,0,1,writebuf); // v^\phi ftemp=(float)(q.ucon[3]/q.ucon[0]); myset(datatype,&ftemp,0,1,writebuf); // B^r ftemp=(float)(pdump[i][j][k][B1]); myset(datatype,&ftemp,0,1,writebuf); // B^\theta ftemp=(float)(pdump[i][j][k][B2]); myset(datatype,&ftemp,0,1,writebuf); // B^\phi ftemp=(float)(pdump[i][j][k][B3]); myset(datatype,&ftemp,0,1,writebuf); // see grmhd-dualfcon2omegaf.nb // below can be obtained from above set of v and B // \Omega_F_1 // ftemp=(float)(v3-B3*v2/(B2+SMALL)); //myset(datatype,&ftemp,0,1,writebuf); // \Omega_F_2 //ftemp=(float)(v3-B3*v1/(B1+SMALL)); // myset(datatype,&ftemp,0,1,writebuf); return(0); }
int gdump_content(int i, int j, int k, MPI_Datatype datatype, void *writebuf) { int pl = 0, l = 0, m = 0, n = 0, col = 0; FTYPE X[NDIM],V[NDIM]; FTYPE ftemp; FTYPE *ptrftemp; FTYPE dxdxp[NDIM][NDIM]; int myii,myjj,mykk; coord(i, j, k, CENT, X); bl_coord(X, V); dxdxprim(X, V, dxdxp); ftemp=(FTYPE)(i+startpos[1]); myset(datatype,&ftemp,0,1,writebuf); ftemp=(FTYPE)(j+startpos[2]); myset(datatype,&ftemp,0,1,writebuf); ftemp=(FTYPE)(k+startpos[3]); myset(datatype,&ftemp,0,1,writebuf); // 3 myset(datatype,X,1,3,writebuf); myset(datatype,V,1,3,writebuf); // 6 #if(MCOORD!=CARTMINKMETRIC) myii=i; myjj=j; mykk=k; #else myii=0; myjj=0; mykk=0; #endif ptrftemp=(FTYPE*)(&conn[myii][myjj][mykk][0][0][0]); myset(datatype,ptrftemp,0,NDIM*NDIM*NDIM,writebuf); ptrftemp=(FTYPE*)(&gcon[myii][myjj][mykk][CENT][0][0]); myset(datatype,ptrftemp,0,NDIM*NDIM,writebuf); ptrftemp=(FTYPE*)(&gcov[myii][myjj][mykk][CENT][0][0]); myset(datatype,ptrftemp,0,NDIM*NDIM,writebuf); ptrftemp=(FTYPE*)(&gdet[myii][myjj][mykk][CENT]); //ptrftemp=(FTYPE*)(&gdetvol[myii][myjj][mykk][CENT]); // can take a peek if GDETVOLDIFF==1 myset(datatype,ptrftemp,0,1,writebuf); ptrftemp=(FTYPE*)(&conn2[myii][myjj][mykk][0]); myset(datatype,ptrftemp,0,NDIM,writebuf); // 4*4 ptrftemp=(FTYPE*)(&dxdxp[0][0]); myset(datatype,ptrftemp,0,NDIM*NDIM,writebuf); return(0); }
// must be consistent with dnumcolumns[RESTARTMETRICDUMPTYPE] int rmetricdump_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { int gridpos; struct of_compgeom *tempcompgeom; FTYPE generalmatrixlower[NDIM][NDIM]; FTYPE generalmatrixupper[NDIM][NDIM]; int jj,kk; GRIDLOOP(gridpos){ // note that in older code gridpos was quickest index! Now slowest compared to matrix indices #if(NEWMETRICSTORAGE) tempcompgeom = &GLOBALMETMACP1A0(compgeomlast,gridpos,i,j,k); DLOOP(jj,kk){ generalmatrixlower[jj][kk]=tempcompgeom->gcov[GIND(jj,kk)]; generalmatrixupper[jj][kk]=tempcompgeom->gcon[GIND(jj,kk)]; } myset(datatype,generalmatrixlower,0,NDIM*NDIM,writebuf); myset(datatype,generalmatrixupper,0,NDIM*NDIM,writebuf); myset(datatype,tempcompgeom->gcovpert,0,NDIM,writebuf); myset(datatype,&(tempcompgeom->gdet),0,1,writebuf); #if(WHICHEOM!=WITHGDET) myset(datatype,&(tempcompgeom->EOMFUNCMAC(0)),0,NPR,writebuf); myset(datatype,&(tempcompgeom->IEOMFUNCNOSINGMAC(0)),0,NPR,writebuf); #endif #if(GDETVOLDIFF) myset(datatype,&(tempcompgeom->gdetvol),0,1,writebuf); #endif myset(datatype,&(tempcompgeom->igdetnosing),0,1,writebuf); myset(datatype,&(tempcompgeom->alphalapse),0,1,writebuf); myset(datatype,&(tempcompgeom->betasqoalphasq),0,1,writebuf); myset(datatype,&(tempcompgeom->beta),0,NDIM,writebuf); #else DLOOP(jj,kk){ generalmatrixlower[jj][kk]=GLOBALMETMACP1A1(gcovlast,gridpos,i,j,k,GIND(jj,kk)); }
int avg_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { int pl = 0, l = 0, col = 0; struct of_geom geom; FTYPE X[NDIM],V[NDIM]; FTYPE ftemp; coord(i, j, k, CENT, X); bl_coord(X, V); get_geometry(i, j, k, CENT, &geom); if(!GAMMIEDUMP){ ftemp=(FTYPE)(i+startpos[1]); myset(datatype,&ftemp,0,1,writebuf); ftemp=(FTYPE)(j+startpos[2]); myset(datatype,&ftemp,0,1,writebuf); ftemp=(FTYPE)(k+startpos[3]); myset(datatype,&ftemp,0,1,writebuf); } myset(datatype,X,1,3,writebuf); myset(datatype,V,1,3,writebuf); myset(datatype,&geom.g,0,1,writebuf); // now do time average stuff myset(datatype,normalvarstavg[i][j],0,NUMNORMDUMP,writebuf); myset(datatype,anormalvarstavg[i][j],0,NUMNORMDUMP,writebuf); #if(CALCFARADAYANDCURRENTS) myset(datatype,jcontavg[i][j],0,NDIM,writebuf); myset(datatype,jcovtavg[i][j],0,NDIM,writebuf); myset(datatype,ajcontavg[i][j],0,NDIM,writebuf); myset(datatype,ajcovtavg[i][j],0,NDIM,writebuf); #endif myset(datatype,massfluxtavg[i][j],0,NDIM,writebuf); myset(datatype,amassfluxtavg[i][j],0,NDIM,writebuf); myset(datatype,othertavg[i][j],0,NUMOTHER,writebuf); myset(datatype,aothertavg[i][j],0,NUMOTHER,writebuf); #if(CALCFARADAYANDCURRENTS) myset(datatype,fcontavg[i][j],0,NUMFARADAY,writebuf); myset(datatype,fcovtavg[i][j],0,NUMFARADAY,writebuf); myset(datatype,afcontavg[i][j],0,NUMFARADAY,writebuf); myset(datatype,afcovtavg[i][j],0,NUMFARADAY,writebuf); #endif #if(DOAVG2==0) myset(datatype,tudtavg[i][j],0,NUMSTRESSTERMS,writebuf); myset(datatype,atudtavg[i][j],0,NUMSTRESSTERMS,writebuf); #endif return(0); }
void cantorize_result_vector(sc_type_result_vector *result) { std::set<sc_type_result *> myset(result->begin(), result->end()); result->clear(); result->insert(result->begin(), myset.begin(), myset.end()); }
int dump_content(int i, int j, int k, MPI_Datatype datatype,void *writebuf) { int pl; FTYPE r, th, vmin[NDIM], vmax[NDIM]; int ignorecourant; struct of_geom geom; struct of_state q; FTYPE X[NDIM],V[NDIM]; FTYPE divb; FTYPE b[NDIM],ucon[NDIM]; FTYPE U[NPR]; FTYPE ftemp; FTYPE jcov[NDIM]; FTYPE fcov[NUMFARADAY]; FTYPE rho,u,pressure,cs2,Sden; int dir,l,m,n,o; ////////////// // // some calculations // coord(i, j, k, CENT, X); bl_coord(X, V); // if failed, then data output for below invalid, but columns still must exist get_geometry(i, j, k, CENT, &geom); if (!failed) { if (get_state(pdump[i][j][k], &geom, &q) >= 1) FAILSTATEMENT("dump.c:dump()", "get_state() dir=0", 1); if (vchar(pdump[i][j][k], &q, 1, &geom, &vmax[1], &vmin[1],&ignorecourant) >= 1) FAILSTATEMENT("dump.c:dump()", "vchar() dir=1or2", 1); if (vchar(pdump[i][j][k], &q, 2, &geom, &vmax[2], &vmin[2],&ignorecourant) >= 1) FAILSTATEMENT("dump.c:dump()", "vchar() dir=1or2", 2); if (vchar(pdump[i][j][k], &q, 3, &geom, &vmax[3], &vmin[3],&ignorecourant) >= 1) FAILSTATEMENT("dump.c:dump()", "vchar() dir=1or2", 3); } else {// do a per zone check, otherwise set to 0 whocalleducon=1; // force no failure mode, just return like failure, and don't return if failure, just set to 0 and continue if (get_state(pdump[i][j][k], &geom, &q) >= 1){ for (pl = 0; pl < NDIM; pl++) q.ucon[pl]=0; for (pl = 0; pl < NDIM; pl++) q.ucov[pl]=0; for (pl = 0; pl < NDIM; pl++) q.bcon[pl]=0; for (pl = 0; pl < NDIM; pl++) q.bcov[pl]=0; } if (vchar(pdump[i][j][k], &q, 1, &geom, &vmax[1], &vmin[1],&ignorecourant) >= 1){ vmax[1]=vmin[1]=0; } if (vchar(pdump[i][j][k], &q, 2, &geom, &vmax[2], &vmin[2],&ignorecourant) >= 1){ vmax[2]=vmin[2]=0; } if (vchar(pdump[i][j][k], &q, 3, &geom, &vmax[3], &vmin[3],&ignorecourant) >= 1){ vmax[3]=vmin[3]=0; } whocalleducon=0; // return to normal state } setfdivb(&divb, pdump, udump, i, j, k); // udump also set externally GODMARK ////////////////////////// // // do the assignments // // if you change # of outputted vars, remember to change numcolumns //static if(!GAMMIEDUMP){ ftemp=(FTYPE)(i+startpos[1]); myset(datatype,&ftemp,0,1,writebuf); ftemp=(FTYPE)(j+startpos[2]); myset(datatype,&ftemp,0,1,writebuf); ftemp=(FTYPE)(k+startpos[3]); myset(datatype,&ftemp,0,1,writebuf); } myset(datatype,X,1,3,writebuf); myset(datatype,V,1,3,writebuf); // 9 //////////////////////// // // rest dynamic // primitives // must use PDUMPLOOP() since may be any order unlike NPR loop PDUMPLOOP(pl) myset(datatype,&(pdump[i][j][k][pl]),0,1,writebuf); // NPRDUMP //////////// // // output some EOS stuff since in general not simple function of rho0,u rho = pdump[i][j][k][RHO]; u = pdump[i][j][k][UU]; pressure = pressure_rho0_u(rho,u); cs2 = cs2_compute(rho,u); Sden = compute_entropy(rho,u); // dUdtau = compute_qdot(rho,u); myset(datatype,&pressure,0,1,writebuf); // 1 myset(datatype,&cs2,0,1,writebuf); // 1 myset(datatype,&Sden,0,1,writebuf); // 1 // myset(datatype,&dUdtau,0,1,writebuf); // 1 ////////////////////// // // output the conserved quantities since not easily inverted and at higher order aren't invertable from point primitives PDUMPLOOP(pl) myset(datatype,&(udump[i][j][k][pl]),0,1,writebuf); // NPRDUMP myset(datatype,&divb,0,1,writebuf); // 1 for (pl = 0; pl < NDIM; pl++) myset(datatype,&(q.ucon[pl]),0,1,writebuf); for (pl = 0; pl < NDIM; pl++) myset(datatype,&(q.ucov[pl]),0,1,writebuf); for (pl = 0; pl < NDIM; pl++) myset(datatype,&(q.bcon[pl]),0,1,writebuf); for (pl = 0; pl < NDIM; pl++) myset(datatype,&(q.bcov[pl]),0,1,writebuf); // 4*4 myset(datatype,&vmin[1],0,1,writebuf); myset(datatype,&vmax[1],0,1,writebuf); myset(datatype,&vmin[2],0,1,writebuf); myset(datatype,&vmax[2],0,1,writebuf); myset(datatype,&vmin[3],0,1,writebuf); myset(datatype,&vmax[3],0,1,writebuf); // 6 // one static term myset(datatype,&geom.g,0,1,writebuf); // 1 #if(CALCFARADAYANDCURRENTS) // NIM*2+6*2 = 8+12=20 // updated 11/16/2003 // new 10/23/2003 // current density lower_vec(jcon[i][j][k],&geom,jcov); myset(datatype,jcon[i][j][k],0,NDIM,writebuf); // (NDIM) myset(datatype,jcov,0,NDIM,writebuf);// (NDIM) // faraday (2*6) lowerf(fcon[i][j][k],&geom,fcov); myset(datatype,fcon[i][j][k],0,NUMFARADAY,writebuf); // (6) myset(datatype,fcov,0,NUMFARADAY,writebuf); // (6) #endif if(FLUXB==FLUXCTSTAG && 0){ // DEBUG (change corresponding code in dump.c) // uses jrdp3dudebug in gtwod.m that assumes CALCFARADAYANDCURRENTS==0 for(l=1;l<=COMPDIM;l++) myset(datatype,gp_l[l][i][j][k],0,NPR2INTERP,writebuf); // 3*8 = 24 for(l=1;l<=COMPDIM;l++) myset(datatype,gp_r[l][i][j][k],0,NPR2INTERP,writebuf); // 3*8 = 24 myset(datatype,pstagscratch[i][j][k],0,NPR,writebuf); // 8 for(dir=1;dir<=COMPDIM;dir++) for(pl=B1;pl<=B3;pl++) for(n=0;n<=1;n++) myset(datatype,&pbcorninterp[dir][pl][n][i][j][k],0,1,writebuf); // 3*3*2 = 18 for(dir=1;dir<=COMPDIM;dir++) for(pl=U1;pl<=U3;pl++) for(n=0;n<=1;n++) for(o=0;o<=1;o++) myset(datatype,&pvcorninterp[dir][pl][n][o][i][j][k],0,1,writebuf); // 3*3*2*2 = 36 } return (0); }