Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
SphericalInclusionDensitySpecification.cpp
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_SphericalInclusionDensitySpecification_cpp_
9#define model_SphericalInclusionDensitySpecification_cpp_
10
12
13namespace model
14{
16 /* init */ MicrostructureSpecificationBase("SphericalInclusion","Density")
17 /* init */,targetDensity(0.0)
21 /* init */,crystalEigenDistortion(Eigen::Matrix<double,1,dim*dim>::Zero())
22 /* init */,patternVector_SI(Eigen::Matrix<double,1,dim>::Zero())
23 /* init */,allowOverlap(false)
24 /* init */,allowOutside(false)
25 /* init */,velocityReductionFactor(1.0)
26 /* init */,phaseID(-1)
27 {
28
29 }
30
32 /* init */ MicrostructureSpecificationBase("SphericalInclusion","Density",fileName)
33 /* init */,targetDensity(this->parser->readScalar<double>("targetDensity",true))
34 /* init */,diameterLognormalDistribution_M(targetDensity>0.0? this->parser->readScalar<double>("diameterLognormalDistribution_M",true) : 0.0 )
35 /* init */,diameterLognormalDistribution_S(targetDensity>0.0? this->parser->readScalar<double>("diameterLognormalDistribution_S",true) : 0.0)
36 /* init */,diameterLognormalDistribution_A(targetDensity>0.0? this->parser->readScalar<double>("diameterLognormalDistribution_A",true) : 0.0)
37 /* init */,crystalEigenDistortion(targetDensity>0.0? this->parser->readMatrix<double>("crystalEigenDistortion",1,dim*dim,true) : Eigen::Matrix<double,1,dim*dim>::Zero())
38 /* init */,patternVector_SI(targetDensity>0.0? this->parser->readMatrix<double>("patternVector_SI",1,dim,true) : Eigen::Matrix<double,1,dim>::Zero())
39 /* init */,allowOverlap(targetDensity>0.0? this->parser->readScalar<int>("allowOverlap",true) : false)
40 /* init */,allowOutside(targetDensity>0.0? this->parser->readScalar<int>("allowOutside",true) : false)
41 /* init */,velocityReductionFactor(targetDensity>0.0? this->parser->readScalar<double>("velocityReductionFactor",true) : 1.0)
42 /* init */,phaseID(targetDensity>0.0? this->parser->readScalar<int>("phaseID",true) : -1)
43 {
44
45 }
46}
47#endif
const std::unique_ptr< TextFileParser > parser
MicrostructureSpecificationBase(const std::string &type_in, const std::string &style_in)