| 1 |
/* |
| 2 |
* Advanced Simulation Library <http://asl.org.il> |
| 3 |
* |
| 4 |
* Copyright 2015 Avtech Scientific <http://avtechscientific.com> |
| 5 |
* |
| 6 |
* |
| 7 |
* This file is part of Advanced Simulation Library (ASL). |
| 8 |
* |
| 9 |
* ASL is free software: you can redistribute it and/or modify it |
| 10 |
* under the terms of the GNU Affero General Public License as |
| 11 |
* published by the Free Software Foundation, version 3 of the License. |
| 12 |
* |
| 13 |
* ASL is distributed in the hope that it will be useful, |
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
* GNU Affero General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU Affero General Public License |
| 19 |
* along with ASL. If not, see <http://www.gnu.org/licenses/>. |
| 20 |
* |
| 21 |
*/ |
| 22 |
|
| 23 |
|
| 24 |
#ifndef ASLLSFACETEDGROWTH_H |
| 25 |
#define ASLLSFACETEDGROWTH_H |
| 26 |
|
| 27 |
#include "aslLevelSetLinear.h" |
| 28 |
#include <math/aslVectorsDynamicLength.h> |
| 29 |
|
| 30 |
namespace acl |
| 31 |
{ |
| 32 |
class ExpressionContainer; |
| 33 |
} |
| 34 |
|
| 35 |
namespace asl |
| 36 |
{ |
| 37 |
|
| 38 |
/// describes crystalographyly specific date |
| 39 |
/** |
| 40 |
*/ |
| 41 |
class CrystallographicParameters |
| 42 |
{ |
| 43 |
public: |
| 44 |
vector<AVec<>> directions; |
| 45 |
vector<double> betaSt; |
| 46 |
vector<double> betaDisl; |
| 47 |
double betaRough; |
| 48 |
private: |
| 49 |
acl::VectorOfElements directionsACL; |
| 50 |
acl::VectorOfElements betaStACL; |
| 51 |
acl::VectorOfElements betaDislACL; |
| 52 |
public: |
| 53 |
|
| 54 |
/// generates code which results the number corresponds to nearest direction |
| 55 |
void directionCode(acl::VectorOfElements normal, |
| 56 |
acl::VectorOfElements direction, |
| 57 |
acl::VectorOfElements cosTheta, |
| 58 |
acl::ExpressionContainer & k); |
| 59 |
CrystallographicParameters (const vector<AVec<>> & dir, |
| 60 |
const vector<double> & bSt, |
| 61 |
const vector<double> & bDisl, |
| 62 |
const double bRough); |
| 63 |
CrystallographicParameters (const double bRough); |
| 64 |
CrystallographicParameters (); |
| 65 |
acl::VectorOfElements velocity(acl::VectorOfElements supersaturation, |
| 66 |
acl::VectorOfElements dir, |
| 67 |
acl::VectorOfElements sinTheta); |
| 68 |
acl::VectorOfElements velocity(const acl::VectorOfElements & supersaturation, |
| 69 |
const acl::VectorOfElements & dir, |
| 70 |
const acl::VectorOfElements & sinTheta, |
| 71 |
const acl::VectorOfElements & stepVelocityLimit); |
| 72 |
acl::VectorOfElements stepFactor(const acl::VectorOfElements & dir, |
| 73 |
const acl::VectorOfElements & position); |
| 74 |
|
| 75 |
/// adds new facet information |
| 76 |
/** |
| 77 |
\param normal should be a unit vector |
| 78 |
*/ |
| 79 |
void addFacet(const AVec<> normal, double bSt, double bDisl); |
| 80 |
/// initialize acl data |
| 81 |
void init(acl::TypeID type); |
| 82 |
}; |
| 83 |
|
| 84 |
|
| 85 |
/// Numerical method which computes evolution of an interface with a crystalographic kinetics |
| 86 |
/** |
| 87 |
\ingroup InterfaceTracking |
| 88 |
\ingroup NumMethods |
| 89 |
\ingroup LevelSet |
| 90 |
*/ |
| 91 |
class LSFacetedGrowth: public LevelSetLinear |
| 92 |
{ |
| 93 |
public: |
| 94 |
typedef SPDataWithGhostNodesACLData Data; |
| 95 |
typedef SPDataWithGhostNodesACL DataGen; |
| 96 |
|
| 97 |
CrystallographicParameters crystallography; |
| 98 |
protected: |
| 99 |
DataGen superSaturation; |
| 100 |
|
| 101 |
virtual void initVelocityComputation(); |
| 102 |
public: |
| 103 |
|
| 104 |
LSFacetedGrowth(); |
| 105 |
/** |
| 106 |
\param d is points position |
| 107 |
\param c is super saturation field |
| 108 |
*/ |
| 109 |
LSFacetedGrowth(Data df, DataGen c); |
| 110 |
~LSFacetedGrowth(); |
| 111 |
}; |
| 112 |
|
| 113 |
typedef std::shared_ptr<LSFacetedGrowth> SPLSFacetedGrowth; |
| 114 |
|
| 115 |
} //asl |
| 116 |
|
| 117 |
#endif //ASLLSFACETEDGROWTH_H |