[petsc-users] Does Petsc has Finite volume code example

2013-04-18 Thread
Does Petsc has Finite volume code example with Ksp -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130418/d08e72cc/attachment.html

[petsc-users] Does Petsc has diagonal preconditioner for Bicgstab algorithm

2013-04-23 Thread
-- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130423/7b642ab9/attachment.html

[petsc-users] How to set a minimum iteration number for Bicgstab solver

2013-04-23 Thread
-- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130423/6d41b396/attachment.html

[petsc-users] How to write the dmma mesh into tecplot format

2013-05-25 Thread
I write a code for the solution of heat conduction problem with DMMA. i now want to write the output file in a tecplot format by the root cpu. how to gather the coordinate and field infor into the root process. Regards

[petsc-users] Some confusion about the vec tutorial ex8.c

2013-05-26 Thread
In ex8.c, ISLocalToGlobalMappingCreate usd the ng as the number of local element. 'ng' is te local size plus 2 ghost positions. But we create the vector x with VecCreate, x does not has ghost points. how to explain this mapping.

[petsc-users] some problem about VecCreateGhost

2013-05-29 Thread
How to set different number of ghost points for different cpu.

[petsc-users] VecGhostGetLocalForm(gx,lx)

2013-05-30 Thread
in the VecGhostGetLocalForm(gx,lx), does the lx reduplicate the memory of global vector gx?

[petsc-users] confusion about MatSetValues(A, ,ADD_VALUES);

2013-05-31 Thread
I write a simple c procedure to test the MatSetValues. the main body of procedure is like this int row=1; int col=10; double v=1.0; MatSetValues(A,1,row,1,col,v,INSERT_VALUES); MatSetValues(A,1,row,1,row,v,ADD_VALUES);

Re: [petsc-users] confusion about MatSetValues(A, ,ADD_VALUES);

2013-05-31 Thread
in the user manual, it taks about the MAT_FLUSH_ASSEMbLY, and MAT_FINAL_ASSEMBLY, how to use the MAT_FLUSH_ASSEMBLY, if i want to mix the add value and insert value. 在 2013-06-01 00:30:45,Jed Brown jedbr...@mcs.anl.gov 写道: 丁老师 ztdepya...@163.com writes: I write a simple c

[petsc-users] PCILU does not work

2013-05-31 Thread
My problem can be solved sucessfully with the default ksp setting, but if i change the pc with PCsetTye(pc,PCILU), it gives me the following error. Error mesage no supoort for the operation ofr this object type! matrix format mpiaij does not shave a build in PETSc ILU! Regards.

[petsc-users] How to get the matrix diagonal value A(i,i)

2013-06-10 Thread
which function return the value at the diagonal of matrix A(i,i). Regards.

[petsc-users] run examples with kdevelop

2013-06-21 Thread
Dear friends: I want to runmy code the kdevelop4.4, but could you provide me a cmake file for it. i can run it smoothly with the make file. but how to translate it into a cmake filel include ${PETSC_DIR}/conf/variables include ${PETSC_DIR}/conf/rules ALL: main main: main.o chkopts

Re: [petsc-users] run examples with kdevelop

2013-06-21 Thread
but how to use it? 在 2013-06-21 20:17:46,Jed Brown jedbr...@mcs.anl.gov 写道: 丁老师 ztdepya...@163.com writes: Dear friends: I want to runmy code the kdevelop4.4, but could you provide me a cmake file for it. i can run it smoothly with the make file. but how to translate

[petsc-users] which function return the L2 norm of the residual vector in ksp solver

2013-07-09 Thread

[petsc-users] can i use the Vec created with VecCreateGhost in the kspsolve;

2013-07-26 Thread

[petsc-users] how to scale the diagonal of a matrix

2013-07-30 Thread
i want to implement the under-relaxation version of the equation. it nees to scale the diagonal value a matrix with the relaxation factor, could you please tell me how to achieve this goal.

[petsc-users] Segmentatoin fault

2013-07-31 Thread
I write a FVM code for the convection diffusion problem on a 2D cartesian grid. the code can run correctly with a grid of 720*720. and it use only 26% of the system memory(8G) during its running. but if i increase the grid to 800*800, it gives me the following error? could you please give me

Re: [petsc-users] how to select values from certain positions of a vec from different process to process 0.

