Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

FEM contourplotter - conversion completed

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88188] FEM contourplotter - conversion completed
  • From: carlos at Colorado.EDU
  • Date: Sun, 27 Apr 2008 07:01:06 -0400 (EDT)

The translation of the Fortran IV 1966 finite element
contourplot to Mathematica is complete. Those interested in
that specialized topic may download a mini test version from

http://caswww.colorado.edu/courses.d/IFEM.d/IFEM.Ch27.d/IFEM.Ch27.index.html

Click on ContBandPlotterMini.nb  link. Download and execute.
Self contained data. Tested so far under V4.1, 4.2 & 5.2.
Untested under V6.0 as my laptop in Spain lacks it.
Test plots take ~0.5 sec on 2.4 GHz MacBook Pro under 5.2.

To run under 6.0 set DisplayChannel to Print (see top comment).

The original Fortran code was roughly 9000 lines.  Code was
typical "write only" thesis spaghetti, with over 1000 GOTOs
and (believe it or not) even a PAUSE statement! Mathematica
code is about 800 lines. Imperative procedural logic reflects
source, but could simplify later conversion to C or assembly.

Posted mini is about 220 lines including test code. Size
was reduced by deleting 6 element types out of 7, and
removing an alternative divide & conquer contourplotting
method. (D&C produces higher quality plots but is slower.)

Code is slow (about 10K poly/sec) but that is enough for
coursework. A C or assembly version will be needed for FEM
production work (>=1M poly/sec) at the cost of portability.
Worst flaw is the shoddy contour value labeling, done in a
hurry.  To see what's wrong, try resizing top plot with
mouse.  Advice on how to fix that mess welcome.



  • Prev by Date: Re: delayed function assignment
  • Next by Date: Re: Base function
  • Previous by thread: Re: delayed function assignment
  • Next by thread: Re: FEM contourplotter - conversion completed