8#ifndef _model_DislocationMobilityInterpolated_cpp_
9#define _model_DislocationMobilityInterpolated_cpp_
19 const std::shared_ptr<InterpolantBase>& interpolant_in,
20 const std::map<
double,std::shared_ptr<DislocationMobilityBase>>& mobilityMap_in,
21 const bool& logSpace_in):
29 if(mobilityMap.begin()->first<0.0 && mobilityMap.rbegin()->first>std::numbers::pi)
31 throw std::runtime_error(
"DislocationMobilityInterpolated: breakpoints must be between 0 and 180 deg.");
36 throw std::runtime_error(
"DislocationMobilityInterpolated: mobilityMap is empty.");
48 const std::shared_ptr<StochasticForceGenerator>& sfg)
const
55 const double v(mob.second->velocity(
S,
b,n,T,dL,dt,sfg));
58 throw std::runtime_error(
"DislocationMobilityInterpolated: v<0.0 incompatible with logSpace interpolation.");
67 interpolant->at(mob.first)=mob.second->velocity(
S,
b,n,T,dL,dt,sfg);
74 const double angleRad(std::atan2(unitB.cross(
xi).dot(n), unitB.dot(
xi)));
DislocationMobility(const std::string &name_in)
Eigen::Matrix< double, 3, 3 > MatrixDim
Eigen::Matrix< double, 3, 1 > VectorDim
DislocationMobilityInterpolated(const PolycrystallineMaterialBase &material, const std::shared_ptr< InterpolantBase > &interpolant_in, const std::map< double, std::shared_ptr< DislocationMobilityBase > > &mobilityMap_in, const bool &logSpace_in=false)
double velocity(const MatrixDim &S, const VectorDim &b, const VectorDim &xi, const VectorDim &n, const double &T, const double &dL, const double &dt, const std::shared_ptr< StochasticForceGenerator > &sfg) const override
const std::map< double, std::shared_ptr< DislocationMobilityBase > > mobilityMap
const std::shared_ptr< InterpolantBase > interpolant