Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Programming Language Used in FDTD Simulations

Status
Not open for further replies.

Sadabat

Member level 3
Joined
Dec 21, 2005
Messages
65
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,832
My frined do you know why C is not preferred instead fortran being used in the simulations of FDTD ?
 

xxargs

Full Member level 4
Joined
Jul 28, 2002
Messages
229
Helped
44
Reputation
88
Reaction score
2
Trophy points
1,298
Activity points
4,642
Sadabat said:
My frined do you know why C is not preferred instead fortran being used in the simulations of FDTD ?
Fortran and Lisp is very few old (and new) program language can handle complex numbers as datatype from begining in language - is very importent factor if want and try different types of math algorithm and after time collect to well tested library and build application based on this...

for example elecrical simulator 'Spice' (written on fortran in beginning) have historic very much bugs in ported 'C'-version and very hard to debug and fix for low math skills people depend of librarys handle exeption not same way as fortran library (for example handle infinity etc.) or using differnt algorithm for complex number in mathlib. etc.

---

Sun had good chance make good modern language to replace Fortran with Java - but missed... ie. not complex datatype as primary variable and default trusted mathlib with full working complex support on all math functions as sqrt, sin, cos, tan, sinh, cosh, tan, ln , log, y^x, 10^x, e^x and function inverses from beginning. (Lisp support this as standard, and Fortran more or less complete complex support)


In java now need using 'complex.add(x,y), complex.sub(x,y), complex.tan(x)' etc.
for math operation on object with external, not so tested and trusty home made complex library, compare to scientic people want handle complex operation like

'z = v + x - y ;' [1]

with complex variable easy as real number,

now in days java needs written

'complex z = complex.add (v, complex.sub(x,y));' [2]

... is not easy or nice to read....

(possibly wrong written example of java)



If I remeber rigth, java cannot make operator overload (for make new type of +,-,*,/ on new datatype) so complex handling in java tend going very verbose in function call on object every math operation and hard to read for debugging and analyse what happend...

I have see post process routine written in java to make from 'easy' written
complex math like [1] in java to make version [2] java before compiling to binary java application...

This miss of complex datatype in language design, not tempt scientific/math people going from Fortran to java


---

C++ have possibility to make operator overload for example complex handling, and have complex library support per default, but is not so popular in science and math people... possibly coming to late and seems more complex compare to 'C', so people still written i C or Fortran and using old but trusty fortran library...
 

    Sadabat

    points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top