Program parameters are finally read from tape. Initial tests are removed
| | |
| | | # generated automatically by aclocal 1.11.3 -*- Autoconf -*- |
| | | # generated automatically by aclocal 1.11.6 -*- Autoconf -*- |
| | | |
| | | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| | | # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, |
| | |
| | | |
| | | m4_ifndef([AC_AUTOCONF_VERSION], |
| | | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
| | | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, |
| | | [m4_warning([this file was generated for autoconf 2.68. |
| | | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, |
| | | [m4_warning([this file was generated for autoconf 2.69. |
| | | You have another version of autoconf. It may work, but is not guaranteed to. |
| | | If you have problems, you may need to regenerate the build system entirely. |
| | | To do so, use the procedure documented by the package, typically `autoreconf'.])]) |
| | |
| | | [am__api_version='1.11' |
| | | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
| | | dnl require some minimum version. Point them to the right macro. |
| | | m4_if([$1], [1.11.3], [], |
| | | m4_if([$1], [1.11.6], [], |
| | | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
| | | ]) |
| | | |
| | |
| | | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
| | | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
| | | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
| | | [AM_AUTOMAKE_VERSION([1.11.3])dnl |
| | | [AM_AUTOMAKE_VERSION([1.11.6])dnl |
| | | m4_ifndef([AC_AUTOCONF_VERSION], |
| | | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
| | | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
| | |
| | | #include<stdlib.h> |
| | | #include <sys/types.h> |
| | | #include <dirent.h> |
| | | |
| | | #include "initial_distribution.h" |
| | | |
| | | ts_bool print_vertex_list(ts_vertex_list *vlist){ |
| | | ts_uint i; |
| | |
| | | |
| | | |
| | | |
| | | ts_bool parsetape(ts_vesicle *vesicle,ts_uint *iterations){ |
| | | ts_vesicle *parsetape(ts_uint *iterations){ |
| | | long int nshell=17,ncxmax=60, ncymax=60, nczmax=60; // THIS IS DUE TO CONFUSE BUG! |
| | | char buf[255]; |
| | | long int brezveze=1; |
| | | char *buf=malloc(255*sizeof(char)); |
| | | long int brezveze0=1; |
| | | long int brezveze1=1; |
| | | long int brezveze2=1; |
| | | ts_double xk0=25.0, dmax=1.67,stepsize=0.15; |
| | | *iterations=1000; |
| | | cfg_opt_t opts[] = { |
| | |
| | | CFG_SIMPLE_INT("iterations",iterations), |
| | | CFG_SIMPLE_BOOL("quiet",&quiet), |
| | | CFG_SIMPLE_STR("multiprocessing",buf), |
| | | CFG_SIMPLE_INT("smp_cores",&brezveze), |
| | | CFG_SIMPLE_INT("cluster_nodes",&brezveze), |
| | | CFG_SIMPLE_INT("distributed_processes",&brezveze), |
| | | CFG_SIMPLE_INT("smp_cores",&brezveze0), |
| | | CFG_SIMPLE_INT("cluster_nodes",&brezveze1), |
| | | CFG_SIMPLE_INT("distributed_processes",&brezveze2), |
| | | CFG_END() |
| | | }; |
| | | cfg_t *cfg; |
| | |
| | | else if(retval==CFG_PARSE_ERROR){ |
| | | fatal("Invalid tape!",100); |
| | | } |
| | | ts_vesicle *vesicle; |
| | | vesicle=initial_distribution_dipyramid(nshell,ncxmax,ncymax,nczmax,stepsize); |
| | | vesicle->nshell=nshell; |
| | | vesicle->dmax=dmax*dmax; |
| | | vesicle->bending_rigidity=xk0; |
| | |
| | | vesicle->clist->ncmax[1]=ncymax; |
| | | vesicle->clist->ncmax[2]=nczmax; |
| | | vesicle->clist->max_occupancy=8; |
| | | |
| | | cfg_free(cfg); |
| | | free(buf); |
| | | // fprintf(stderr,"NSHELL=%u\n",vesicle->nshell); |
| | | return TS_SUCCESS; |
| | | return vesicle; |
| | | |
| | | } |
| | | |
| | |
| | | ts_bool write_vertex_vtk_file(ts_vesicle *vesicle,ts_char *filename, ts_char *text); |
| | | ts_bool write_vertex_xml_file(ts_vesicle *vesicle, ts_uint timestepno); |
| | | ts_bool write_master_xml_file(ts_char *filename); |
| | | ts_bool parsetape(ts_vesicle *vesicle,ts_uint *iterations); |
| | | ts_vesicle *parsetape(ts_uint *iterations); |
| | | |
| | | |
| | | #endif |
| | |
| | | */ |
| | | |
| | | int main(int argv, char *argc[]){ |
| | | ts_uint i,n; |
| | | ts_vesicle *vesicle; |
| | | /* THIS SHOULD GO INTO UNIT TEST |
| | | ts_bool retval; |
| | | ts_uint i; |
| | | ts_vertex_list *vlist=init_vertex_list(5); |
| | | ts_vertex_list *vlist1; |
| | | ts_bond_list *blist=init_bond_list(); |
| | | ts_triangle_list *tlist=init_triangle_list(); |
| | | ts_cell_list *clist=init_cell_list(3,3,3,0.3); |
| | | ts_vesicle *vesicle; |
| | | |
| | | retval=vtx_add_cneighbour(blist,vlist->vtx[1],vlist->vtx[0]); |
| | | if(retval==TS_FAIL) printf("1. already a member or vertex is null!\n"); |
| | |
| | | |
| | | vtx_list_free(vlist1); |
| | | printf("Tests complete.\n"); |
| | | vesicle=initial_distribution_dipyramid(17,60,60,60,0.15); |
| | | //parsetape(vesicle,&i); |
| | | */ |
| | | vesicle=parsetape(&n); |
| | | |
| | | //these four must come from parsetype! |
| | | /* |
| | | vesicle->dmax=1.67*1.67; |
| | | vesicle->stepsize=0.15; |
| | | vesicle->clist->max_occupancy=8; |
| | | vesicle->bending_rigidity=25.0; |
| | | fprintf(stderr,"xk=%f",vesicle->bending_rigidity); |
| | | */ |
| | | // fprintf(stderr,"xk=%f\n",vesicle->bending_rigidity); |
| | | |
| | | centermass(vesicle); |
| | | cell_occupation(vesicle); |
| | | for(i=0;i<100;i++){ |
| | | for(i=0;i<n;i++){ |
| | | single_timestep(vesicle); |
| | | if(i%100==0){ |
| | | write_vertex_xml_file(vesicle,i/100); |