2013-07-31 Thread
of the size zero on all other processes create a VecScatter using these IS, the global Vec and the seq Vec. use VecScatterBegin/End to send over the values. Barry On Jul 30, 2013, at 6:37 PM, 丁老师 ztdepya...@163.com wrote:

Re: [petsc-users] Segmentatoin fault

2013-07-31 Thread
i get the infor from the system load monitor 在 2013-07-31 23:36:38,Jed Brown jedbr...@mcs.anl.gov 写道: 丁老师 ztdepya...@163.com writes: I write a FVM code for the convection diffusion problem on a 2D cartesian grid. the code can run correctly with a grid of 720*720. and it use only 26

[petsc-users] Use kspsolve repeatly

2013-07-31 Thread
I need to use the kspsolve(A,b,x) repeatly in my code in the following style. but i have noticed from the system load monitor that during the code running, it allocate new memeory every step. I use the default setting for the PC. Could you please told me how to resolve this problem. for

[petsc-users] confusion about VecGetArray on a sequential vec

2013-08-01 Thread
I create a sequential vec seqx, and i get it value with VecGetArrary, since seqx is created only in process 0, why every process can output the value of the seqx. VecCreateSeq(PETSC_COMM_SELF,5,seqx); VecView(seqx,PETSC_VIEWER_STDOUT_WORLD); double *seqarry; VecGetArray(seqx,seqarry);

Re: [petsc-users] confusion about VecGetArray on a sequential vec

2013-08-01 Thread
:11, 丁老师 ztdepya...@163.com wrote: I create a sequential vec seqx, and i get it value with VecGetArrary, since seqx is created only in process 0, why every process can output the value of the seqx. VecCreateSeq(PETSC_COMM_SELF,5,seqx); VecView(seqx,PETSC_VIEWER_STDOUT_WORLD); double

Re: [petsc-users] Use kspsolve repeatly

2013-08-01 Thread
I use the latest version PETSC, and the matrix has the same nonzero pattern during each outer iteration. I want to know does the kspsolve allocate memory for PC dring each call. 在 2013-08-01 20:46:36,Matthew Knepley knep...@gmail.com 写道: On Thu, Aug 1, 2013 at 12:58 PM, 丁老师 ztdepya...@163

[petsc-users] how to get the input value from the input command

2013-08-05 Thread
i need to get the number of processor in the command line as the input of my function.for example, mpiexec -np 4 i need the 4 as the input number of my function. how to get it.

[petsc-users] how to know the original global index after the partition.

2013-08-07 Thread
In the ISPartitioningToNumbering(IS part,IS *is) is define thee index set that defines the global numbers on each part. but how to get the original global index.

[petsc-users] Does normal PC support --with-precision==_float128

2013-08-11 Thread

Re: [petsc-users] Does normal PC support --with-precision==_float128

2013-08-11 Thread
the external solvers which are not written to work with __float128. What solver do you want to use? Barry On Aug 11, 2013, at 7:22 PM, 丁老师 ztdepya...@163.com wrote:

[petsc-users] some problem with the VecCreateGhost.

2013-08-15 Thread
I want to know 1. What is the relationship between Vhat and LocalVhat. Is the LocalVhat a copy of the Vhat plus the Ghost values. I think the LocalVhat will consume more memeory than the Vhat, am i right? 2. can i direct call VecGetArrary to the Vhat if i do not operate on the ghost value.

Re: [petsc-users] some problem with the VecCreateGhost.

2013-08-15 Thread
What the function of restore the local form, can i use VecDestroy to free the local form only; 在 2013-08-15 19:13:52,Jed Brown jedbr...@mcs.anl.gov 写道: 丁老师 ztdepya...@163.com writes: I want to know 1. What is the relationship between Vhat and LocalVhat. Is the LocalVhat a copy

[petsc-users] How to use jacobi or Gauss-seilder iteration to solve problem

2013-08-15 Thread
KSPSetType(ksp,?);

[petsc-users] what is the meaning of matrix file output by matview.

2013-08-16 Thread
Matrix Object: 1 MPI processes type: mpiaij 16 40 1 4 7 10 12 15 18 21 23 26 29 32 34 36 38 40 41 1 2 5 2 3 6 3 4 7 4 8 5 6 9 6 7 10 7 8 11 8 12 9 10 13 10 11 14 11 12 15 12 16 13 14 14 15 15 16 16 2.2915e+00 -1.1458e+00

