CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFD-Wiki (https://www.cfd-online.com/Forums/cfd-wiki/)
-   -   Please Suggestions about source code uploading (https://www.cfd-online.com/Forums/cfd-wiki/57064-please-suggestions-about-source-code-uploading.html)

Michail September 19, 2005 00:38

Please Suggestions about source code uploading
 
Dear colleagues!!!

Recently I tryed to include FORTRAN-90 source files. It looks pretty badly.

Any suggestions???

Praveen. C September 19, 2005 01:00

Re: Please Suggestions about source code uploading
 
See this page

But I dont think this is a good idea for including source files because it can destroy the formatting (which is bad for fortran 77 files) and become painful and messy for large codes. I tried to upload a fortran file but the wiki treats it like an image.

If the code is in multiple files then it is better to provide them in *.tar.gz format. However I dont know how we can store and link to such files.

Here is some suggestion for providing a source code.
  • How to compile and install
  • Describe what the code does - what do the different subroutines do - initial conditions, boundary conditions, etc.
  • What are the input files required if any ?
  • What are the grid files required ?
  • How to run the code ?
  • What are the outputs ?
  • How to visualize the results ?
  • Link for downloading the source in *.tar.gz or *.tar.bz2 format
  • Author credits

Michail September 19, 2005 01:09

Re: Please Suggestions about source code uploading
 
Dear Praveen

Thanks a lot, that's all I needed

Of course I'll provide short description.

What does mean "author credits"??? (I'm not so good in English, although I work constantly on its improving)


Praveen. C September 19, 2005 01:22

Re: Please Suggestions about source code uploading
 
"author credits" refers to giving proper reference to the person or persons who wrote the code.

I think we need to agree to some standards regarding source codes. Let us wait for Jonas to get back.

Michail September 19, 2005 01:30

Re: Please Suggestions about source code uploading
 
This code I developed completely from "0"

Ok, let's wait for Jonas. It's just probe, how it will looks like.

zxaar September 19, 2005 01:57

Re: Please Suggestions about source code uploading
 
you can give urself the credits for this if you have written it, I would adivise you one more thing, if possible write the psuedocode for it, it will be easier to understand then to read the code.

Michail September 19, 2005 02:24

Re: Please Suggestions about source code uploading
 
I think a little different. Imagine the first year student who've got the task.

As I already wrote, it took 10 years to understand the matter completely ( although of course there was breaks because of my personal problems). If I had the same information 10 years ago, I would probably be a PhDoc now. :)

So I think it would be better to leave it as it is now, just it will be necessray to make some corrections.

It consists of discretization and solving system of linear equations (which we describing).

Therefore let's give a student a little work just to copy it.

matej September 19, 2005 03:17

Re: Please Suggestions about source code uploading
 
well, yes and no.

It's wonderfull if you find a code that will solve what you need, but you will learn nothing!!! Until you code it yourself, you never get propper understanding of it.

I think that something (a flow chart or what it's cold) to help people to understand the probelm and the appoach to code it would be enough.

matej

Jonas Larsson September 21, 2005 08:15

Re: Please Suggestions about source code uploading
 
If it is a large source file (say longer than a screen length) or several source files that belong together I'd recommend that you upload them as a zip of tar.gz file and then just link to them from the appropriate article/page using a link like this:

[[Media:Filename.tar.gz | Filename.tar.gz]]

Only small source codes or source codes that are intended to illustrate a concept or an algorithm should be inlined with the article text I think (enclosed by pre tags ar Preveen showed).

Hope that helps.



All times are GMT -4. The time now is 03:35.