From 6bc95bfe19012a33f185adf1476e623d98d33465 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@fe.uni-lj.si> Date: Tue, 16 Dec 2014 20:30:08 +0000 Subject: [PATCH] Added missing header file --- src/dumpstate.c | 30 ++++++++++++++++++++++-------- 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/dumpstate.c b/src/dumpstate.c index 9d1e2b2..06b0ffd 100644 --- a/src/dumpstate.c +++ b/src/dumpstate.c @@ -8,7 +8,9 @@ #include <libxml/tree.h> #include "vertex.h" #include "energy.h" - +#include "sh.h" +#include "cell.h" +#include "frame.h" ts_vesicle *vtk2vesicle(char *filename, ts_tape *tape){ ts_uint nshell=tape->nshell; @@ -21,6 +23,25 @@ ts_vesicle *vesicle=init_vesicle(no_vertices,ncmax1,ncmax2,ncmax3,stepsize); vesicle->nshell=nshell; parse_vtk(filename, vesicle); + + //we have vertices and neighbour relations all set, but unordered. Let's do bonds, ordering, triangles... + vesicle->vlist = vtk_sort_neighbours(vesicle->blist,vesicle->vlist); + init_triangles(vesicle); + init_triangle_neighbours(vesicle); + init_common_vertex_triangle_neighbours(vesicle); + init_normal_vectors(vesicle->tlist); + mean_curvature_and_energy(vesicle); + + + //preliminaries for spherical harmonics... + centermass(vesicle); + cell_occupation(vesicle); + vesicle_volume(vesicle); //needed for constant volume at this moment + vesicle_area(vesicle); //needed for constant area at this moment + ts_double v0=vesicle->volume; + ts_double a0=vesicle->area; + ts_double r0=getR0(vesicle); + if(r0&&v0&&a0); exit(1); return vesicle; } @@ -57,13 +78,6 @@ break; //segfaults, because it finds another cells. Why? } } - //we have vertices and neighbour relations all set, but unordered. Let's do bonds, ordering, triangles... - vesicle->vlist = vtk_sort_neighbours(vesicle->blist,vesicle->vlist); - init_triangles(vesicle); - init_triangle_neighbours(vesicle); - init_common_vertex_triangle_neighbours(vesicle); - init_normal_vectors(vesicle->tlist); - mean_curvature_and_energy(vesicle); ts_fprintf(stdout,"restoring from vtk dump finished!\n"); return TS_SUCCESS; } -- Gitblit v1.9.3