[petsc-users] I write the following program, it can converge with 4 processor, but can not converge with 2 , or 3 processor. Could you help me out

2013-08-16 Thread
/* Program usage: mpiexec ex1 [-help] [all PETSc options] */ static char help[] = Basic vector routines.\n\n; #include petscksp.h #include petscvec.h int main(int argc,char **argv) { int N=16; int MyRank; Mat A; PC Pc; KSP ksp; Vec b,x;

Re: [petsc-users] I write the following program, it can converge with 4 processor, but can not converge with 2 , or 3 processor. Could you help me out

2013-08-16 Thread
thank you very much! could you please suggest me a robust preconditioner which is independent of the number of processor. 在 2013-08-16 19:54:01,Matthew Knepley knep...@gmail.com 写道: On Fri, Aug 16, 2013 at 6:13 AM, 丁老师 ztdepya...@163.com wrote: Its common for iterative solvers

[petsc-users] how to reate an IS of size 0 on all the other processes and a seq Vec of the size zero on all other processes

2013-08-22 Thread

[petsc-users] how to use the Euclid preconditioner from Hypre in the petsc

2013-08-24 Thread
I configured the petsc without the hypre download. i want to download and install the hypre seperately. could you please tell me how to use the euclid precontioner from hypre in petsc. Regards

Re: [petsc-users] use kspsolve repeately

2013-08-24 Thread
thank you . but the matrix element has been changed in the third and fourth call. how to re calculate the preconditioner. 在 2013-08-24 18:18:17,Matthew Knepley knep...@gmail.com 写道: On Sat, Aug 24, 2013 at 4:57 AM, 丁老师 ztdepya...@163.com wrote: in my code, i need to use kspsolve

[petsc-users] how to know the local size of the grid after partition

2013-08-26 Thread
I partitioned the FVM Mesh into 4 parts. the isg and is contain the new goloba number and new process number of each local nodes. but could you please tell me how to know the local size of the grid and local range of the grid.

Re: [petsc-users] how to know the local size of the grid after partition

2013-08-26 Thread
i read in my own unstructured grid system, i have vertices coodinate, and connection table. 在 2013-08-27 02:58:05,Jed Brown jedbr...@mcs.anl.gov 写道: 丁老师 ztdepya...@163.com writes: I partitioned the FVM Mesh into 4 parts. the isg and is contain the new goloba number and new process

[petsc-users] can i set values of vec again after vecassemblebegin and vecassembleend.

2013-08-30 Thread

[petsc-users] Could you please give me some advice for the following error

2013-09-04 Thread
1] ***ASSERTION failed on line 243 of file /home/ztdep/Downloads/petsc-3.3-p6/externalpackages/parmetis-4.0.2-p3/libparmetis/match.c:k = firstvtx k lastvtx [ 1] 2562 5124 10 0 0 main: /home/ztdep/Downloads/petsc-3.3-p6/externalpackages/parmetis-4.0.2-p3/libparmetis/match.c:243:

Re: [petsc-users] Could you please give me some advice for the following error

2013-09-04 Thread
at 10:23 AM, 丁老师 ztdepya...@163.com wrote: yes, i am computing convection diffusion problem with a triangle unstructured grid. the matrix coefficients is unsymemetric. but is it a necessary for the parmetis to do the work? The matrix can be nonsymmetric, but it has to be structurally symmetric

[petsc-users] does kspsolve perform the reordering to reduce the bandwith of sparse matrix

2013-09-08 Thread

[petsc-users] how to simultaneously perform the partition of the unstructured mesh and reduction bandwidth of the resulting sparsematrix

2013-09-12 Thread

Re: [petsc-users] how to simultaneously perform the partition of the unstructured mesh and reduction bandwidth of the resulting sparsematrix

2013-09-12 Thread
i think bandwidth minimization will improve the convergence of the kspsolver, am i right? At 2013-09-13 01:59:59,Jed Brown jedbr...@mcs.anl.gov wrote: Matrix bandwidth minimization is an (imprecise) optimization to improve cache reuse. So just partition globally and then reorder locally.

Re: [petsc-users] how to simultaneously perform the partition of the unstructured mesh and reduction bandwidth of the resulting sparsematrix

