Skip to content

Commit dd90cd2

Browse files
committed
MULTEM V2.1.1
1 parent bbaf79b commit dd90cd2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4377
-1110
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
*.dll
1111
*.exe
1212
*.7z
13+
*Copy*.cuh
14+
*Copy*.hpp
15+
*Copy*.cpp
1316
compile_mex_general.m
1417
mex_examples_general
1518
mex_files_general

crystalline_materials/Pt110Crystal.m

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
function [Crys3D, lx, ly, lz, a, b, c, dz] = Pt110Crystal(na, nb, nc, ncu, rms3d)
2+
CrysPar.na = na;
3+
CrysPar.nb = nb;
4+
CrysPar.nc = nc;
5+
a = 3.9242/sqrt(2);
6+
b = 3.9242;
7+
c = 3.9242/sqrt(2);
8+
CrysPar.a = a;
9+
CrysPar.b = b;
10+
CrysPar.c = c;
11+
CrysPar.nuLayer = 2;
12+
charge = 0;
13+
% Pt = 78
14+
% Z charge x y z rms3d occupancy
15+
CrysPar.uLayer(1).atoms = [78, 0.00, 0.00, 0.00, rms3d, 1.0, charge];
16+
CrysPar.uLayer(2).atoms = [78, 0.50, 0.50, 0.50, rms3d, 1.0, charge];
17+
Crys3D = il_crystal_by_layers(CrysPar);
18+
19+
dz = CrysPar.c/ncu;
20+
lx = na*CrysPar.a; ly = nb*CrysPar.b; lz = nc*CrysPar.c;

mex_examples_multem/example_crystal_by_layers.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
clc;
22
clear all;
3-
CrysPar.na = 8;
4-
CrysPar.nb = 8;
5-
CrysPar.nc = 20;
3+
CrysPar.na = 1;
4+
CrysPar.nb = 1;
5+
CrysPar.nc = 1;
66
CrysPar.a = 4.0780;
77
CrysPar.b = 4.0780;
88
CrysPar.c = 4.0780;

mex_files_multem/il_MULTEM.cu

