Skip to content

Commit cc037ca

Browse files
committed
Finish test "Test solving elastic constants on KNO₂ (Cm structure)"
1 parent e192a5f commit cc037ca

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/solve.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Unitful: ustrip, @u_str
22
using UnitfulAtomic
33

4-
using LinearElasticity.Symmetry: Hexagonal, hassymmetry
4+
using LinearElasticity.Symmetry: Hexagonal, Monoclinic, hassymmetry
55
using LinearElasticity.Solve: solve_elastic_constants
66

77
@testset "Test solving elastic constants on GaN (P6₃mc structure)" begin
@@ -76,5 +76,15 @@ end
7676
EngineeringStress(1.121e-5, 1.292e-5, 8.85e-6, 5.0e-8, -2.1e-7, -2.26e-6),
7777
EngineeringStress(1.12e-5, 1.292e-5, 8.85e-6, -5.0e-8, -2.1e-7, 2.26e-6),
7878
]
79+
stiffness_matrix = -solve_elastic_constants(strains, stresses, Monoclinic())
7980
# Reference values: https://materialsproject.org/materials/mp-34857?formula=KNO2#elastic_constants
81+
@test ustrip(u"GPa".(stiffness_matrix * u"Ry/bohr^3")) [
82+
40.483317598564604 7.7818586517589665 5.803295346160516 0 1.3386562141967226 -0.0
83+
7.7818586517589665 36.84982216003065 16.46105828226519 0 -0.35305218835957425 -0.0
84+
5.803295346160516 16.46105828226519 21.492051966389127 0 -0.45602574329778384 -0.0
85+
0 0 0 6.38436040616898 0 -0.02942101569663098
86+
1.3386562141967226 -0.35305218835957425 -0.45602574329778384 0 1.2356826592585122 -0.0
87+
0 0 0 -0.02942101569663098 0 6.649149547438664
88+
]
89+
@test hassymmetry(stiffness_matrix, Monoclinic())
8090
end

0 commit comments

Comments
 (0)