2013-09-12 Thread
which petsc function perform the reordering of the matrix At 2013-09-13 02:54:38,Barry Smith bsm...@mcs.anl.gov wrote: On Sep 12, 2013, at 12:59 PM, Jed Brown jedbr...@mcs.anl.gov wrote: Matrix bandwidth minimization is an (imprecise) optimization to improve cache reuse. So just

[petsc-users] i use -pc_hypre_type euclid, but it does not work, the default preconditioner is still used. how to call the euclid preconditioner

2013-09-14 Thread
At 2013-09-12 22:43:10,丁老师 ztdepya...@163.com wrote:

Re: [petsc-users] i use -pc_hypre_type euclid, but it does not work, the default preconditioner is still used. how to call the euclid preconditioner

2013-09-14 Thread
thank you. i forgotten to use it. 在 2013-09-15 06:13:35,Barry Smith bsm...@mcs.anl.gov 写道: Did you also use -pc_type hypre ? That is also needed. On Sep 14, 2013, at 7:18 AM, 丁老师 ztdepya...@163.com wrote: At 2013-09-12 22:43:10,丁老师 ztdepya...@163.com wrote:

[petsc-users] Does the kspsolver used in the DMDA take the special structrue of the cartesian coordinate into consideration.

2013-09-15 Thread
since in cartesian coordinate system, the matrix vector operation can be explicitly known. Does the kspsolver used in the DMDA take the special structrue of the cartesian coordinate into consideration.

[petsc-users] [2]PETSC ERROR: MatPermute not available for Mat type mpiaij!

2013-09-16 Thread
i set up my matrix A with MatCreate(PETSC_COMM_WORLD,A); MatSetSizes(A,PMesh-LocalSize,PMesh-LocalSize,PETSC_DECIDE,PETSC_DECIDE); MatSetFromOptions(A); MatMPIAIJSetPreallocation(A,5,PETSC_NULL,5,PETSC_NULL); then which type should i use to support the matpermute.

Re: [petsc-users] [2]PETSC ERROR: MatPermute not available for Mat type mpiaij!

2013-09-16 Thread
to reorder the unknowns on the mesh on each process. For the ordering I think you want to use MATORDERINGRCM. Now you just renumber the mesh nodes on each process and update the the ghost node information to reflect the new ordering. Barry On Sep 16, 2013, at 7:14 AM, 丁老师 ztdepya...@163

[petsc-users] can i define a user defined residual function to determin the convergence of the kspsolve

2013-09-17 Thread
i want to define a function for the computation of the equation residual in a special way. does petsc provide this capbility

[petsc-users] How to set the value in Ax=b.

2014-04-28 Thread
Dear group: I have assembled the coefficients of A and b. My computation alogrithm need to specify a component of x to be a constant value. for example x[5]=3.14; then how to resolve this problem. Regards

[petsc-users] How to run a parallel code with mpiexec -np 1

2014-06-07 Thread
Dear friends: I write a parallel code with Petsc, but it does not work with mpiexec -np 1 . since Petsc automatically allocate the vec and mat according to the number of cpu, why it does not work. and how to modify the parallel code.

[petsc-users] how to install two different version petsc in the same pc

2014-08-18 Thread
I need to install a library that could only be run with petsc 3.2. but i have installed the 3.3-p6. how to install the petesc 3.2 in the same pc

Re: [petsc-users] how to install two different version petsc in the same pc

2014-08-18 Thread
how to set the PETSC_DIR with two different value. At 2014-08-18 08:36:28, Jed Brown j...@jedbrown.org wrote: 丁老师 ztdepya...@163.com writes: I need to install a library that could only be run with petsc 3.2. but i have installed the 3.3-p6. how to install the petesc 3.2 in the same

[petsc-users] which solver should i use to solve a dense matrix occured from spectral method

2016-04-12 Thread
Dear friends: the matrix from spectral method is a dense matrix, and some entries at diagonal may have a zero value. which solver and preconditioner should i use to solve it. Regards

[petsc-users] error: AO was not declared in this scope.

2016-04-24 Thread
Dear friends: I am adding the partition to my CFD code, but it give me error about " AO was not declared in this scope". the parallel code has been run suecesfuly with a off line mesh partition with ksp solver. Regards.

[petsc-users] Which command gather the distributed vector to the root rank

2016-04-19 Thread
Dear friends: I Want to gather the vector to the root rank. which command perform this task. i only find that with viewer, we can write it to the root rank. Regards

