Hi Ben, Sure you can - it just means you will need to save the X,Y,Z locations of the grid points as well. All a DA requires is a regular I,J,K numbering over your grid.
Berend. > Hi, > > just to clarify. I'm using structured grid but not cartesian ie > strictly horizontal/vertical. So I can't DA, can I? > > But can I use DMMG? So PETSc comes with a multigrid preconditioner > and solver? > > Thank you > > On 1/26/07, Matthew Knepley <knepley at gmail.com> wrote: > > On 1/25/07, Ben Tay <zonexo at gmail.com> wrote: > > > Hi, > > > > > > I was discussing with another user in another forum > > > (cfd-online.com) about using PETSc in my cfd code. I am now > > > using KSP to solve my momentum and poisson eqn by inserting > > > values into the matrix. I was told that using PETSc this way is > > > only for unstructured grids. It is very inefficient and much > > > slower if I'm using it for my structured grid because I am not > > > exploiting the regular structure of my grid. > > > > > > Is that true? I'm solving flow around airfoil using c-grid. > > > > If you are using a Cartesian grid, the DA formulation is better. > > However, this nonsense from people about > > "massive inefficiency" is just crap. There is a small difference > > in time which is almost trivial. However, there > > is a big difference in ease of programming. I am always fascinated > > how people can magnify small problems > > in order to preserve their job. > > > > > > So how can I improve? Is it by using DA? I took a glance and it > > seems > > > > > quite complicated. > > > > Wrong glance. Much simpler. > > > > > > Also, is multigrid available in PETSc? Chapter 7 discusses about > > it but > > > > > it seems very brief. Is there a more elaborate tutorial besides > > > that c examples? > > > > Yes, use DMMG. Much easier with DA. > > > > Matt > > > > > > Hope someone can give me some ideas. > > > > > Thank you. > > > > -- > > One trouble is that despite this system, anyone who reads journals > > widely and critically is forced to realize that there are scarcely > > any bars to eventual > > publication. There seems to be no study too fragmented, no > > hypothesis too trivial, no literature citation too biased or too > > egotistical, no design too > > warped, no methodology too bungled, no presentation of results too > > inaccurate, too obscure, and too contradictory, no analysis too > > self-serving, > > no argument too circular, no conclusions too trifling or too > > unjustified, and > > no grammar and syntax too offensive for a paper to end up in > > print. -- Drummond Rennie
