Improved tsmeasure. Found a nasty bug in trisurf regarding snapshot accuracy. Fixed it.
| | |
| | | |
| | | fprintf(fh,"</DataArray>\n</PointData>\n<CellData>\n</CellData>\n<Points>\n<DataArray type=\"Float64\" Name=\"Koordinate tock\" NumberOfComponents=\"3\" format=\"ascii\">\n"); |
| | | for(i=0;i<vlist->n;i++){ |
| | | fprintf(fh,"%e %e %e\n",vtx[i]->x,vtx[i]->y, vtx[i]->z); |
| | | fprintf(fh,"%.17e %.17e %.17e\n",vtx[i]->x,vtx[i]->y, vtx[i]->z); |
| | | } |
| | | //polymeres |
| | | if(poly){ |
| | | for(i=0;i<vesicle->poly_list->n;i++){ |
| | | for(j=0;j<vesicle->poly_list->poly[i]->vlist->n;j++){ |
| | | fprintf(fh,"%e %e %e\n", vesicle->poly_list->poly[i]->vlist->vtx[j]->x,vesicle->poly_list->poly[i]->vlist->vtx[j]->y, vesicle->poly_list->poly[i]->vlist->vtx[j]->z ); |
| | | fprintf(fh,"%.17e %.17e %.17e\n", vesicle->poly_list->poly[i]->vlist->vtx[j]->x,vesicle->poly_list->poly[i]->vlist->vtx[j]->y, vesicle->poly_list->poly[i]->vlist->vtx[j]->z ); |
| | | } |
| | | } |
| | | } |
| | |
| | | if(fil){ |
| | | for(i=0;i<vesicle->filament_list->n;i++){ |
| | | for(j=0;j<vesicle->filament_list->poly[i]->vlist->n;j++){ |
| | | fprintf(fh,"%e %e %e\n", vesicle->filament_list->poly[i]->vlist->vtx[j]->x,vesicle->filament_list->poly[i]->vlist->vtx[j]->y, vesicle->filament_list->poly[i]->vlist->vtx[j]->z ); |
| | | fprintf(fh,"%.17e %.17e %.17e\n", vesicle->filament_list->poly[i]->vlist->vtx[j]->x,vesicle->filament_list->poly[i]->vlist->vtx[j]->y, vesicle->filament_list->poly[i]->vlist->vtx[j]->z ); |
| | | } |
| | | } |
| | | } |
| | |
| | | calculateUlmComplex(vesicle); |
| | | ts_int i,j; |
| | | for(i=0;i<vesicle->sphHarmonics->l;i++){ |
| | | for(j=0;j<2*i+1;j++){ |
| | | for(j=i;j<2*i+1;j++){ |
| | | printf("%e ", gsl_complex_abs2(vesicle->sphHarmonics->ulmComplex[i][j])); |
| | | } |
| | | } |
| | |
| | | int main(){ |
| | | ts_vesicle *vesicle; |
| | | ts_char *i,*j; |
| | | ts_uint tstep; |
| | | ts_uint tstep,n; |
| | | ts_char *number; |
| | | struct dirent **list; |
| | | int count; |
| | | ts_fprintf(stdout,"TRISURF-NG v. %s, compiled on: %s %s.\n", TS_VERSION, __DATE__, __TIME__); |
| | | ts_fprintf(stdout,"Programming done by: Samo Penic and Miha Fosnaric\n"); |
| | | ts_fprintf(stdout,"Released under terms of GPLv3\n"); |
| | | ts_fprintf(stdout,"Starting program...\n\n"); |
| | | DIR *dir = opendir("."); |
| | | if(dir){ |
| | | struct dirent *ent; |
| | | count=scandir(".",&list,0,alphasort); |
| | | if(count<0){ |
| | | fatal("Error, cannot open directory.",1); |
| | | } |
| | | tstep=0; |
| | | while((ent = readdir(dir)) != NULL) |
| | | { |
| | | for(n=0;n<count;n++){ |
| | | struct dirent *ent; |
| | | ent=list[n]; |
| | | i=rindex(ent->d_name,'.'); |
| | | if(i==NULL) continue; |
| | | if(strcmp(i+1,"vtu")==0){ |
| | |
| | | number=strndup(j+1,j-i); |
| | | quiet=1; |
| | | ts_fprintf(stdout,"timestep: %u filename: %s\n",atoi(number),ent->d_name); |
| | | printf("%u ",atoi(number)); |
| | | vesicle=restoreVesicle(ent->d_name); |
| | | vesicle_calculate_ulm2(vesicle); |
| | | tstep++; |
| | | //vesicle_free(vesicle); |
| | | free(number); |
| | | } |
| | | free(ent); |
| | | } |
| | | } |
| | | free(dir); |
| | | |
| | | |
| | | |
| | | |
| | | free(list); |
| | | return 0; |
| | | } |
| | | |