#include <BlobLite.h>
Public Member Functions | |
BlobLite () | |
~BlobLite () | |
int | load_nodes (const char *node_filename, scalar scale) |
int | load_topology (const char *topology_filename) |
int | read_nodes_from_file (FILE *trj) |
int | center_of_coord (arr3 &cm) |
Data Fields | |
int | num_nodes |
number of nodes More... | |
int | num_surface_nodes |
number of surface nodes More... | |
int | num_interior_nodes |
number of interior nodes More... | |
int | num_elements |
number of elements More... | |
int | num_surface_elements |
number of surface elements More... | |
int | num_interior_elements |
number of interior elements More... | |
int | blob_state |
state of the blob, ACTIVE is default. More... | |
scalar * | coord |
pointer with all nodes coordinates xyzxyzxyz More... | |
int * | elem |
pointer with all the element indices, n0i0 n0i1 ... n0i9 n1i0 n1i1 ... n1i9 ... nNi9. More... | |
Private Member Functions | |
int | store_index_to_elemnode (int node_index, int elem_number, int node_number) |
int | icoord_for_elem_node (int elemi, int nodei) |
BlobLite::BlobLite | ( | ) |
BlobLite constructor: Initialises all variables and pointers to 0 (or NULL). Does not perform any memory allocation.
BlobLite::~BlobLite | ( | ) |
BlobLite destructor: Deallocates memory held by arrays,
int BlobLite::center_of_coord | ( | arr3 & | cm | ) |
Calculate and return the center of coordinates
|
private |
Returns the coord index for a node nodei in element elemi to be used in coord[ ]
int BlobLite::load_nodes | ( | const char * | node_filename, |
scalar | scale | ||
) |
Opens and reads the given 'ffea node file', extracting all the nodes for this Blob. Records how many of these are surface nodes and how many are interior nodes.
int BlobLite::load_topology | ( | const char * | topology_filename | ) |
Opens and reads the given 'ffea topology file', extracting all the elements for this Blob. Records how many of these are surface elements and how many are interior elements.
int BlobLite::read_nodes_from_file | ( | FILE * | trj | ) |
Read the following num_nodes lines within the given trj file and set the coordinates of the nodes accordingly
|
private |
Part of load_topology, it stores the index of a node within the *elem list
Referenced by load_topology().
int BlobLite::blob_state |
state of the blob, ACTIVE is default.
Referenced by BlobLite(), and read_nodes_from_file().
scalar* BlobLite::coord |
pointer with all nodes coordinates xyzxyzxyz
Referenced by center_of_coord(), load_nodes(), read_nodes_from_file(), and ~BlobLite().
int* BlobLite::elem |
pointer with all the element indices, n0i0 n0i1 ... n0i9 n1i0 n1i1 ... n1i9 ... nNi9.
Referenced by icoord_for_elem_node(), load_topology(), store_index_to_elemnode(), and ~BlobLite().
int BlobLite::num_elements |
number of elements
Referenced by BlobLite(), and load_topology().
int BlobLite::num_interior_elements |
number of interior elements
Referenced by BlobLite(), and load_topology().
int BlobLite::num_interior_nodes |
number of interior nodes
Referenced by BlobLite(), and load_nodes().
int BlobLite::num_nodes |
number of nodes
Referenced by BlobLite(), center_of_coord(), load_nodes(), load_topology(), and read_nodes_from_file().
int BlobLite::num_surface_elements |
number of surface elements
Referenced by BlobLite(), and load_topology().
int BlobLite::num_surface_nodes |
number of surface nodes
Referenced by BlobLite(), and load_nodes().