- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Large Fortran files can be a problem to merge changes when multiple developers are editing the same file and maybe re-ordering functions within the file. Therefore I have split up the functions and subroutines into separate files using include
For example:
module RealGearMod
use Lddist
use GearToothMod
use LubeDataMod
type RealGearType
type(RealGearTooth), allocatable :: realTeeth(:)
integer :: carrierShaftIdx
integer :: gearLock
integer :: handSign
logical :: isFEGear
logical :: isInternal
real :: baseHelixAngle = 0.0/0.0
real :: helixAngle = 0.0/0.0
real :: bevelAngle = 0.0/0.0
real :: baseRadius = 0.0/0.0
real :: baseThickness = 0.0/0.0
real :: poissonRatio = 0.0/0.0
real :: youngsModulus = 0.0/0.0
real :: initialRotation = 0.0/0.0
real :: referenceTransverseBaseToothAngle = 0.0/0.0
real :: outerRadius = 0.0/0.0
real :: refPitchRadius = 0.0/0.0
real :: toothHeight = 0.0/0.0
real :: flankRoughness = 0.0/0.0
real :: faceWidth = 0.0/0.0
real :: phaseAngle = 0.0/0.0
real :: tipDiameter = 0.0/0.0
real :: wetDepth = 0.0/0.0
character(16) :: gearType
type(Lubricant) :: lubricant
end type
contains
include 'deallocateRealGear.f90i'
include 'deallocateRealGears.f90i'
include 'outputRealGear.f90i'
include 'setGearConnectionDataForRealGear.f90i'
include 'setGearDataForRealGear.f90i'
include 'toothAngle.f90i'
end module
However when the include file references another module, Visual studio does not appear to recognize the need to compile the dependant module first.
Should this be working or should I submit a formal support request?
By the way, I initialize to 0.0/0.0 since this is a way to trap unitialized variables in derived types.
Andrew Smith
Link Copied

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page