Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
MeshNodeIO.h
Go to the documentation of this file.
1/* This file is part of MoDELib, the Mechanics Of Defects Evolution Library.
2 *
3 *
4 * MoDELib is distributed without any warranty under the
5 * GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
6 */
7
8#ifndef model_MeshNodeIO_H_
9#define model_MeshNodeIO_H_
10
11#include <tuple>
12#include <FEMnodeEvaluation.h>
13
14namespace model
15{
16
17 template<short unsigned int dim>
19 {
20
21 typedef Eigen::Matrix<double,dim,1> VectorDim;
22
23
24 size_t nodeID; // sID
26
27 /**********************************************************************/
28 template<typename ElementType>
30 /* init */ nodeID(node.pointID),
31 /* init */ displacement(node)
32 {
33
34// assert(0 && "FINISH HERE, THIS MUST BE COMPATIBLE WITH ID READER");
35
36 }
37
38 /**********************************************************************/
39 MeshNodeIO(const size_t& nodeID_in, // sID
40 const VectorDim& disp) :
41 /* init */ nodeID(nodeID_in),
42 /* init */ displacement(disp)
43 {
44
45 // assert(0 && "FINISH HERE, THIS MUST BE COMPATIBLE WITH ID READER");
46
47 }
48
49 /**********************************************************************/
51 /* init */ nodeID(0),
52 /* init */ displacement(VectorDim::Zero())
53 {
54
55
56 }
57
58 /**********************************************************************/
59 MeshNodeIO(std::stringstream& ss) :
60 /* init */ nodeID(0),
61 /* init */ displacement(VectorDim::Zero())
62 {
63 ss>>nodeID;
64 for(int d=0;d<dim;++d)
65 {
66 ss>>displacement(d);
67 }
68 }
69
70
71 /**********************************************************************/
72 template <class T>
73 friend T& operator << (T& os, const MeshNodeIO<dim>& ds)
74 {
75 os << ds.nodeID<<"\t"
76 /**/<< ds.displacement.transpose();
77 return os;
78 }
79
80 };
81
82}
83#endif
84
disp('Done integration') Is
MeshNodeIO(std::stringstream &ss)
Definition MeshNodeIO.h:59
MeshNodeIO(const FEMnodeEvaluation< ElementType, dim, 1 > &node)
Definition MeshNodeIO.h:29
friend T & operator<<(T &os, const MeshNodeIO< dim > &ds)
Definition MeshNodeIO.h:73
Eigen::Matrix< double, dim, 1 > VectorDim
Definition MeshNodeIO.h:21
MeshNodeIO(const size_t &nodeID_in, const VectorDim &disp)
Definition MeshNodeIO.h:39
VectorDim displacement
Definition MeshNodeIO.h:25
newsubseg ss[0]