Skip to content

Commit 0309851

Browse files
committed
Fixed umat test
1 parent 8f5f576 commit 0309851

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/unit_tests/Physics/Material/Material_Models/ut_Correspondence_UMAT.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ end
4242
test_1[1] = 7.3
4343
test_2 = test_Data_manager.create_constant_node_field("test_field_3", Float64, 1)
4444
test_2 .= 3
45-
mat_dict = Dict{String,Any}("File" => file, "UMAT name"=>"test_sub", "Number of Properties" => 3, "Property_1" => 2, "Property_2" => 2, "Property_3" => 2.4, "Predefined Field Names" => "test_field_2 test_field_3")
45+
mat_dict = Dict{String,Any}("File" => file, "UMAT name" => "test_sub", "Number of Properties" => 3, "Property_1" => 2, "Property_2" => 2, "Property_3" => 2.4, "Predefined Field Names" => "test_field_2 test_field_3")
4646
Correspondence_UMAT.init_material_model(test_Data_manager, Vector{Int64}(1:nodes), mat_dict)
4747
fields = test_Data_manager.get_field("Predefined Fields")
4848
inc = test_Data_manager.get_field("Predefined Fields Increment")
@@ -67,9 +67,9 @@ end
6767
# Test wrapper function for UMAT_interface
6868
@testset "UMAT_interface Tests" begin
6969
# Example test case (you should define your own)
70-
file = "./src/Physics/Material/UMATs/libusertest.so"
70+
file = "../../../../../src/Physics/Material/UMATs/libusertest.so"
7171
if !isfile(file)
72-
file = "../src/Physics/Material/UMATs/libusertest.so"
72+
file = "./src/Physics/Material/UMATs/libusertest.so"
7373
end
7474
function_name::String = "UMATTEST"
7575
STRESS::Vector{Float64} = zeros(Float64, 6) # Example initialization, adjust the size as needed
@@ -110,9 +110,9 @@ end
110110
JSTEP::Int64 = 1
111111
KINC::Int64 = 1
112112
# Call the UMAT_interface
113-
PROPS[1]=4.2
114-
STRAN[1]=1
115-
DSTRAN[1]=3
113+
PROPS[1] = 4.2
114+
STRAN[1] = 1
115+
DSTRAN[1] = 3
116116
Correspondence_UMAT.UMAT_interface(file, function_name, STRESS, STATEV, DDSDDE, SSE, SPD, SCD, RPL, DDSDDT, DRPLDE, DRPLDT, STRAN, DSTRAN, TIME, DTIME, TEMP, DTEMP, PREDEF, DPRED, CMNAME, NDI, NSHR, NTENS, NSTATEV, PROPS, NPROPS, COORDS, DROT, PNEWDT, CELENT, DFGRD0, DFGRD1, NOEL, NPT, LAYER, KSPT, JSTEP, KINC)
117117

118118
@test STRESS[1] == 0

0 commit comments

Comments
 (0)