commit | author | age
|
b5cd8c
|
1 |
#include <stdlib.h> |
SP |
2 |
#include "general.h" |
|
3 |
#include "vertex.h" |
|
4 |
#include "cell.h" |
|
5 |
char plugin_name[] = "Plane confimenent"; |
|
6 |
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."; |
|
7 |
char plugin_author[] = "SAMO PENIC"; |
|
8 |
|
|
9 |
ts_plugin_details *init (){ |
|
10 |
ts_plugin_details *details=(ts_plugin_details *)calloc(1,sizeof(ts_plugin_details)); |
|
11 |
details->name = plugin_name; |
|
12 |
return details; |
|
13 |
} |
|
14 |
|
|
15 |
ts_bool vm_hard_constraint(ts_vesicle *vesicle, ts_vertex *vtx, ts_vertex *ovtx){ |
|
16 |
|
|
17 |
// plane confinement check whether the new position of vertex will be out of bounds |
|
18 |
if(vesicle->tape->plane_confinement_switch){ |
|
19 |
if(vtx->z>vesicle->confinement_plane.z_max || vtx->z<vesicle->confinement_plane.z_min){ |
|
20 |
return TS_FAIL; |
|
21 |
} |
|
22 |
} |
|
23 |
|
|
24 |
return TS_SUCCESS; |
|
25 |
} |
|
26 |
|