Skip to content

Commit

Permalink
Merge pull request #14 from openfedem/ifort24
Browse files Browse the repository at this point in the history
Support for Intel Fortran 24
  • Loading branch information
kmokstad authored Oct 11, 2024
2 parents b8585ee + 381ba34 commit dff6a2b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 30 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,19 @@ endif ( BUILD_TEST_REPORTS OR BUILD_TESTS )

# Install the Fortran redistributables

if ( WIN AND DEFINED ENV{IFORT_COMPILER23} )
file ( TO_CMAKE_PATH $ENV{IFORT_COMPILER23}redist/intel64_win/compiler IFORT_PATH )
if ( WIN AND DEFINED ENV{MKLROOT} )
if ( DEFINED ENV{IFORT_COMPILER23} )
file ( TO_CMAKE_PATH $ENV{IFORT_COMPILER23}redist/intel64_win/compiler IFORT_PATH )
file ( TO_CMAKE_PATH $ENV{MKLROOT}/redist/intel64 MKL_PATH )
elseif ( DEFINED ENV{IFORT_COMPILER24} )
file ( TO_CMAKE_PATH $ENV{IFORT_COMPILER24}bin IFORT_PATH )
file ( TO_CMAKE_PATH $ENV{MKLROOT}/bin MKL_PATH )
endif ( DEFINED ENV{IFORT_COMPILER23} )
file ( GLOB FTN_REDIST ${IFORT_PATH}/*md.dll )
if ( FTENV_VERBOSE )
message ( STATUS "Installing Fortran redistributables from ${IFORT_PATH} to ${CMAKE_INSTALL_PREFIX}" )
endif ( FTENV_VERBOSE )
install ( FILES ${FTN_REDIST} DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
endif ( WIN AND DEFINED ENV{IFORT_COMPILER23} )
if ( WIN AND DEFINED ENV{MKLROOT} )
file ( TO_CMAKE_PATH $ENV{MKLROOT}/redist/intel64 MKL_PATH )
if ( FTENV_VERBOSE )
message ( STATUS "Installing MKL redistributables from ${MKL_PATH} to ${CMAKE_INSTALL_PREFIX}" )
endif ( FTENV_VERBOSE )
Expand Down
7 changes: 3 additions & 4 deletions src/SolutionMapper/main.C
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,9 @@ size_t searchPoints (std::string& ftlFile, FFlLinkHandler*& feModel,
// Lambda function searching for a matching node.
auto&& findMatchingNode = [feModel,nodeTol](const FaVec3& X) -> int
{
NodesCIter nit = feModel->findClosestNode(X);
if (nit != feModel->nodesEnd())
if ((X - (*nit)->getPos()).length() <= nodeTol)
return (*nit)->getID();
FFlNode* node = feModel->findClosestNode(X);
if (node && (X - node->getPos()).length() <= nodeTol)
return node->getID();

return 0;
};
Expand Down
30 changes: 10 additions & 20 deletions src/vpmStress/strainCoatModule.f90
Original file line number Diff line number Diff line change
Expand Up @@ -560,20 +560,18 @@ subroutine printStrainCoatInput (strainCoats,lpu)
integer , intent(in) :: lpu

!! Local variables
integer :: i, j, flabel
integer :: i, j
character(len=80) :: cfmt

!! --- Logic section ---

write(lpu,600)
do i = 1, size(strainCoats)
cfmt = "(2I8,A10,1PE14.5,I10,I11,I3,0PF12.3)"
if (size(strainCoats(i)%results) > 1) then
assign 611 to flabel
else if (size(strainCoats(i)%results) == 1) then
assign 610 to flabel
else
cycle
cfmt(36:) = "/(14X,A12,1PE14.5,I10,I11,I3,0PF12.3))"
end if
write(lpu,flabel) strainCoats(i)%tensorRosette%id%baseId, &
write(lpu,cfmt) strainCoats(i)%tensorRosette%id%baseId, &
& strainCoats(i)%tensorRosette%id%userId, &
(resultSet_p(strainCoats(i)%results(j)%resultSet), &
& strainCoats(i)%tensorRosette%data(j)%zPos, &
Expand All @@ -587,9 +585,6 @@ subroutine printStrainCoatInput (strainCoats,lpu)
600 format(//5X,'STRAIN COAT PROPERTY SUMMARY' /5X,74('-') &
& /5X,'Strain Coat Result set Z-position Material Group ', &
& 'S-N curve SCF factor')
610 format(2I8,A10,1PE14.5,I10,I11,I3,0PF12.3)
611 format(2I8,A10,1PE14.5,I10,I11,I3,0PF12.3 &
/(14X,A12,1PE14.5,I10,I11,I3,0PF12.3))
620 format(4X,75('-')/)

end subroutine printStrainCoatInput
Expand All @@ -608,20 +603,18 @@ subroutine printStrainCoatData (strainCoats,lpu)
integer , intent(in) :: lpu

!! Local variables
integer :: i, j, flabel
integer :: i, j
character(len=112) :: cfmt

!! --- Logic section ---

write(lpu,600)
do i = 1, size(strainCoats)
cfmt = "(2I8,A10,3X,1P,2(1X,3E13.5),1X,2E13.5,1X,0P,2F13.5)"
if (size(strainCoats(i)%results) > 1) then
assign 611 to flabel
else if (size(strainCoats(i)%results) == 1) then
assign 610 to flabel
else
cycle
cfmt(51:) = "/(14X,A12,3X,1P,2(1X,3E13.5),1X,2E13.5,1X,0P,2F13.5))"
end if
write(lpu,flabel) strainCoats(i)%tensorRosette%id%baseId, &
write(lpu,cfmt) strainCoats(i)%tensorRosette%id%baseId, &
& strainCoats(i)%tensorRosette%id%userId, &
(resultSet_p(strainCoats(i)%results(j)%resultSet), &
& strainCoats(i)%results(j)%sigMax, &
Expand Down Expand Up @@ -650,9 +643,6 @@ subroutine printStrainCoatData (strainCoats,lpu)
& ' Max P1 Max shear Max von Mises', &
& ' Max P1 Max shear Max von Mises ', &
& ' Mean Std. Dev. Most popular spread' )
610 format(2I8,A10,3X,1P,2(1X,3E13.5),1X,2E13.5,1X,0P,2F13.5)
611 format(2I8,A10,3X,1P,2(1X,3E13.5),1X,2E13.5,1X,0P,2F13.5 &
/(14X,A12,3X,1P,2(1X,3E13.5),1X,2E13.5,1X,0P,2F13.5))
612 format(20X,'Damage = ',1P3E13.5)
620 format(4X,159('-')/)

Expand Down

0 comments on commit dff6a2b

Please sign in to comment.