如上所述我试图使用可分配数组来运行vumat。我需要存储和重用某些值的历史记录,因此我尝试了可分配的数组:
C
subroutine vumat(
C Read only -
1 nblock, ndir, nshr, nstatev, nfieldv, nprops, lanneal,
2 stepTime, totalTime, dt, cmname, coordMp, charLength,
3 props, density, strainInc, relSpinInc,
4 tempOld, stretchOld, defgradOld, fieldOld,
5 stressOld, stateOld, enerInternOld, enerInelasOld,
6 tempNew, stretchNew, defgradNew, fieldNew,
C Write only -
7 stressNew, stateNew, enerInternNew, enerInelasNew )
C
include 'vaba_param.inc'
#include <SMAAspUserSubroutines.hdr>
dimension props(nprops), density(nblock), coordMp(nblock,*),
1 charLength(nblock), strainInc(nblock,ndir+nshr),
2 relSpinInc(nblock,nshr), tempOld(nblock),
3 stretchOld(nblock,ndir+nshr),
4 defgradOld(nblock,ndir+nshr+nshr),
5 fieldOld(nblock,nfieldv), stressOld(nblock,ndir+nshr),
6 stateOld(nblock,nstatev), enerInternOld(nblock),
7 enerInelasOld(nblock), tempNew(nblock),
8 stretchNew(nblock,ndir+nshr),
8 defgradNew(nblock,ndir+nshr+nshr),
9 fieldNew(nblock,nfieldv),
1 stressNew(nblock,ndir+nshr), stateNew(nblock,nstatev),
2 enerInternNew(nblock), enerInelasNew(nblock)
c ID & Contents of lStatusArray
parameter ( j_iID_lStatusArray = 1)
parameter ( i_lStatusArray_Status = 1)
parameter ( n_lStatusArray_size = 1)
integer lStatusArray(n_lStatusArray_size)
pointer(ptrlStatusArray,lStatusArray)
print *,"huhu"
c************* this line causes the only error! *****************
ptrlStatusArray = SMALocalIntArrayAccess(j_iID_lStatusArray)
return
end
C
C
C ************************************************
C user routine to dynamically exchange data
Subroutine vexternaldb(lOp, i_Array, niArray, r_Array, nrArray)
*
include 'vaba_param.inc'
#include <SMAAspUserSubroutines.hdr>
dimension i_Array(niArray),
* r_Array(nrArray)
C possible values for argument lOp
parameter (j_int_startAnalysis = 0,
* j_int_startStep = 1,
* j_int_setupIncrement = 2,
* j_int_startIncrement = 3,
* j_int_endIncrement = 4,
* j_int_endStep = 5,
* j_int_endAnalysis = 6)
C contents of i_Array
parameter (
* i_int_nTotalNodes = 1,
* i_int_nTotalElements = 2,
* i_int_kStep = 3,
* i_int_kInc = 4,
* i_int_iStatus = 5,
* i_int_lWriteRestart = 6)
C possible values for i_Array(i_int_iStatus)
parameter (j_int_continue = 0,
* j_int_terminateStep = 1,
* j_int_terminateAnalysis = 2)
C contents of r_Array
parameter (
* i_flt_totalTime = 1,
* i_flt_stepTime = 2,
* i_flt_dTime = 3 )
c ID & Contents of lStatusArray
parameter ( j_iID_lStatusArray = 1)
parameter ( i_lStatusArray_Status = 1)
parameter ( n_lStatusArray_size = 1)
integer lStatusArray(n_lStatusArray_size)
pointer(ptrlStatusArray,lStatusArray)
*
if( lOp .eq. j_int_StartAnalysis) then
ptrlStatusArray = SMALocalIntArrayCreate(
* j_iID_lStatusArray, n_lStatusArray_size)
lStatusArray(i_lStatusArray_Status) = j_int_continue
end if
if( i_Array(i_int_iStatus) .eq. j_int_TerminateAnalysis .or.
* lOp .eq. j_int_endAnalysis) then
call SMALocalIntArrayDelete(j_iID_lStatusArray)
end if
*
* Skip writing restart frames to save on disk!
i_Array(i_int_lWriteRestart) = 0
*
return
end
C ************************************************
C
当我想运行代码时,它在没有标记行的情况下运行良好。否则,如果我想使用SMALocalIntArrayAccess访问数组,Abaqus崩溃:
Abaqus JOB test
Abaqus 6.14-2
Begin Compiling Single Precision Abaqus/Explicit User Subroutines
12/8/2016 4:29:41 PM
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0 Build 20160721
Copyright (C) 1985-2016 Intel Corporation. All rights reserved.
End Compiling Single Precision Abaqus/Explicit User Subroutines
Begin Linking Single Precision Abaqus/Explicit User Subroutines
Bibliothek "explicitU.lib" und Objekt "explicitU.exp" werden erstellt.
End Linking Single Precision Abaqus/Explicit User Subroutines
12/8/2016 4:29:41 PM
Begin Analysis Input File Processor
12/8/2016 4:29:41 PM
Run pre.exe
12/8/2016 4:29:42 PM
End Analysis Input File Processor
Begin Abaqus/Explicit Packager
12/8/2016 4:29:42 PM
Run package.exe
huhu
12/8/2016 4:29:42 PM
Abaqus Error: The executable package.exe
aborted with system error code 1073741819.
Please check the .dat, .msg, and .sta files for error messages if the files
exist. If there are no error messages and you cannot resolve the problem,
please run the command "abaqus job=support information=support" to report and
save your system information. Use the same command to run Abaqus that you
used when the problem occurred. Please contact your local Abaqus support
office and send them the input file, the file support.log which you just
created, the executable name, and the error code.
Abaqus/Analysis exited with errors
我完全不知道我现在能做什么。我也试过几台机器。