Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions PythonAPI/src/fedempy/modeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ def make_function(self, name, **kwargs):
# By default (if kwargs is empty), create an external function
return self._fmlib.FmCreateExternalFunc(name_, tag_, bid_)

def make_sensor(self, name, obj, var, dof=None, tag=None):
def make_sensor(self, name, obj, var=None, dof=None, tag=None):
"""
Creates a sensor object.

Expand All @@ -1126,7 +1126,7 @@ def make_sensor(self, name, obj, var, dof=None, tag=None):
Description of the new sensor
obj : int or str or (int, int) or (str, str)
Base Id or tag of object(s) to measure
var : FmVar
var : FmVar, default=None
The variable to measure
dof : FmDof, default=None
Local DOF to measure if `var` is a multi-DOF quantity
Expand Down Expand Up @@ -1718,9 +1718,9 @@ def edit_function(self, func_id, obj, var=None, dof=None):
User Id (or base Id, if negative) of the function to modify
obj : int or str or (int, int) or (str, str)
Base Id or tag of object(s) producing the response quantity to use
var : FmVar, default=None=0
var : FmVar, default=None
Response quantity to use as function argument
dof : FmDof, default=None=0
dof : FmDof, default=None
Which component of `var` to be used if a multi-DOF quantity

Returns
Expand Down
2 changes: 1 addition & 1 deletion PythonAPI/src/fedempy/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ctypes import byref, c_bool, c_char_p, c_double, c_int, cdll
from os import path

from numpy import empty, float64, int32, int64, ndarray, ascontiguousarray
from numpy import ascontiguousarray, empty, float64, int32, int64, ndarray
from progress.bar import Bar


Expand Down
2 changes: 1 addition & 1 deletion SAM
Submodule SAM updated 5 files
+17 −0 CMakeLists.txt
+1 −1 cmake
+65 −0 src/iota.f
+16 −0 test/CMakeLists.txt
+75 −0 test/testSAM.pf
23 changes: 2 additions & 21 deletions src/vpmCommon/samModule.f90
Original file line number Diff line number Diff line change
Expand Up @@ -826,9 +826,6 @@ subroutine LumpedSAM (orgSam,newSam,ierr)
type(SamType), pointer :: newSam
integer , intent(out) :: ierr

!! Local variables
integer :: i

!! --- Logic section ---

allocate(newSam,stat=ierr)
Expand Down Expand Up @@ -866,7 +863,8 @@ subroutine LumpedSAM (orgSam,newSam,ierr)
call reAllocate ('LumpedSAM',newSam%madof,newSam%nnod+1,ierr)
if (ierr < 0) return

newSam%madof = (/ (i,i=1,newSam%nnod+1) /)
!! MADOF = ( 1, 2, 3, ..., NNOD+1 )
call IOTA (newSam%nnod+1,newSam%madof(1),1,1)

newSam%minex => newSam%madof
newSam%mpmnpc => newSam%madof
Expand Down Expand Up @@ -978,23 +976,6 @@ subroutine invertEqPartition (lp1,lp2,sam,ierr)

end if

#if defined(__GNUC__) && (__GNUC__ < 9)
!! The findloc intrinsic is a Fortran 2008 feature.
!! Not available in older gfortran implementations.
!! Remove this when migrating to gfortran 9.0
contains
!> @cond NO_DOCUMENTATION
function findloc (array,val,dim) result(i)
integer, intent(in) :: array(:), val, dim
integer :: i
do i = dim, size(array)
if (array(i) == val) return
end do
i = 0
end function findloc
!> @endcond
#endif

end subroutine invertEqPartition


Expand Down
11 changes: 11 additions & 0 deletions src/vpmCommon/vpmLinAlg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,14 @@ if ( TARGET SPR_I8 )
else ( TARGET SPR_I8 )
target_link_libraries ( ${LIB_ID} SPR )
endif ( TARGET SPR_I8 )

if ( GSF_LIBRARY )
if ( FTENV_VERBOSE )
message ( STATUS "Installing ${GSF_LIBRARY} and ${GSF_CB} to ${CMAKE_INSTALL_PREFIX}" )
endif ( FTENV_VERBOSE )
install ( FILES ${GSF_LIBRARY}
DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
install ( TARGETS ${GSF_CB}
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
endif ( GSF_LIBRARY )
11 changes: 6 additions & 5 deletions src/vpmReducer/samReducerModule.f90
Original file line number Diff line number Diff line change
Expand Up @@ -485,17 +485,18 @@ subroutine initiateSAM (sam,tncoor,linearSolve,ipsw,lpu,ierr)
call reAllocate ('initiateSAM',sam%ttcc ,sam%nmmceq,ierr)
if (ierr < 0) return

sam%mpmceq = iscr(ipceq:ipceq+sam%nceq)
sam%mmceq = iscr(imceq:imceq+sam%nmmceq-1)
sam%ttcc = rscr(itceq:itceq+sam%nmmceq-1)
sam%nspdof = sam%nspdof + sam%nceq
sam%nddof = sam%nceq
call ICOPY (sam%nceq+1,iscr(ipceq),1,sam%mpmceq(1),1)
call ICOPY (sam%nmmceq,iscr(imceq),1,sam%mmceq(1),1)
call DCOPY (sam%nmmceq,rscr(itceq),1,sam%ttcc(1),1)
if (doLogMem) then
call logAllocMem ('initiateSAM',size(iscr),0,4)
call logAllocMem ('initiateSAM',size(rscr),0,8)
end if
deallocate(iscr,rscr)

sam%nspdof = sam%nspdof + sam%nceq
sam%nddof = sam%nceq

else

!! Allocate length-1 arrays in the event of no linear couplings.
Expand Down
Loading