Reconstruct grain boundary energy from triple junction geometries [1,2].
This package is an implementation of the regularization based reconstruction method, which is described in paper [1]. Many functions are borrowed from Adam Morawiec's Fortran implementation of his paper [2]. Moreover, the file "Src/myLOBPCG_new.py" is scipy's implementation with minor modification.
This package consists of three parts:
The development of this package was supported by the National Science Foundation of the United States of America under grant DMR-1628994.
numpy
pip install numpy
scipy
pip install scipy
Step 0: Download the code.
git clone --depth=1 https://github.com/Yufeng-shen/TJ2GBE.git
Step 1: Compile the C++ code. (Thanks to @sgbaird, we find that C++11 is required)
cd Src/Cpp/
g++ -std=c++11 -o ../../bin/TJ2GBE.out main.cpp tj.cpp subdomain.cpp config.cpp -fopenmp
Step 2: Run the executable file with configure file.
cd ../../bin/
./TJ2GBE.out ../CfgFile/Cubic.config
The output files "rowA.binary", "colA.binary" and "valA.binary" are going to be used by Pythoon reconstruction script, the "NN.txt" is used for tunning the "threshold" value in the configure file.
Step 3: Change the parameters (at the top of the script) and run the reconstruction script.
cd ../Src/Python/
python Reconstruction.py
It will output the reconstructed energy for every grain boundary in the data set and a .gbdat file for plotting.
For the example data of "TJdata/triples_30000.dat", the reconstructed grain boundary energy function with Σ7 misorientation is shown as following: Figures are plotted by a modified version of Krzysztof Glowinski's GBToolbox.
Compile the fortran code
cd Src/Fortran/minuit-master
make
cd ..
gfortran -o Torq_gen.out -l minuit -Lminuit-master
Run the simulation
./Torq_gen.out filename 10
where "filename" is the filename of the output, it must be 8 letters, "10" is the number of triple junctions, can be any number. This program will generate the ground truth file along with the triple junctions file.
There are two differences between the cell indexing in Morawiec's Fortran implementation of the paper [2] and this implementation:
In this implementation, cell index starts with 0 instead of 1.
In function "find_symeq_num", the second and fourth parameters are defined as "1-cos(af)" instead of "cos(af)".
BSD 3 Cluase License
[1] "Determining grain boundary energies from triple junction geometries without discretizing the five-parameter space" Acta Materialia 166, 126-134 (2019).
[2] "Method to calculate the grain boundary energy distribution over the space of macroscopic boundary parameters from the geometry of triple junctions" Acta Materialia, 48 (2000) 3525-3532