Ask Your Question
1

Conversion of uexc.flx flecs code to uexc.for fortran code

asked 2020-10-07 05:09:36 -0500

Is there any tool or script available for conversion of flecs code to fortran code. ?

In the google drive link that I got from this site, I found that this can be done using * FLECS32 ( LIBmaker.bat)*

Can anyone help with how to do this translation of code.

Thanks in advance

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2020-10-07 11:21:16 -0500

jconto gravatar image

To translate from *.flx to *.f outside PSSe, save the following to a file "flecs.bat" and run it against your code:

@rem FLECS.bat - Translate flecs code *.flx to fortran66 *.f
@rem run as c:\..>flecs uexc
@ECHO OFF
IF "%1"=="" (
   ECHO "Enter flex filename [no ext, expected .flx] to be translated to .f"
   GOTO FIN )
@rem the -C option preserves the comments in .flx
@ECHO ON
FLECS32 "%1" -C -L NO -F "%1.F" -W 132 -F77
:FIN
@ECHO "Flecs ends"
edit flag offensive delete link more

Comments

Thanks for you reply. Can you please suggest how to run this againt my code. While am trying to run a flecs.bat file the new screen gets popup but I couldn't find any translation of Fortran code Can you please help me with this

Berwin gravatar imageBerwin ( 2020-10-07 12:06:38 -0500 )edit

Search the net for "Batch files" for more info. Open CMD window (=DOS window) using the link created by PSSe during installation. In the DOS window just enter you flxcode name without extension as:c:\..>flecs flxcode

jconto gravatar imagejconto ( 2020-10-07 12:33:28 -0500 )edit

Thanks, I have tried the same, Unfortunately for me its showing error as 'flecs' is not recognized as an internal or external command, operable program or batch file.

Berwin gravatar imageBerwin ( 2020-10-07 13:19:28 -0500 )edit

The saved 'flecs.bat' acts as a command. Did you open a DOS window with the PSSe link? This link set up path for PSSe to run. If so, type 'PSSe' to check that it works ok. Once in the DOS window, change directory to your working folder using: CD c:\xx\yy\workingfolder and try flecs again.

jconto gravatar imagejconto ( 2020-10-07 14:00:14 -0500 )edit

yes it worked :) great thanks

Berwin gravatar imageBerwin ( 2020-10-07 20:40:11 -0500 )edit
1

answered 2020-10-07 09:25:55 -0500

perolofl gravatar image

updated 2020-10-07 09:27:00 -0500

That conversion is made every time a flecs model is compiled in PSSE. However, the resulting code is old-fashioned with a lot of GOTO statements, no comments, etc. That code should not be used as source code because it in in practise "un-readable"! But, it serves to feed the fortran-compiler...

The Environment Manager uses the following argument:

flecs32 "xxx.flx" -L NO -F "C:\Users\yyy\.pssenvmgr\xxx.f" -W 132 -F77
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2020-10-07 05:09:36 -0500

Seen: 727 times

Last updated: Oct 07 '20