| | |
| | | ts_triangle_list *tlist=vesicle->tlist; |
| | | ts_uint i,j; |
| | | for(i=0;i<tlist->n;i++){ |
| | | fprintf(fh,"\t%u",tlist->tria[i]->data->neigh_no); |
| | | for(j=0;j<tlist->tria[i]->data->neigh_no;j++){ |
| | | fprintf(fh,"\t%u",(ts_uint)(tlist->tria[i]->data->neigh[j]->idx));//-tlist->tria+1)); |
| | | fprintf(fh,"\t%u",tlist->tria[i]->neigh_no); |
| | | for(j=0;j<tlist->tria[i]->neigh_no;j++){ |
| | | fprintf(fh,"\t%u",(ts_uint)(tlist->tria[i]->neigh[j]->idx));//-tlist->tria+1)); |
| | | } |
| | | fprintf(fh,"\n"); |
| | | for(j=0;j<3;j++){ |
| | | fprintf(fh,"\t%u",(ts_uint)(tlist->tria[i]->data->vertex[j]->idx));//-vesicle->vlist->vtx+1)); |
| | | fprintf(fh,"\t%u",(ts_uint)(tlist->tria[i]->vertex[j]->idx));//-vesicle->vlist->vtx+1)); |
| | | } |
| | | fprintf(fh,"\n"); |
| | | fprintf(fh,"%.17E\t%.17E\t%.17E\n",tlist->tria[i]->data->xnorm, |
| | | tlist->tria[i]->data->ynorm,tlist->tria[i]->data->znorm); |
| | | fprintf(fh,"%.17E\t%.17E\t%.17E\n",tlist->tria[i]->xnorm, |
| | | tlist->tria[i]->ynorm,tlist->tria[i]->znorm); |
| | | fprintf(fh,"0.00000000000000000\n0.00000000000000000\n"); |
| | | } |
| | | return TS_SUCCESS; |
| | |
| | | vlist->vtx[i]->data->xk,vlist->vtx[i]->data->c,vlist->vtx[i]->data->energy, |
| | | vlist->vtx[i]->data->energy_h, vlist->vtx[i]->data->curvature, 0); |
| | | for(j=0;j<vlist->vtx[i]->data->neigh_no;j++){ |
| | | fprintf(fh," %.17E", vlist->vtx[i]->data->bond[j]->data->bond_length_dual); |
| | | fprintf(fh," %.17E", vlist->vtx[i]->data->bond[j]->bond_length_dual); |
| | | } |
| | | fprintf(fh,"\n"); |
| | | for(j=0;j<vlist->vtx[i]->data->neigh_no;j++){ |
| | | fprintf(fh," %.17E", vlist->vtx[i]->data->bond[j]->data->bond_length); |
| | | fprintf(fh," %.17E", vlist->vtx[i]->data->bond[j]->bond_length); |
| | | } |
| | | fprintf(fh,"\n"); |
| | | } |
| | |
| | | ts_bool fprint_bonds(FILE *fh,ts_vesicle *vesicle){ |
| | | ts_uint i; |
| | | for(i=0;i<vesicle->blist->n;i++){ |
| | | fprintf(fh,"\t%u\t%u\n",(ts_uint)(vesicle->blist->bond[i]->data->vtx1->idx), |
| | | fprintf(fh,"\t%u\t%u\n",(ts_uint)(vesicle->blist->bond[i]->vtx1->idx), |
| | | //-vesicle->vlist->vtx+1), |
| | | (ts_uint)(vesicle->blist->bond[i]->data->vtx2->idx)); |
| | | (ts_uint)(vesicle->blist->bond[i]->vtx2->idx)); |
| | | //-vesicle->vlist.vtx+1)); |
| | | } |
| | | return TS_SUCCESS; |
| | |
| | | |
| | | fprintf(fh,"</DataArray>\n</Points>\n<Cells>\n<DataArray type=\"Int64\" Name=\"connectivity\" format=\"ascii\">"); |
| | | for(i=0;i<blist->n;i++){ |
| | | fprintf(fh,"%u %u\n",blist->bond[i]->data->vtx1->idx,blist->bond[i]->data->vtx2->idx); |
| | | fprintf(fh,"%u %u\n",blist->bond[i]->vtx1->idx,blist->bond[i]->vtx2->idx); |
| | | } |
| | | fprintf(fh,"</DataArray>\n<DataArray type=\"Int64\" Name=\"offsets\" format=\"ascii\">"); |
| | | for (i=2;i<blist->n*2+1;i+=2){ |
| | |
| | | |
| | | fprintf(fh,"CELLS %u %u\n",blist->n,3*blist->n); |
| | | for(i=0;i<blist->n;i++){ |
| | | fprintf(fh,"2 %u %u\n",blist->bond[i]->data->vtx1->idx,blist->bond[i]->data->vtx2->idx); |
| | | fprintf(fh,"2 %u %u\n",blist->bond[i]->vtx1->idx,blist->bond[i]->vtx2->idx); |
| | | } |
| | | fprintf(fh,"CELL_TYPES %u\n",blist->n); |
| | | for(i=0;i<blist->n;i++) |
| | |
| | | |
| | | } |
| | | */ |
| | | if(retval); |
| | | fclose(fh); |
| | | |
| | | |