Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
DislocationSegmentIO.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_DislocationSegmentIO_H_
9#define model_DislocationSegmentIO_H_
10
11#include <tuple>
12#include <sstream>
13#include <ostream>
14#include <Eigen/Dense>
15#include <set>
16#include <iomanip>
17
18namespace model
19{
20
21 template<short unsigned int dim>
23 {
24
25 typedef Eigen::Matrix<double,dim,1> VectorDim;
26// size_t loopID; // sID
27 const size_t sourceID; // sID
28 const size_t sinkID; // sID
29// int meshLocation; // mesh location
30
33
35 std::set<int> grainIDs;
36// int loopCounter;
37// bool isGlissile
38
39// /**********************************************************************/
40// template<typename LoopLinkType>
41// DislocationSegmentIO(const LoopLinkType& ll) :
42// /* init */ loopID(ll.loop()->sID),
43// /* init */ sourceID(ll.source()->sID),
44// /* init */ sinkID(ll.sink()->sID),
45// /* init */ meshLocation(ll.pLink->meshLocation())
46// {
47//
49//
50// }
51
52 /**********************************************************************/
53 DislocationSegmentIO(const size_t& sourceID_in, // position
54 const size_t& sinkID_in);
55
56// /**********************************************************************/
57// DislocationSegmentIO() :
58// /* init */ loopID(0),
59// /* init */ sourceID(0),
60// /* init */ sinkID(0),
61// /* init */ meshLocation(0)
62// {
63//
64//
65// }
66
67// /**********************************************************************/
68// DislocationSegmentIO(std::stringstream& ss) :
69// /* init */ loopID(0),
70// /* init */ sourceID(0),
71// /* init */ sinkID(0),
72// /* init */ meshLocation(0)
73// {
74// ss>>loopID;
75// ss>>sourceID;
76// ss>>sinkID;
77// ss>>meshLocation;
78// }
79
80
81 /**********************************************************************/
82 template <class T>
83 friend T& operator << (T& os, const DislocationSegmentIO<dim>& ds)
84 {
85 ds.write(os);
86 return os;
87 }
88
89 std::ostream& write(std::ostream& os) const;
90
91 };
92
93}
94#endif
95
std::ostream & write(std::ostream &os) const
Eigen::Matrix< double, dim, 1 > VectorDim
friend T & operator<<(T &os, const DislocationSegmentIO< dim > &ds)
DislocationSegmentIO(const size_t &sourceID_in, const size_t &sinkID_in)