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
-- next part --
An HTML attachment was scrubbed...
URL:
http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130423/7b642ab9/attachment.html
-- next part --
An HTML attachment was scrubbed...
URL:
http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130423/6d41b396/attachment.html
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
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.
How to set different number of ghost points for different cpu.
in the VecGhostGetLocalForm(gx,lx), does the lx reduplicate the memory of
global vector gx?
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);
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
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.
which function return the value at the diagonal of matrix A(i,i).
Regards.
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
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
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.
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
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:
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
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
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);
: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
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
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.
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.
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:
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.
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
KSPSetType(ksp,?);
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
/* 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;
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
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
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
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.
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
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:
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
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.
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
At 2013-09-12 22:43:10,丁老师 ztdepya...@163.com wrote:
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:
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.
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.
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
i want to define a function for the computation of the equation residual in a
special way.
does petsc provide this capbility
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
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.
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
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
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
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.
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
Dear friends:
I am receiving error about " not for unassembled matrix"
Dear friends:
I add the "-std=c++11" in the make file, but it still give me warning.
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
Dear professor:
How to broadcast a double value to all the nodes in the cluster with Petsc
Dear professor:
How to Get the last absolute residual that has been computed
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
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
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
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()
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'.
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
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
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
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
How to solve the Ax=b with parallel SOR or parallel GS only.
73 matches
Mail list logo