Q. of multi-componet system and data from input file

tsjb00 tsjb00 at hotmail.com
Mon May 12 13:59:49 CDT 2008


Hi, there! I am a beginner of PETSc and I have some questions about using PETSc to solve for a multi-componet system. The code is supposed to be applicable to different systems, where number of components, properties of components ,etc. would be input for the program. 

Say I define DA with dof=number of components = nc, number of grid in x,y,z = nx,ny,nz respectively. When I use DA related functions, it seems that by default the data objects (vectors, arrays, etc.) would be of nx*ny*nz*nc. However, some physical variables are independent of specific components, which means I need to handle data objects of nx*ny*nz*integral. My questions are:

Does PETSc include tools or examples to deal with such problems?

If not, how can I make sure the 'nx*ny*nz*any integral' data objects are distributed over the nodes in a way defined by DA? I am using PETSc_Decide for partitioning right now. I would prefer that at least the number of processors be flexible.

I need to read in a property f(x,y,z) from a data file and then distribute the data across different processors. Any suggestions on this would be appreciated. My concern is that if I use MPI_Send/Receive, the data to be transferred might correspond to discontinuous indices due to the partitioning.

Many thanks in advance!

BJ

> 

_________________________________________________________________
MSN 中文网,最新时尚生活资讯,白领聚集门户。
http://cn.msn.com




More information about the petsc-users mailing list