49 Network(
string& fname,
bool from_dump =
false);
52 virtual void build_network();
54 void remove_duplicates(
int&);
56 void add_long_range_egdes_y(
int,
float);
57 void add_long_range_egdes_random(
int,
float);
58 void load_from_dump(
string&);
60 virtual void load_network(
string&);
61 virtual void malloc_network();
62 void make_edge_connections(
float dely_allowed = 10.0);
63 virtual void get_forces(
bool);
64 virtual void move_top_plate();
65 virtual void get_plate_forces(
float*,
int);
66 virtual void optimize(
float eta = 0.1,
float alpha = 0.9,
int max_iter = 800);
67 virtual void qd_optimize(
float C = 0.001,
int max_iter = 800);
71 float set_weight(
float);
72 bool get_stats(
float force_threshold = 1000.0);
73 int get_current_edges();
74 virtual void plotNetwork(
int,
bool);
76 void copy(
Network const & source);
77 void dump(
int,
bool first_time =
false);
105 float weight_multiplier = 1.0;
int n_lside
Stores number of crosslinker nodes on the left edge of the network sample.
Definition: network.h:84
float * forces
Stores the forces on all nodes of the network in a flat n_nodes*DIM size array.
Definition: network.h:91
float * R
Stores the position of all nodes of the graph in a flat n_nodes*DIM size array.
Definition: network.h:88
int * rsideNodes
Stores index of crosslinker nodes on the right edge of the network sample.
Definition: network.h:97
#define vel_y
Definition: vel.h:9
int * edges
Stores the i,j pairs that form edges, size is n_elems*2.
Definition: network.h:89
const float PBC_vector[DIM]
Definition: network.h:31
#define vel_x
Definition: vel.h:8
float * L
Stores the contour length of the edge.
Definition: network.h:93
int * moving_nodes
Stores index of all nodes where no boundary condition is applied (i.e. they participate in optimizati...
Definition: network.h:108
Defines a crack in terms of 2D ellipses.
bool initialized
Internal variable to check if Network object is initialized.
Definition: network.h:101
int n_tside
Stores number of crosslinker nodes on the top edge of the network sample.
Definition: network.h:86
int n_rside
Stores number of crosslinker nodes on the right edge of the network sample.
Definition: network.h:83
bool * PBC
Tag to check if an edge is a periodic boundary condition edge.
Definition: network.h:94
int n_nodes
Stores number of crosslinker nodes in the network.
Definition: network.h:80
int * bsideNodes
Stores index of crosslinker nodes on the bottom edge of the network sample.
Definition: network.h:99
float * damage
Stores the damage in each edge of the network.
Definition: network.h:92
int * lsideNodes
Stores index of crosslinker nodes on the left edge of the network sample.
Definition: network.h:96
int n_moving
Stores number of moving nodes.
Definition: network.h:109
#define MAXBOUND_Y
Definition: params.h:12
bool cracked
Flag to check if the network has cracks.
Definition: network.h:79
int n_elems
Stores number of polymer connections in the network.
Definition: network.h:81
int * tsideNodes
Stores index of crosslinker nodes on the top edge of the network sample.
Definition: network.h:98
float __init_force
Initial force on the plate (simulation stopped if force goes below this.)
Definition: network.h:103
#define DIM
Definition: params.h:4
#define MAXBOUND_X
Definition: params.h:11
const float vel[DIM]
Definition: network.h:32
int n_bside
Stores number of crosslinker nodes on the bottom edge of the network sample.
Definition: network.h:85