fix: add abaqus uel wrapper contract

This commit is contained in:
김경종
2026-06-12 09:08:25 +09:00
parent 44d4ebadf8
commit d455e0843e
16 changed files with 309 additions and 48 deletions
@@ -22,10 +22,12 @@ program test_uel_3d_euler_beam_abi_adapter
u = 0.0_dp
pnewdt = 1.0_dp
lflags = 0
lflags(1) = 1
lflags(3) = 2
lflags(4) = 0
jprops = 0
call uel3deb_abi_static(rhs, amatrx, energy, 12, 1, 0, props, 9, coords, &
call uel3deb_abi_static(rhs, amatrx, energy, 12, 1, 1, props, 9, coords, &
3, 2, u, lflags, 12, 0, pnewdt, jprops, 0, status)
call assert_equal_int(status, UEL3DEB_OK, 'abi adapter source smoke status')
call assert_matrix_symmetric(amatrx, tol_symmetry, 'abi adapter source smoke K')
@@ -57,11 +57,13 @@ contains
amatrx = 999.0_dp
energy = 999.0_dp
lflags = 0
lflags(1) = 1
lflags(2) = 0
lflags(3) = lflags3
lflags(4) = 0
jprops = 0
call uel3deb_abi_static(rhs, amatrx, energy, 12, 1, 0, props, 9, coords, &
call uel3deb_abi_static(rhs, amatrx, energy, 12, 1, 1, props, 9, coords, &
3, 2, u, lflags, 12, 0, pnewdt, jprops, 0, status)
end subroutine call_adapter
@@ -8,6 +8,7 @@ program test_invalid_inputs
UEL3DEB_E010_NONPOSITIVE_PROPERTY, UEL3DEB_E011_ZERO_LENGTH, &
UEL3DEB_E012_ZERO_ORIENTATION, UEL3DEB_E013_PARALLEL_ORIENTATION, &
UEL3DEB_E014_LFLAGS2, UEL3DEB_E015_LFLAGS3, UEL3DEB_E016_NDLOAD, &
UEL3DEB_E017_LFLAGS1, UEL3DEB_E018_LFLAGS4, &
uel3deb_validate_kernel_inputs
use uel_3d_euler_beam_abi_adapter, only: uel3deb_abi_static
implicit none
@@ -60,32 +61,37 @@ contains
end subroutine test_kernel_physical_diagnostics
subroutine test_adapter_shape_and_request_diagnostics()
call expect_adapter_status(11, 1, 0, 9, 3, 2, 12, 0, 0, 0, 1, &
call expect_adapter_status(11, 1, 1, 9, 3, 2, 12, 0, 0, 1, 0, 0, 1, &
UEL3DEB_E001_NDOFEL, 'NOA-I-SHAPE-001 NDOFEL')
call expect_adapter_status(12, 1, 0, 9, 3, 1, 12, 0, 0, 0, 1, &
call expect_adapter_status(12, 1, 1, 9, 3, 1, 12, 0, 0, 1, 0, 0, 1, &
UEL3DEB_E002_NNODE, 'NOA-I-SHAPE-001 NNODE')
call expect_adapter_status(12, 1, 0, 9, 2, 2, 12, 0, 0, 0, 1, &
call expect_adapter_status(12, 1, 1, 9, 2, 2, 12, 0, 0, 1, 0, 0, 1, &
UEL3DEB_E003_MCRD, 'NOA-I-SHAPE-001 MCRD')
call expect_adapter_status(12, 1, 0, 8, 3, 2, 12, 0, 0, 0, 1, &
call expect_adapter_status(12, 1, 1, 8, 3, 2, 12, 0, 0, 1, 0, 0, 1, &
UEL3DEB_E004_NPROPS, 'NOA-I-SHAPE-001 NPROPS')
call expect_adapter_status(12, 1, 0, 9, 3, 2, 12, 0, 1, 0, 1, &
call expect_adapter_status(12, 1, 1, 9, 3, 2, 12, 0, 1, 1, 0, 0, 1, &
UEL3DEB_E005_NJPROP, 'NOA-I-SHAPE-001 NJPROP')
call expect_adapter_status(12, 1, 1, 9, 3, 2, 12, 0, 0, 0, 1, &
call expect_adapter_status(12, 1, 0, 9, 3, 2, 12, 0, 0, 1, 0, 0, 1, &
UEL3DEB_E006_NSVARS, 'NOA-I-SHAPE-001 NSVARS')
call expect_adapter_status(12, 2, 0, 9, 3, 2, 12, 0, 0, 0, 1, &
call expect_adapter_status(12, 2, 1, 9, 3, 2, 12, 0, 0, 1, 0, 0, 1, &
UEL3DEB_E007_NRHS, 'NOA-I-SHAPE-001 NRHS')
call expect_adapter_status(12, 1, 0, 9, 3, 2, 11, 0, 0, 0, 1, &
call expect_adapter_status(12, 1, 1, 9, 3, 2, 11, 0, 0, 1, 0, 0, 1, &
UEL3DEB_E008_MLVARX, 'NOA-I-SHAPE-001 MLVARX')
call expect_adapter_status(12, 1, 0, 9, 3, 2, 12, 0, 0, 1, 1, &
call expect_adapter_status(12, 1, 1, 9, 3, 2, 12, 0, 0, 3, 0, 0, 1, &
UEL3DEB_E017_LFLAGS1, 'NOA-I-LFLAGS-001 LFLAGS1')
call expect_adapter_status(12, 1, 1, 9, 3, 2, 12, 0, 0, 1, 1, 0, 1, &
UEL3DEB_E014_LFLAGS2, 'NOA-I-LFLAGS-001 LFLAGS2')
call expect_adapter_status(12, 1, 0, 9, 3, 2, 12, 0, 0, 0, 3, &
call expect_adapter_status(12, 1, 1, 9, 3, 2, 12, 0, 0, 1, 0, 3, 1, &
UEL3DEB_E015_LFLAGS3, 'NOA-I-LFLAGS-001 LFLAGS3')
call expect_adapter_status(12, 1, 0, 9, 3, 2, 12, 1, 0, 0, 1, &
call expect_adapter_status(12, 1, 1, 9, 3, 2, 12, 0, 0, 1, 0, 1, 1, &
UEL3DEB_E018_LFLAGS4, 'NOA-I-LFLAGS-001 LFLAGS4')
call expect_adapter_status(12, 1, 1, 9, 3, 2, 12, 1, 0, 1, 0, 1, 0, &
UEL3DEB_E016_NDLOAD, 'NOA-I-LFLAGS-001 NDLOAD')
end subroutine test_adapter_shape_and_request_diagnostics
subroutine expect_adapter_status(ndofel, nrhs, nsvars, nprops, mcrd, nnode, &
mlvarx, ndload, njprop, lflag2, lflag3, &
mlvarx, ndload, njprop, lflag1, lflag2, &
lflag3, lflag4, &
expected_status, message)
integer, intent(in) :: ndofel
integer, intent(in) :: nrhs
@@ -96,8 +102,10 @@ contains
integer, intent(in) :: mlvarx
integer, intent(in) :: ndload
integer, intent(in) :: njprop
integer, intent(in) :: lflag1
integer, intent(in) :: lflag2
integer, intent(in) :: lflag3
integer, intent(in) :: lflag4
integer, intent(in) :: expected_status
character(len=*), intent(in) :: message
real(dp) :: rhs(12, 2)
@@ -118,8 +126,10 @@ contains
u = 0.0_dp
pnewdt = 1.0_dp
lflags = 0
lflags(1) = lflag1
lflags(2) = lflag2
lflags(3) = lflag3
lflags(4) = lflag4
jprops = 0
call uel3deb_abi_static(rhs, amatrx, energy, ndofel, nrhs, nsvars, props, &