[petsc-users] can i use MatCreatDense to creat a parallel matrix for KSP

2016-04-19 Thread
Dear friends: I am receiving error about " not for unassembled matrix"

[petsc-users] how to compile the program with c++11 support.

2016-04-17 Thread
Dear friends: I add the "-std=c++11" in the make file, but it still give me warning.

[petsc-users] KSPSetOperators(ksp, A, A, SAME_NONZERO_PATTERN) does not work any more

2016-08-07 Thread
Dear friends: I just update to 3.6.3, but the command " KSPSetOperators(ksp,A,A,SAME_NONZERO_PATTERN)" does not work any more. could you please give me some suggestions Regards

[petsc-users] How to broadcast a double value to all the nodes in the cluster with Petsc

2016-10-05 Thread
Dear professor: How to broadcast a double value to all the nodes in the cluster with Petsc

[petsc-users] How to Get the last absolute residual that has been computed

2016-10-07 Thread
Dear professor: How to Get the last absolute residual that has been computed

[petsc-users] Does Petsc support matrix diagonalization

2016-09-19 Thread
Dear friends: I want to diagonalize matrix D: D=PAP^(-1). where A is the diagonal matrix , P is the transformation matrix. Does Petsc has this routine to perform this task. Regards

[petsc-users] How to solve the pressure possion equations with four neuman bc

2016-09-23 Thread
Dear friends: In the projection method for the solution of incompressible flow, a pressure equation with four neuman bcs need to be solved. but the pressure matrix is singular. it gives divergence solution. how to solve this kind of equations. Regards

Re: [petsc-users] Question regarding updating PETSc Fortran examples to embrace post F77 constructs

2016-08-27 Thread
Dear sir: I think we might following the history trend, forgot fortran77. We are facing HPC computation,so HPC fortran is out choice. Regard At 2016-08-27 10:54:14, "Barry Smith" wrote: > > PETSc users, > >We've always been very conservative in

[petsc-users] What caused this problem."PetscInitialize() must be called before PetscFinalize()"

2016-08-26 Thread
Dear friends: My code run without any problem yesterday, but it gives me the following error. I do not know what is the reason? Regards [0]PETSC ERROR: #1 PetscOptionsInsertFile() line 563 in /home/ztdep/Downloads/petsc-3.6.3/src/sys/objects/options.c [0]PETSC ERROR: #2 PetscOptionsInsert()

[petsc-users] Slep test error

2016-09-27 Thread
Dear professor: I have sucessfully make the slep 3.7.2 package. But the final step "make test" gives me the following error: I do not the reason. make test makefile:31: /lib/slepc/conf/slepc_common: No such file or directory make: *** No rule to make target '/lib/slepc/conf/slepc_common'.

Re: [petsc-users] How to solve the pressure possion equations with four neuman bc

2016-09-25 Thread
Dear professor: In the ksp example ex50.c, i do not understand the meaning of KSPSolve(ksp,NULL,NULL); nMatNullSpaceCreate(PETSC_COMM_WORLD,PETSC_TRUE,0,0,); What is the meaning of NULL in the kspsolve. and two "0" in the MatNullSpaceCreate. Regards At 2016-09-24

[petsc-users] How to scatter values

2016-10-21 Thread
Dear professor: I  partitioned my 2D cartesian grid with  4rows*4cols CPUS.    12  13 14 15      8   9  10  11 4   5  6  7 0   1  2   3        Now i need to scatter the values belonging to cpu5 to every cpu along x 

[petsc-users] cannot convert ‘int*’ to ‘PetscInt*

2016-10-16 Thread
Dear professor: I met the following error for Petsc 3.7.3. I delcare LocalSize as int, but it doesn't work anymore. it works for 3.6.3. error: cannot convert ‘int*’ to ‘PetscInt* {aka long int*}’ for argument ‘2’ to ‘PetscErrorCode VecGetLocalSize(Vec, PetscInt*)’ VecGetLocalSize

[petsc-users] How to know the cpu rank that hold the minimum vec values

2017-03-23 Thread
Dear professor: I got the location and value of the minimum in a vec with VecMin, But how to know the rank of CPU which holds the minimum values. This rank should be known in the whole communicator. Regards

[petsc-users] How to solve the Ax=b with parallel SOR or parallel GS only.

2017-03-12 Thread
How to solve the Ax=b with parallel SOR or parallel GS only.