- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello. In MSC.Marc with the Intel XE 2015 Fortran compiler there is the demonstration example e8x94c.dat on deformation of a plate. Without use of file u8x94c.f on Fortran with the method usplit_mesh, shown below, deformation of a plate is run without a splitting of faces of the hexagon finite elements. After adding file u8x94c.f, deformation of a plate is run with a splitting of faces (written above in code in the method usplit_mesh) of hexagon finite elements.
In file u8x94c.f is declared the method usplit_mesh with ten parameters, stated below. From the theory of programming it is known, that the method usplit_mesh is not run, until it is called with a task of certain values for all ten parameters, for example with the value “1” for the variable “icall”. At running of the demonstration example e8x94c.dat on deformation of a plate with use of file u8x94c.f with method usplit_mesh, somewhere is called the method usplit_mesh with the certain values for all ten parameters, but where is called, it is unknown.
What code should be written in the method usplit_mesh, shown below, to learn, where the method usplit_mesh is called? Thanks.
subroutine usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist,
$ ifacelist,nfacelist,inc,time,timeinc)
#ifdef _IMPLICITNONE
implicit none
#else
implicit logical (a-z)
#endif
integer nodelist,nlist,iedgelist,nedgelist,ifacelist,nfacelist
integer icall,inc
real*8 time,timeinc
dimension nodelist(*),iedgelist(2,*),ifacelist(4,*)
integer num,i,alt
if (icall.eq.1) then
alt=3
c alternative 1: specify a sequence of nodes
if (alt.eq.1) then
nlist=7
num=0
do i=57,63
num=num+1
nodelist(num)=i
enddo
elseif (alt.eq.2) then
c alternative 2: specify a list of edges in any order
nedgelist=6
iedgelist(1,1)=57
iedgelist(2,1)=58
iedgelist(1,2)=62
iedgelist(2,2)=63
iedgelist(1,3)=59
iedgelist(2,3)=60
iedgelist(1,4)=58
iedgelist(2,4)=59
iedgelist(1,5)=60
iedgelist(2,5)=61
iedgelist(1,6)=61
iedgelist(2,6)=62
elseif (alt.eq.3) then
c 3d: give a list of faces
nfacelist=4
ifacelist(1,1)=819
ifacelist(2,1)=817
ifacelist(3,1)=822
ifacelist(4,1)=824
c
ifacelist(1,2)=817
ifacelist(2,2)=57
ifacelist(3,2)=58
ifacelist(4,2)=822
c
ifacelist(1,3)=829
ifacelist(2,3)=827
ifacelist(3,3)=822
ifacelist(4,3)=824
c
ifacelist(1,4)=822
ifacelist(2,4)=827
ifacelist(3,4)=58
ifacelist(4,4)=59
endif
endif
return
end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you read that, it was incorrect. Visual Studio Express Edition has never supported anything other than Microsoft languages (and it came into existence long after Microsoft left the Fortran market.) (One could do command-line builds of Fortran, but not debugging, with Visual Studio Express Editions.)
However, Microsoft now offers Visual Studio Community Edition for free, if you qualify, and it does support Intel Fortran. You will need the latest version of Intel Parallel Studio XE 2017 (Update 4) to support Visual Studio 2017 Community Edition.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
valery z. wrote:
Call, please, several books on Fortran, which supports Intel, which will help me to find the answer to the question, asked in the my previous post.
That question, presumably from #58, is
... how to define, where in Marc through Intel Compiler is called the subroutine usplit_mesh with specific values 1, 3, 2, 3, 2, … for icall?
No Fortran book is likely to even mention Marc, let alone divulge proprietary and internal details of the Marc software. Probably, nobody in the Intel Forums knows such details; even if they did, that information is probably a "trade secret" owned by Marc (or its holding company).
You have not told us why you want this information and how it will be of any use to you.
I think that you should cease and desist from continuing this fruitless line of enquiry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for answers.
Demonstration examples, for example e8x94c.dat with u8x94c.f, are also given on purpose, that the user on the basis of this demonstration example could develop the similar project for a solution of the task independently. On the basis of this demonstration example, I developed my project, but in my project, the split of finite elements is impossible.
This demonstration example e8x94c.dat with u8x94c.f is used for a long time by other users, for example, on open sale there is the book:
Zia Javanbakht, Andreas Öchsner. Advanced Finite Element Simulation with MSC Marc. Application of User Subroutines. – Springer International Publishing AG, 2017. 333 pages.
In this book, the following text and the program in Fortran are given:
The instructions provided in this book relate to the MSC Marc/Mentat 2014.2.0 (64 bit) version under Microsoft Windows OS and the Intel XE 2013 FORTRAN (update 5) compiler (also known as Intel FORTRAN version 13).
…
4.2.3 USPLIT_MESH
Example 4.3. This example demonstrates the use of the USPLIT_MESH subroutine, along with the UBGINC and UEDINC subroutines to model the behavior of a plate (50 × 25) with a hole (r = 5) which is illustrated in Fig. 4.4. The Automesh capability of Mentat is used to discretize the model by quadrilateral plane elements. To do this, the following commands are executed to result in 96 elements and 115 nodes:
…
The CommonData module is also used to share the common data between the subroutines. The full Fortran listing is as follows:
1 #INCLUDE ’ MarcTools . f ’
2
3 MODULE CommonData
4 IMPLICIT NONE
5
6 CHARACTER∗32 , PARAMETER : : SETNAME = ’ El eme n t L i s t ’
7 REAL∗8 , PARAMETER : : ySt ress = 210.D0
8
9 INTEGER , ALLOCATABLE : : e d g e L i s t ( : , : )
10 INTEGER : : edgeCount
11
12 REAL∗8 , ALLOCATABLE : : edgeStress ( : )
13 LOGICAL , ALLOCATABLE : : yMask ( : )
14 END MODULE CommonData
15
16 SUBROUTINE ubginc ( ubInc , ubIncsub )
17
18 USE CommonData
19 USE MarcTools
20
21 IMPLICIT NONE
22
23 ! ∗∗ St a r t of generated type statements ∗∗
24 INTEGER ubInc , ubIncsub
25 ! ∗∗ End of generated type statements ∗∗
27 INTEGER , PARAMETER : : MAXEDGE = 8
28
29 INTEGER , ALLOCATABLE , DIMENSION ( : ) : : e l L s t
30 INTEGER : : elNum
31
32 INTEGER , ALLOCATABLE , DIMENSION ( : , : ) : : curEdLst
33 INTEGER : : curEl , curEdNum
34
35 INTEGER , ALLOCATABLE , DIMENSION ( : , : ) : : orgEdLst
36 INTEGER : : orgEdNum
37
38 INTEGER , ALLOCATABLE , DIMENSION ( : , : ) : : r e fEdLst
39 INTEGER : : nRefEdLst
40
41 INTEGER : : i , j , k
42
43 IF ( ubInc .EQ. 0) THEN
44
45 CALL E x t r a c t S e t I t e m L s t (SETNAME, elLst , elNum)
46
47 IF ( elNum .GT . 0) THEN
48 ALLOCATE ( or g E d l s t (2 , elNum∗MAXEDGE) )
49 orgEdNum = 0
50
51 DO i = 1 , elNum
52 curEl = elLst ( i )
53 CALL ExtractElmEdgeLst ( curEl , curEdLst , curEdNum)
54 DO j = 1 , curEdNum
55 DO k = 1 , 2
56 orgEdLst ( k , orgEdNum + j ) = curEdLst ( k , j )
57 END DO
58 END DO
59 orgEdNum = orgEdNum + curEdNum
60 END DO
61
62 CALL Pu t Sma l l F i r s t ( orgEdLst , orgEdNum )
63 CALL DelRepeated2D ( orgEdlst , orgEdNum , r e f E d l s t , nRefEdLst )
64
65 CALL DelElmFreeEdge ( r e fEd l s t , nRefEdLst , e d g e L i s t )
66 edgeCount = s i z e ( edgeList , 2 )
67
68 Al l o c a t e ( edgeStress ( edgeCount ) )
69 Al l o c a t e ( yMask ( edgeCount ) )
70 yMask = . FALSE .
71 edgeStress = 0.D0
72 ELSE
73 CALL QUIT(1234)
74 END IF
75 END IF
76 RETURN
77 END
78
79 SUBROUTINE u s p l i t _me s h ( i c a l l , n o d e l i s t , n l i s t , i e d g e l i s t , n e d g e l i s t ,
80 $ i f a c e l i s t , n f a c e l i s t , inc , time , t imeinc )
81
82 USE CommonData
83 IMPLICIT NONE
84
85 ! ∗∗ St a r t of generated type statements ∗∗
86 INTEGER n o d e l i s t , n l i s t , i e d g e l i s t , n e d g e l i s t , i f a c e l i s t , n f a c e l i s t
87 INTEGER i c a l l , i n c
88 REAL∗8 time,timeinc
89 DIMENSION n o d e l i s t ( ∗ ) , i e d g e l i s t (2 , ∗ ) , i f a c e l i s t (4 , ∗ )
90 ! ∗∗ End of generated type statements ∗∗
91
92 INTEGER : : i , yEdNum
93 INTEGER , ALLOCATABLE , DIMENSION ( : ) : : y Index
94
95 IF ( i c a l l .EQ. 3) THEN
96 yMask = [ ( edgeStress ( i ) .GT. yStress , i =1 , edgeCount ) ]
97 yEdNum = COUNT( yMask )
98 ALLOCATE ( yIndex ,SOURCE=PACK ( [ ( i , i =1 , edgeCount ) ] , yMask ) )
99
100 nEdgeList = yEdNum
101 iEdgeLi s t ( : , 1 : yEdNum) = e d g e L i s t ( : , yIndex )
102 END IF
103 RETURN
104 END
105
106 SUBROUTINE uedinc ( inc , incsub )
107
108 USE CommonData
109 USE MarcTools , ONLY: GetElmEdgeVal
110 IMPLICIT NONE
111 ! ∗∗ St a r t of generated type statements ∗∗
112 INTEGER inc , i n c s u b
113 ! ∗∗ End of generated type statements ∗∗
114
115 INTEGER : : i
116
117 IF ( i n c .GT . 0 ) THEN
118 DO i = 1 , edgeCount
119 edgeStress ( i ) =
120 & GetElmEdgeVal ( edgeList ( 1 , i ) , edgeList ( 2 , i ) ,17 ,2)
121 WRITE ( 6 , ∗ ) edgeList ( 1 , i ) , ’ − ’ , edgeList ( 2 , i )
122 WRITE ( 6 , ∗ ) ’ s t r e s s ’ , edgeStress ( i )
123 END DO
124 END IF
125 RETURN
126 END
…
Write, please, in this program on Fortran there are errors or not?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, as you have already been told, this is not a forum for Marc questions.
Regarding "in this program on Fortran there are errors or not?", you can obtain part of the answer by first running the compiler on the code. I see many errors, and the compiler can probably find more. However, even if all those errors could be fixed, we would still be in the same situation as we are now.
I cannot help you with Marc. From the responses that I have seen in this thread, there is nobody else here, either, who is a current Marc user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for answers.
I do not ask you to help me with Marc. I well studied Marc, and I can help much with a solution of engineering tasks in Marc. I ask to help me with Fortran, which uses Marc for a solution of tasks on the split of finite elements.
I executed the demonstration example e8x94c.dat with u8x94c.f in Marc with an use of Intel Visual Fortran Compiler XE 15.0.3 for Windows 7.
I provided the *.f file from the book in my previous post.
To execute the compilation of this *.f file from the book, I should create at first in Marc the same project, as in the book, then to attach the *.f file to this project, and only after this, Intel Compiler will give the error messages in the *.log file, which will create Marc.
I can execute the compilation of the *.f file from the book directly by means of Intel Compiler, without creating the project in Marc?
Above you wrote: Typically, you do so at the command line or in Visual Studio.
Write, please, the instructions, how to execute the compilation of the available *.f file in the command line with an use of Intel Visual Fortran Compiler XE 15.0.3 and in the Visual Studio?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have Intel Fortran 15 installed, you should have a "Getting Started" guide; on my PC, I have it as "...\Composer XE 2015\Documentation\en_US\startup_wf.htm". You should have a link to it in the Windows Start menu. This guide has instructions on how to build programs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for answers.
Mr. Steve Lionel wrote above:
However, Microsoft now offers Visual Studio Community Edition for free, if you qualify, and it does support Intel Fortran. You will need the latest version of Intel Parallel Studio XE 2017 (Update 4) to support Visual Studio 2017 Community Edition.
In this Visual Studio 2017 Community Edition it is possible to define errors in the available *.f file and to debug this file?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Visual Studio by itself, has no Fortran support. Visual Studio plus Intel Parallel Studio XE does have Fortran support, including the ability to build and debug Fortran applications (.f files included.) Intel Parallel Studio XE by itself, with a Commercial or Academic license (not Student or Evaluation) can also do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for answers.
Mr. Mecej wrote above (07/08/2017):
Regarding "in this program on Fortran there are errors or not?", you can obtain part of the answer by first running the compiler on the code. I see many errors, and the compiler can probably find more.
Give, please, several code lines of the *.f file (“The full Fortran listing” from 07/07/2017) from the mentioned book, in which there are errors, and explain, please, what these errors consist in?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
go to the start menu and click intel fortran command prompt icon there is usually a 32bit or a 64bit version. In the dos box that is opened use CD to change to where your source is and type IFORT myfilename.f, it will compile and list errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Ret.) wrote:
Visual Studio by itself, has no Fortran support. Visual Studio plus Intel Parallel Studio XE does have Fortran support, including the ability to build and debug Fortran applications (.f files included.) Intel Parallel Studio XE by itself, with a Commercial or Academic license (not Student or Evaluation) can also do this.
Excuse me, please, but I understood nothing. At Visual Studio 2017 there is a user interface, into which it is possible to load the *.f file. But Visual Studio 2017 cannot compile *.f files.
At Intel Parallel Studio XE 2017 (Update 4) there is no user interface, therefore in Intel Parallel Studio XE 2017 (Update 4) it is impossible to open the *.f file.
Write, please, how to compile the *.f file in Visual Studio 2017 by means of Intel Parallel Studio XE 2017 (Update 4)?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to do Visual studio..... Go to the start menu and find "Intel Parallel Studio XE 2017" There is a shortcut to "Documents and getting started...". That will answer your questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know what you mean by "there is no user interface". If you successfully installed VS2017 and then Intel Parallel Studio XE 2017, you can create a Fortran project that can build .f files. It may be that you didn't tell the VS2017 install to add C++ development support - it doesn't do that by default and if you leave that off, you'll get no Fortran integration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Ret.) wrote:
I don't know what you mean by "there is no user interface". If you successfully installed VS2017 and then Intel Parallel Studio XE 2017, you can create a Fortran project that can build .f files. It may be that you didn't tell the VS2017 install to add C++ development support - it doesn't do that by default and if you leave that off, you'll get no Fortran integration.
Mr. Steve Lionel wrote above (06/21/2017):
However, Microsoft now offers Visual Studio Community Edition for free, if you qualify, and it does support Intel Fortran. You will need the latest version of Intel Parallel Studio XE 2017 (Update 4) to support Visual Studio 2017 Community Edition.
Answer, please, questions:
1. What VS 2017 version should be set: Visual Studio 2017 Enterprise or Visual Studio 2017 Community Edition? Whether it is possible for Visual Studio 2017 Enterprise?
2. What service pack should be set: Intel Parallel Studio XE 2017 (Update ?) or any?
3. At installation Visual Studio 2017 Enterprise or Visual Studio 2017 Community Edition, in what panel of Visual Studio 2017 it is necessary to fulfill your requirement “to add C++ development support”?
4. After installation of Visual Studio 2017 Community Edition and Intel Parallel Studio XE 2017 (Update 4), how to open and compile the available *.f file?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1] see https://software.intel.com/en-us/articles/intel-visual-fortran-compiler-170-for-windows-release-notes-for-intel-parallel-studio-xe#sysreq
2] don't worry about it just install.
3] ? it is just one of the installer options check boxes
4] Read the getting started (links in 1])
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When installing VS2017, any edition, it is necessary to select C++ in the early dialog with installation choices. Any edition of VS2017 other than "Express" will work ok with Intel Parallel Studio XE. You are welcome to install any updates Visual Studio offers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for answers.
As in MSC.Marc together with the Intel XE 2015 Fortran compiler, I debugged the work of an example e8x94c (the *.mud file together with the u8x94c.f file), for compilation of the file *.f (in a post #65 above for 07.07.2017 from the book, provided above), to which I appropriated a name Split_v1_f.f, instead of the u8x94c.f file, I added the Split_v1_f.f file.
On the first line:
#INCLUDE 'MarcTools.f'
Marc in the *.log file, created by it, gave the following errors:
C:\Temp2\Split_v2\Split_v1_f.f(1): error #5149: Illegal character in statement label field [п]
п»ї #INCLUDE 'MarcTools.f'
^
C:\Temp2\Split_v2\Split_v1_f.f(1): error #5149: Illegal character in statement label field [»]
п»ї #INCLUDE 'MarcTools.f'
-^
C:\Temp2\Split_v2\Split_v1_f.f(1): error #5149: Illegal character in statement label field [ї]
п»ї #INCLUDE 'MarcTools.f'
--^
C:\Temp2\Split_v2\Split_v1_f.f(1): error #5082: Syntax error, found POUND_BASE '' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK PROGRAM BLOCKDATA MODULE INTEGER REAL COMPLEX ...
п»ї #INCLUDE 'MarcTools.f'
--------^
C:\Temp2\Split_v2\Split_v1_f.f(1): catastrophic error: Could not recover from previous syntax error
compilation aborted for C:\Temp2\Split_v2\Split_v1_f.f (code 1)
compile failed for C:\Temp2\Split_v2\Split_v1_f.f
Marc Exit number 3
Answer, please, questions:
1. Whether the line is correctly written?
#INCLUDE 'MarcTools.f'
2. As the MarcTools.f file, I did not find in the book, and Marc did not find in the software, where to look for this file?
3. If there was the MarcTools.f file, then where it should be placed, in the same folder, as the Split_v1_f.f file?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would you please attach a ZIP of Split_v1_f.f? I ask for a ZIP because that way I know what we'll see is exactly what's in the file. It sort of looks as if the file is corrupted and has some nonprinting characters at the start of each line.
The #INCLUDE is sort-of ok, though it is usually a lowercase #include. This is preprocessor syntax and would require that you have the Preprocess Source File option enabled. I would more usually recommend:
INCLUDE 'MarcTools.f'
as this is standard Fortran syntax. In either case the compiler would look for this file in the same directory as the source file with the INCLUDE line, and if not there, in directories named under "Additional Include Directories"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mr. Steve Lionel, thanks for answers.
When in the Windows Explorer I double click according to the u8x94c.f or Split_v1_f.f file, the Visual Studio of 2010 Shell opens, where I at first edit the *.f file, then I add this file to Marc and after start on a running or I receive a solution without errors for the u8x94c.f file, or I receive the list of errors for the Split_v1_f.f file from the Intel XE 2015 Fortran compiler. I corrected all simple syntactic errors on Fortran independently, and I ask to help me to correct the difficult errors.
When in the Visual Studio of 2010 Shell I open the u8x94c.f file, and with this file in Marc I receive a solution of an engineering task without errors, I see the correct writing of the program on Fortran for Marc 2016.
As I understood, the feature of debugging of programs on Fortran in the Visual Studio of 2010 Shell is, that such characters, as #, $, &, should be at the left in a green zone. If to displace these characters, for example, to the right, then the Intel XE 2015 Fortran compiler does not understand these characters and displays errors in lines with these characters.
If, following your recommendation, instead of:
#INCLUDE 'MarcTools.f'
to write:
INCLUDE 'MarcTools.f'
that in the file *.log, Marc, by means of the Intel XE 2015 Fortran compiler, displays the following errors:
C:\Temp2\Split_v2\Split_v1_f.f(1): error #5149: Illegal character in statement label field [п]
п»ї INCLUDE 'MarcTools.f'
^
C:\Temp2\Split_v2\Split_v1_f.f(1): error #5149: Illegal character in statement label field [»]
п»ї INCLUDE 'MarcTools.f'
-^
C:\Temp2\Split_v2\Split_v1_f.f(1): error #5149: Illegal character in statement label field [ї]
п»ї INCLUDE 'MarcTools.f'
--^
C:\Temp2\Split_v2\Split_v1_f.f(1): error #5102: Cannot open include file 'MarcTools.f'
п»ї INCLUDE 'MarcTools.f'
-----------------^
C:\Temp2\Split_v2\Split_v1_f.f(109): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MARCTOOLS]
USE MarcTools, ONLY: GetElmEdgeVal
----------^
C:\Temp2\Split_v2\Split_v1_f.f(120): error #6406: Conflicting attributes or multiple declaration of name. [GETELMEDGEVAL]
& GetElmEdgeVal ( edgeList ( 1 , i ) , edgeList ( 2 , i ) ,17 ,2)
-------^
C:\Temp2\Split_v2\Split_v1_f.f(109): error #6580: Name in only-list does not exist. [GETELMEDGEVAL]
USE MarcTools, ONLY: GetElmEdgeVal
---------------------------^
compilation aborted for C:\Temp2\Split_v2\Split_v1_f.f (code 1)
compile failed for C:\Temp2\Split_v2\Split_v1_f.f
Marc Exit number 3
For some reason to me do not enable to attach a file *.f, therefore I add the file Split_v1_f.f from Notepad:
#INCLUDE 'MarcTools.f' MODULE CommonData IMPLICIT NONE c CHARACTER*32, PARAMETER : : SETNAME = 'ElementList' REAL*8, PARAMETER : : yStress = 210.D0 c INTEGER, ALLOCATABLE : : edgeList( : , : ) INTEGER : : edgeCount c REAL*8, ALLOCATABLE : : edgeStress( : ) LOGICAL , ALLOCATABLE : : yMask( : ) END MODULE CommonData c SUBROUTINE ubginc(ubInc,ubIncsub) c USE CommonData USE MarcTools c 18 IMPLICIT NONE c c ! ∗∗ St a r t of generated type statements ∗∗ INTEGER ubInc , ubIncsub c ! ∗∗ End of generated type statements ∗∗ c INTEGER , PARAMETER : : MAXEDGE = 8 c INTEGER , ALLOCATABLE , DIMENSION ( : ) : : elLst INTEGER : : elNum c INTEGER , ALLOCATABLE , DIMENSION ( : , : ) : : curEdLst INTEGER : : curEl , curEdNum c INTEGER , ALLOCATABLE , DIMENSION ( : , : ) : : orgEdLst INTEGER : : orgEdNum c INTEGER , ALLOCATABLE , DIMENSION ( : , : ) : : refEdLst INTEGER : : nRefEdLst c INTEGER : : i , j , k c 40 IF ( ubInc .EQ. 0) THEN c CALL ExtractSetItemLst(SETNAME, elLst , elNum) c 44 IF ( elNum .GT . 0) THEN ALLOCATE (orgEdlst(2 , elNum*MAXEDGE) ) orgEdNum = 0 c DO i = 1 , elNum curEl = elLst ( i ) CALL ExtractElmEdgeLst ( curEl , curEdLst , curEdNum) DO j = 1 , curEdNum DO k = 1 , 2 orgEdLst ( k , orgEdNum + j ) = curEdLst ( k , j ) END DO END DO orgEdNum = orgEdNum + curEdNum END DO c 59 CALL PutSmallFirst(orgEdLst,orgEdNum) CALL DelRepeated2D(orgEdlst, orgEdNum, refEdlst, nRefEdLst) c CALL DelElmFreeEdge(refEdlst, nRefEdLst, edgeList) edgeCount = size(edgeList,2) c Allocate( edgeStress ( edgeCount ) ) Allocate( yMask ( edgeCount ) ) yMask = . FALSE . edgeStress = 0.D0 ELSE CALL QUIT(1234) END IF END IF RETURN END c 76 SUBROUTINE usplit_mesh(icall,nodelist,nlist,iedgelist,nedgelist, $ ifacelist,nfacelist,inc,time,timeinc) c USE CommonData IMPLICIT NONE c c ! ∗∗ St a r t of generated type statements ∗∗ INTEGER nodelist,nlist,iedgelist,nedgelist,ifacelist,nfacelist INTEGER icall,inc REAL*8 time,timeinc DIMENSION nodelist(*),iedgelist(2,*),ifacelist(4,*) c ! ∗∗ End of generated type statements ∗∗ c 89 INTEGER : : i , yEdNum INTEGER , ALLOCATABLE , DIMENSION ( : ) : : y Index c IF (icall.EQ.3) THEN yMask = [ ( edgeStress ( i ) .GT. yStress , i =1 , edgeCount ) ] yEdNum = COUNT( yMask ) ALLOCATE(yIndex,SOURCE=PACK([(i,i=1,edgeCount)],yMask)) c nEdgeList = yEdNum iEdgeLi s t ( : , 1 : yEdNum) = edgeList( : , yIndex ) END IF RETURN END c 103 SUBROUTINE uedinc ( inc , incsub ) c USE CommonData USE MarcTools, ONLY: GetElmEdgeVal IMPLICIT NONE c ! ∗∗ St a r t of generated type statements ∗∗ INTEGER inc , incsub c ! ∗∗ End of generated type statements ∗∗ c INTEGER : : i c 114 IF (inc.GT.0) THEN DO i = 1 , edgeCount edgeStress ( i ) = & GetElmEdgeVal ( edgeList ( 1 , i ) , edgeList ( 2 , i ) ,17 ,2) WRITE( 6 , * ) edgeList ( 1 , i ) , ' − ' , edgeList ( 2 , i ) WRITE ( 6 , * ) ' stress ' , edgeStress ( i ) END DO END IF RETURN END
Help, please, me to deal with errors in the Split_v1_f.f file, for example, where to me to look for the *.f file in line (#INCLUDE 'MarcTools.f')?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why not attach a zip file like what Steve specifically asked for? Also no one can compile the source you included above as we would need MarcTools.f and also source for the modules CommonData and MarcTools (maybe that is in MarcTools.f).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mr. Andrew, thanks for answers.
In the previous post I wrote, that for some reason I have no opportunity to attach files. In attempt to attach the Split_v1_f.zip, I receive the message “You are not authorized to access this page”, that I allegedly use the outdated Internet Explorer 8 browser, though I use the Mozilla Firefox browser. Therefore I provided file Split_v1_f.f from Notepad.
Answer, please, questions:
1. Whether the line is correctly written?
#INCLUDE 'MarcTools.f'
2. As the MarcTools.f file, I did not find in the book, and Marc did not find in the software, where to look for this file?
3. If there was the MarcTools.f file, then where it should be placed, in the same folder, as the Split_v1_f.f file?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't do anything with your pasting the source file into the reply. I don't know why you can't attach the file - I'll see if I can find out. In the meantime can you find a file sharing service (Dropbox, Google Drive, etc.) that will allow you to upload the ZIP and generate a link to it you can paste here?
As I wrote before, either with #include or INCLUDE, it looks for the named file first in the same folder as your source file, and then in the list of "Additional Include Directories" in the project's Fortran properties.
If you use #include, the # goes in column 1 and you MUST enable the "Preprocessor" option in the project. If you use INCLUDE and you are using fixed-form source (.f file type), that starts in column 7 the same as other Fortran statements.

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