CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   unstructured grid (http://www.cfd-online.com/Forums/main/2911-unstructured-grid.html)

hong December 18, 2000 06:31

unstructured grid
 
Hi,

I am gettng hand on writing a finite element code based on the 3-D unstructured grid/mesh in the computation of eletromagnetic field. Are there anyone who know the commonly used data structure and coefficients assembly routines ?

Futhermore, Are there any routines which can be used in the LU decomposition and Conjugate gradient solver in unstructured grid?

Thanks in advance

hong

Sebastien Perron December 18, 2000 07:12

Re: unstructured grid
 
1) I don't have any references about the data structures "commonly used". But, I have written my own routines in C++ to store the coefficients for a 3D unstructed mesh. I could send you the parts of the code that are involved with storing the coefficients and constructing the data structure.

2) IN 3D, You'll need A LOT of memory to store the matrices coming from an LU decomposition. These matrices will be almost full. To store them in double precision, you will need about 8*n^2 of memory. Which is only 11000 elements for 1gig of ram memory. These matrices have far more coefficients than the original matrice. The correspondance is not one for one. Saad has poposed an algorithm to do an incomplete LU decomposition. But still, you'll end up with far more coefficients. And the structure of theses matrices will still be different from the original matrice.

3) If you need more info about the storage of the coeffcients and the solution algorithm send me an e-mail.

George M December 20, 2000 12:05

Re: unstructured grid
 
Hi, Sebastien, Right now I am considerung the following dilemma: the flexibility which is offered by Unstructured Grids (UG) against increasing computational/memory costs compared with using the "structured" ones. Not the last role here plays the programming language. I have a vast experience how one can choose data structures for UG in C. It would be interesting to hear you oppinion about using C++ for UG, especially if it worth using C++, do you write "algebra" also in C++, and how much (proc. time, memory) you pay for flexibility.

Sebastien Perron December 27, 2000 12:04

Re: unstructured grid
 
1) All that can be done in C++ can be done (in a more akward way ) in C.

2) If you don't go crazy on OOP programming (i.e do not try to put everything in objects and Hide everything in protected mode) there will be no significative memory costs nor speed costs.

3) All my code is written in C++, because I find this language more flexible and user-friendly. As an exemple, if you define a Matrice class and a Vector class, the product A*b can be written in the same way in your software (instead of multiply(A,b) for exemple)

There is no clear answer.


All times are GMT -4. The time now is 23:17.