BlobLite.h
Go to the documentation of this file.
1 //
2 // This file is part of the FFEA simulation package
3 //
4 // Copyright (c) by the Theory and Development FFEA teams,
5 // as they appear in the README.md file.
6 //
7 // FFEA is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // FFEA is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with FFEA. If not, see <http://www.gnu.org/licenses/>.
19 //
20 // To help us fund FFEA development, we humbly ask that you cite
21 // the research papers on the package.
22 //
23 
24 #include <cstring>
25 #include <iostream>
26 #include "mat_vec_types.h"
27 #include "mat_vec_fns_II.h"
28 #include "FFEA_return_codes.h"
29 #include "dimensions.h"
30 
31 using std::cout;
32 using std::endl;
33 
34 #define NUM_NODES_QUADRATIC_TET 10
35 
36 class BlobLite {
37 public:
41  BlobLite();
44  ~BlobLite();
45 
48  int load_nodes(const char *node_filename, scalar scale);
51  int load_topology(const char *topology_filename);
54  int read_nodes_from_file(FILE *trj);
56  int center_of_coord(arr3 &cm);
57 
58  int num_nodes;
64  int blob_state;
65 
67  int *elem;
68 
69 private:
71  int store_index_to_elemnode(int node_index, int elem_number, int node_number);
73  int icoord_for_elem_node(int elemi, int nodei);
74 
75 };
76 
int num_surface_nodes
number of surface nodes
Definition: BlobLite.h:59
Definition: BlobLite.h:36
int num_nodes
number of nodes
Definition: BlobLite.h:58
int * elem
pointer with all the element indices, n0i0 n0i1 ... n0i9 n1i0 n1i1 ... n1i9 ... nNi9.
Definition: BlobLite.h:67
int num_interior_nodes
number of interior nodes
Definition: BlobLite.h:60
int blob_state
state of the blob, ACTIVE is default.
Definition: BlobLite.h:64
int num_elements
number of elements
Definition: BlobLite.h:61
int load_nodes(const char *node_filename, scalar scale)
Definition: BlobLite.cpp:172
int num_surface_elements
number of surface elements
Definition: BlobLite.h:62
scalar arr3[3]
Definition: mat_vec_types.h:70
~BlobLite()
Definition: BlobLite.cpp:37
int center_of_coord(arr3 &cm)
Definition: BlobLite.cpp:316
int load_topology(const char *topology_filename)
Definition: BlobLite.cpp:42
BlobLite()
Definition: BlobLite.cpp:26
scalar * coord
pointer with all nodes coordinates xyzxyzxyz
Definition: BlobLite.h:66
int store_index_to_elemnode(int node_index, int elem_number, int node_number)
Definition: BlobLite.cpp:163
int read_nodes_from_file(FILE *trj)
Definition: BlobLite.cpp:263
double scalar
Definition: mat_vec_types.h:36
int icoord_for_elem_node(int elemi, int nodei)
Definition: BlobLite.cpp:310
int num_interior_elements
number of interior elements
Definition: BlobLite.h:63