#include #include "general.h" #include "vertex.h" #include "cell.h" char plugin_name[] = "Plane confimenent"; char plugin_description[]= "Confines vesicle between two planes d/2 above z=0 and d/2 below z=0. The plates squeeze vesicle with some predefined force."; char plugin_author[] = "SAMO PENIC"; ts_plugin_details *init (){ ts_plugin_details *details=(ts_plugin_details *)calloc(1,sizeof(ts_plugin_details)); details->name = plugin_name; return details; } ts_bool vm_hard_constraint(ts_vesicle *vesicle, ts_vertex *vtx, ts_vertex *ovtx){ // plane confinement check whether the new position of vertex will be out of bounds if(vesicle->tape->plane_confinement_switch){ if(vtx->z>vesicle->confinement_plane.z_max || vtx->zconfinement_plane.z_min){ return TS_FAIL; } } return TS_SUCCESS; }