+9-8
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#include <algorithm>
@@ -45,6 +45,7 @@ void read_input_multislice(const mxArray *mx_input_multislice, TInput_Multislice
4545
input_multislice.cpu_nthread = mx_get_scalar_field<int>(mx_input_multislice, "cpu_nthread");
4646
input_multislice.gpu_device = mx_get_scalar_field<int>(mx_input_multislice, "gpu_device");
4747
input_multislice.gpu_nstream = mx_get_scalar_field<int>(mx_input_multislice, "gpu_nstream");
48+
input_multislice.set_device();
4849

4950
input_multislice.simulation_type = mx_get_scalar_field<mt::eTEM_Sim_Type>(mx_input_multislice, "simulation_type");
5051
input_multislice.phonon_model = mx_get_scalar_field<mt::ePhonon_Model>(mx_input_multislice, "phonon_model");
@@ -129,13 +130,13 @@ void read_input_multislice(const mxArray *mx_input_multislice, TInput_Multislice
129130
input_multislice.cond_lens.zero_defocus_plane = mx_get_scalar_field<value_type_r>(mx_input_multislice, "cond_lens_zero_defocus_plane");
130131
input_multislice.cond_lens.set_input_data(input_multislice.E_0, input_multislice.grid);
131132

132-
//input_multislice.cdl_var_type = mx_get_scalar_field<mt::eLens_Var_Type>(mx_input_multislice, "cdl_var_type");
133-
//if(!input_multislice.is_whole_specimen() && full)
134-
//{
135-
// auto thickness = mx_get_matrix_field<rmatrix_r>(mx_input_multislice, "thickness");
136-
// input_multislice.thickness.resize(thickness.m_size);
137-
// std::copy(thickness.real, thickness.real + thickness.m_size, input_multislice.thickness.begin());
138-
//}
133+
// input_multislice.cdl_var_type = mx_get_scalar_field<mt::eLens_Var_Type>(mx_input_multislice, "cdl_var_type");
134+
// if(!input_multislice.is_whole_specimen() && full)
135+
// {
136+
// auto thickness = mx_get_matrix_field<rmatrix_r>(mx_input_multislice, "thickness");
137+
// input_multislice.thickness.resize(thickness.m_size);
138+
// std::copy(thickness.real, thickness.real + thickness.m_size, input_multislice.thickness.begin());
139+
// }
139140

140141
/****************************** Objective lens ********************************/
141142
input_multislice.obj_lens.m = mx_get_scalar_field<int>(mx_input_multislice, "obj_lens_m"); // momentum of the vortex

mex_files_multem/il_incident_wave.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#include "types.cuh"

mex_files_multem/il_microscope_aberrations.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#include "types.cuh"

mex_files_multem/il_projected_potential.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#include "types.cuh"

mex_files_multem/il_propagate.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#include "types.cuh"

mex_files_multem/il_specimen_slicing.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#include "types.cuh"

mex_files_multem/il_transmission_function.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#include "types.cuh"

mex_files_multem/il_wave_function.cu

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#include "types.cuh"

mex_files_multem/mex_CUDA_glnxa64.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
IVAN_CARD="-gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_35,code=&#92;&quot;sm_35,compute_35&#92;&quot; -std=c++11 $NVCC_FLAGS"
3636
SINGLE_CARD="-gencode=arch=compute_35,code=&#92;&quot;sm_35,compute_35&#92;&quot; -std=c++11 $NVCC_FLAGS"
3737
MULTI_CARD="-gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=&#92;&quot;sm_35,compute_35&#92;&quot; -gencode=arch=compute_50,code=&#92;&quot;sm_50,compute_50&#92;&quot; -std=c++11 $NVCC_FLAGS"
38-
NVCCFLAGS="$SINGLE_CARD"
38+
NVCCFLAGS="$MULTI_CARD"
3939

4040
CXXFLAGS="--compiler-options=-ansi,-fexceptions,-fPIC,-fno-omit-frame-pointer,-pthread,-std=c++11,-msse2,-mavx"
4141
INCLUDE="-I&quot;$MATLABROOT/extern/include&quot; -I&quot;$MATLABROOT/simulink/include&quot; -I&quot;$MATLABROOT/toolbox/distcomp/gpu/extern/include/&quot;"

mex_files_multem/mex_CUDA_win64.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
IVAN_CARD="-gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_35,code=&#92;&quot;sm_35,compute_35&#92;&quot;"
4242
SINGLE_CARD="-gencode=arch=compute_35,code=&#92;&quot;sm_35,compute_35&#92;&quot;"
4343
MULTI_CARD="-gencode=arch=compute_20,code=sm_20 -gencode=arch=compute_30,code=sm_30 -gencode=arch=compute_35,code=&#92;&quot;sm_35,compute_35&#92;&quot; -gencode=arch=compute_50,code=&#92;&quot;sm_50,compute_50&#92;&quot;"
44-
NVCCFLAGS="$SINGLE_CARD"
44+
NVCCFLAGS="$MULTI_CARD"
4545

4646
COMPDEFINES="--compiler-options=/D_CRT_SECURE_NO_DEPRECATE,/D_SCL_SECURE_NO_DEPRECATE,/D_SECURE_SCL=0,$MATLABMEX"
4747
COMPFLAGS="--compiler-options=/Zp8,/bigobj,/GR,/W3,/EHs,/nologo,/MD $NVCCFLAGS"

src/atom_cal.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#ifndef ATOM_CAL_H

src/atom_data.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#ifndef ATOM_DATA_H

src/atomic_cross_section.cuh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#ifndef ATOMIC_CROSS_SECTION_H

src/atomic_data.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* GNU General Public License for more details.
1414
*
1515
* You should have received a copy of the GNU General Public License
16-
* along with MULTEM. If not, see <http:// www.gnu.org/licenses/>.
16+
* along with MULTEM. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
#ifndef ATOMIC_DATA_H
@@ -131,7 +131,7 @@ namespace mt
131131
data_table.resize(c_nAtomsTypes);
132132
for(auto i = 0; i < data_table.size(); i++)
133133
{
134-
data_table[i].feg.resize(c_nAtomsIons); //-7:1:7
134+
data_table[i].feg.resize(c_nAtomsIons); // -7:1:7
135135
for(auto j = 0; j < data_table[i].feg.size(); j++)
136136
{
137137
data_table[i].feg[j].resize(6, 0);

0 commit comments

Comments
 (0)