1!
2!     CalculiX - A 3-dimensional finite element program
3!              Copyright (C) 1998-2021 Guido Dhondt
4!
5!     This program is free software; you can redistribute it and/or
6!     modify it under the terms of the GNU General Public License as
7!     published by the Free Software Foundation(version 2);
8!
9!
10!     This program is distributed in the hope that it will be useful,
11!     but WITHOUT ANY WARRANTY; without even the implied warranty of
12!     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13!     GNU General Public License for more details.
14!
15!     You should have received a copy of the GNU General Public License
16!     along with this program; if not, write to the Free Software
17!     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18!
19      subroutine openfilefluid(jobname)
20!
21      implicit none
22!
23      character*132 jobname,fnfrd
24      integer i
25!
26!     opening frd file
27!
28      do i=1,132
29         if(jobname(i:i).eq.' ') exit
30      enddo
31      i=i-1
32      if(i.gt.128) then
33         write(*,*)
34     &     '*ERROR in openfilefluid: input file name is too long:'
35         write(*,'(a132)') jobname(1:132)
36         write(*,*) '       exceeds 128 characters'
37         call exit(201)
38      endif
39!
40      fnfrd=jobname(1:i)//'.frd'
41      open(13,file=fnfrd(1:i+5),status='unknown',position='append')
42!
43      return
44      end
45