|
GraphNet: Discrete element modeling for network connected materials
Applications to polymeric networks
|
#include <iostream>#include <cmath>#include <cstdlib>#include <math.h>#include <random>#include <time.h>#include <vector>#include <unistd.h>#include <algorithm>#include <ctime>#include <chrono>#include <fstream>#include <sstream>#include <string>#include <cstring>#include <stddef.h>#include "vel.h"#include "params.h"

Go to the source code of this file.
Functions | |
| int | get_num_vertices (int elem_type) |
| bool | contains (vector< int > &vec, int elem) |
| float | getnorm (const float *vec, const int dim=DIM) |
| void | mapping (int &edge_counter, int elem_type, int n_vertices, stringstream &input, int *edges) |
| Converts mesh elements from GMSH file to edges and nodes. Only implemented elements of <element-id> = 2 or 3. Need to extend for 3D. More... | |
| string | read_dump (int &n_nodes, int &n_elems, string &fname) |
| Reads the number of nodes and poly chains left at the end of previous simulation. The code does not take care of parameters. Assumes user will change params.h file while restarting the previous simulation. More... | |
| void | mapping (int &edge_counter, int elem_type) |
| Reads the number of edges in elements. Only implemented elements of <element-id> = 2 or 3. More... | |
| void | read_n (int &n_nodes, int &n_elems, string &fname) |
| Reads the number of nodes and edges according to the .msh file. Useful for allocating memory in the class' constructors. More... | |
| void | take_input (float *R, int *edges, int n_nodes, int n_elems, string &fname) |
| Reads the input and converts to appropriate network data. More... | |
| void | __init__ (float *L, float *damage, bool *PBC, int n_elems) |
| Initializes various properties for each edge in the graph. More... | |
| int | filename (const string &) |
| Gives an integer value to be appended to the network dump filename. More... | |
| void | normalize_vector (float *result, const float *vec) |
| bool | does_file_exist (string &fname) |
| void | normalize_vector (float *vec) |
| void | unitvector (float *result, float *r1, float *r2) |
| float | force_wlc (float x, float L) |
| void | convert_to_vector (float *result, const float mag, const float *direction) |
| float | dist (const float *r1, const float *r2) |
| void | forcevector (float *result, float *r1, float *r2, float L) |
| Gives a force vector given the nodes and the contour length of the polymer connecting these. More... | |
| bool | ismember (int item, int *array, size_t size) |
| float | getabsmax (float *arr, size_t sizeofarr) |
| Gets the absolute maximum of an array. More... | |
| template<typename t > | |
| void | write_to_file (string &fname, t *arr, int rows, int cols) |
| float | kf (float force) |
| float | kfe (float force_mag) |
| void | __init__ (float *L, int *m, float *damage, float *sacdamage, bool *PBC, int n_elems) |
| Overrides init for sacNetworks. More... | |
| void __init__ | ( | float * | L, |
| float * | damage, | ||
| bool * | PBC, | ||
| int | n_elems | ||
| ) |
Initializes various properties for each edge in the graph.
| void __init__ | ( | float * | L, |
| int * | m, | ||
| float * | damage, | ||
| float * | sacdamage, | ||
| bool * | PBC, | ||
| int | n_elems | ||
| ) |
Overrides init for sacNetworks.
|
inline |
|
inline |
|
inline |
|
inline |
| int filename | ( | const string & | ) |
Gives an integer value to be appended to the network dump filename.
|
inline |
| void forcevector | ( | float * | result, |
| float * | r1, | ||
| float * | r2, | ||
| float | L | ||
| ) |
Gives a force vector given the nodes and the contour length of the polymer connecting these.
|
inline |
| float getabsmax | ( | float * | arr, |
| size_t | sizeofarr | ||
| ) |
Gets the absolute maximum of an array.
|
inline |
|
inline |
|
inline |
|
inline |
| void mapping | ( | int & | edge_counter, |
| int | elem_type, | ||
| int | n_vertices, | ||
| stringstream & | input, | ||
| int * | edges | ||
| ) |
Converts mesh elements from GMSH file to edges and nodes. Only implemented elements of <element-id> = 2 or 3. Need to extend for 3D.
| void mapping | ( | int & | edge_counter, |
| int | elem_type | ||
| ) |
Reads the number of edges in elements. Only implemented elements of <element-id> = 2 or 3.
|
inline |
|
inline |
| string read_dump | ( | int & | n_nodes, |
| int & | n_elems, | ||
| string & | fname | ||
| ) |
Reads the number of nodes and poly chains left at the end of previous simulation. The code does not take care of parameters. Assumes user will change params.h file while restarting the previous simulation.
| void read_n | ( | int & | n_nodes, |
| int & | n_elems, | ||
| string & | fname | ||
| ) |
Reads the number of nodes and edges according to the .msh file. Useful for allocating memory in the class' constructors.
| void take_input | ( | float * | R, |
| int * | edges, | ||
| int | n_nodes, | ||
| int | n_elems, | ||
| string & | fname | ||
| ) |
Reads the input and converts to appropriate network data.
|
inline |
| void write_to_file | ( | string & | fname, |
| t * | arr, | ||
| int | rows, | ||
| int | cols | ||
| ) |
1.8.11