Trisurf Monte Carlo simulator
Samo Penic
2014-06-13 11e87faa9121f98afef082caff52c0c7979037ec
Testing additional triangle data in vtu files.
2 files modified
21 ■■■■ changed files
src/io.c 17 ●●●●● patch | view | raw | blame | history
src/tape 4 ●●●● patch | view | raw | blame | history
src/io.c
@@ -784,7 +784,7 @@
    }
    fprintf(fh, "<?xml version=\"1.0\"?>\n<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" byte_order=\"LittleEndian\" compressor=\"vtkZLibDataCompressor\">\n <UnstructuredGrid>\n");
    fprintf(fh, "<Piece NumberOfPoints=\"%u\" NumberOfCells=\"%u\">\n",vlist->n+monono*polyno+fonono*filno, blist->n+monono*polyno+filno*(fonono-1));
    fprintf(fh, "<Piece NumberOfPoints=\"%u\" NumberOfCells=\"%u\">\n",vlist->n+monono*polyno+fonono*filno, blist->n+monono*polyno+filno*(fonono-1)+vesicle->tlist->n);
    fprintf(fh,"<PointData Scalars=\"scalars\">\n<DataArray type=\"Int64\" Name=\"scalars\" format=\"ascii\">");
       for(i=0;i<vlist->n;i++){
        fprintf(fh,"%u ",vtx[i]->idx);
@@ -861,8 +861,19 @@
    }
    //triangles
    for(i=0;i<vesicle->tlist->n;i++){
        fprintf(fh,"%u %u %u\n", vesicle->tlist->tria[i]->vertex[0]->idx,vesicle->tlist->tria[i]->vertex[1]->idx,vesicle->tlist->tria[i]->vertex[2]->idx);
    }
    fprintf(fh,"</DataArray>\n<DataArray type=\"Int64\" Name=\"offsets\" format=\"ascii\">");
    for (i=2;i<(blist->n+monono*polyno+(fonono-1)*filno)*2+1;i+=2){
    fprintf(fh,"%u ",i);
    }
    //triangles
    i++;
    for(;i<(blist->n+monono*polyno+(fonono-1)*filno)*2+1+vesicle->tlist->n*3+1;i+=3){
    fprintf(fh,"%u ",i);
    }
    fprintf(fh,"\n");
@@ -870,6 +881,10 @@
     for (i=0;i<blist->n+monono*polyno+fonono*filno;i++){
        fprintf(fh,"3 ");
    }
    //triangles
    for(i=0;i<vesicle->tlist->n;i++){
    fprintf(fh,"5 ");
    }
    fprintf(fh,"</DataArray>\n</Cells>\n</Piece>\n</UnstructuredGrid>\n</VTKFile>\n");
    fclose(fh);
src/tape
@@ -12,9 +12,9 @@
# Pressure calculations
# (pswitch=1: calc. p*dV energy contribution)
pswitch = 1
pswitch = 0
# pressure difference: p_inside - p_outside (in units kT/l_min^3):
pressure=1.0
pressure=0.0
#Constant volume constraint (0 disable constant volume, 1 enable)
constvolswitch=0