Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
DislocationFieldBase.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_DislocationFieldBase_cpp_
9#define _model_DislocationFieldBase_cpp_
10
12#include <TextFileParser.h>
13
14namespace model
15{
16
17
18
19 template<int dim>
20 void DislocationFieldBase<dim>::initFromFile(const std::string& fileName)
21 {
22
23 a=TextFileParser(fileName).readScalar<double>("coreSize",false);
24 assert(a>0.0 && "coreSize MUST BE > 0.");
25 a2=a*a;
26 }
27
28
29template struct DislocationFieldBase<3>;
31// template<int dim>
32// double DislocationFieldBase<dim>::a=1.0;
33//
34// //! Dislocation core size squared
35// template<int dim>
36// double DislocationFieldBase<dim>::a2=1.0;
37//
38// //! Identity matrix
39// template<int dim>
40// const Eigen::Matrix<double,dim,dim> DislocationFieldBase<dim>::I=Eigen::Matrix<double,dim,dim>::Identity();
41
42} // close namespace
43#endif
44
45
46
Scalar readScalar(const std::string &key, const bool &verbose=false)
static void initFromFile(const std::string &fileName)
dim x dim identity matrix
static double a2
Dislocation core size squared.
static double a
Dislocation core size.