Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
PolyhedronInclusionIO.cpp
Go to the documentation of this file.
1/* This file is part of MoDELib, distributed under GNU GPL v2. */
4
5namespace model
6{
7
8 template <short unsigned int dim>
13
14 template <short unsigned int dim>
15 PolyhedronInclusionIO<dim>::PolyhedronInclusionIO(const size_t &inclusionID_in, const MatrixDim &eT_in,
16 const double &mobilityReduction_in, const int &phaseID_in)
17 : inclusionID(inclusionID_in), eT(eT_in), mobilityReduction(mobilityReduction_in), phaseID(phaseID_in)
18 {
19 }
20
21 template <short unsigned int dim>
26
27 template <short unsigned int dim>
29 : inclusionID(0), eT(MatrixDim::Zero()), mobilityReduction(1.0), phaseID(0)
30 {
31 ss >> inclusionID;
32 for (int i = 0; i < dim; ++i)
33 {
34 for (int j = 0; j < dim; ++j)
35 {
36 double temp;
37 ss >> temp;
38 eT(i, j) = temp;
39 }
40 }
42 ss >> phaseID;
43 }
44
45 template <short unsigned int dim> void PolyhedronInclusionIO<dim>::write(std::ostream &os) const
46 {
47 os << inclusionID << "\t";
48 for (int d = 0; d < dim; ++d)
49 {
50 os << std::setprecision(15) << std::scientific << eT.row(d) << "\t";
51 }
52 os << std::setprecision(15) << std::scientific << mobilityReduction
53 << "\t"
54 /**/
55 << phaseID;
56 return;
57 }
58 template struct PolyhedronInclusionIO<3>;
59
60} // namespace model
Eigen::Matrix< double, dim, dim > MatrixDim
void write(std::ostream &os) const
int j
newsubseg ss[0]
int i
vertex temp