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

2016-09-25 Thread Matthew Knepley
On Sun, Sep 25, 2016 at 4:06 AM, 丁老师  wrote:

> Dear professor:
>  In the ksp example ex50.c, i do not understand the meaning of
> *KSPSolve*
> 
> *(ksp,NULL,NULL);*
>
> * n**MatNullSpaceCreate* 
> *(**PETSC_COMM_WORLD*
>  
> *,**PETSC_TRUE*
>  
> *,0,0,);
>   *
>
>What is the meaning of NULL in the kspsolve. and two "0" in the
> MatNullSpaceCrea
> 
> te.
>

1) The NULL for KSPSolve() means that


http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetComputeOperators.html

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetComputeRHS.html#KSPSetComputeRHS

are used to make the problem.

2) The NullSpace is the space of constant functions with these arguments


  Matt

Regards
>
>
>
>
>
>
> At 2016-09-24 00:25:09, "Jed Brown"  wrote:
> >"Kong, Fande"  writes:
> >
> >> Any references on this topic except the users manual?  I am interested in
> >> mathematics theory on this topic.
> >
> >These are relevant. I've only skimmed them briefly, but they might
> >suggest ways to improve PETSc's handling of singular systems.  The
> >technique is ancient.
> >
> >https://doi.org/10.1137/S0895479803437803
> >
> >https://doi.org/10.1007/s10543-009-0247-7
>
>
>
>
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener


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 00:25:09, "Jed Brown"  wrote:
>"Kong, Fande"  writes:
>
>> Any references on this topic except the users manual?  I am interested in
>> mathematics theory on this topic.
>
>These are relevant. I've only skimmed them briefly, but they might
>suggest ways to improve PETSc's handling of singular systems.  The
>technique is ancient.
>
>https://doi.org/10.1137/S0895479803437803
>
>https://doi.org/10.1007/s10543-009-0247-7


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

2016-09-23 Thread Kong, Fande
Any references on this topic except the users manual?  I am interested in
mathematics theory on this topic.

Fande Kong,

On Fri, Sep 23, 2016 at 9:58 AM, Jed Brown  wrote:

> 丁老师  writes:
>
> > 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.
>
> See the users manual section on solving singular systems.
>


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

2016-09-23 Thread Jed Brown
"Kong, Fande"  writes:

> Any references on this topic except the users manual?  I am interested in
> mathematics theory on this topic.

These are relevant. I've only skimmed them briefly, but they might
suggest ways to improve PETSc's handling of singular systems.  The
technique is ancient.

https://doi.org/10.1137/S0895479803437803

https://doi.org/10.1007/s10543-009-0247-7


signature.asc
Description: PGP signature


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

2016-09-23 Thread Jed Brown
丁老师  writes:

> 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.

See the users manual section on solving singular systems.


signature.asc
Description: PGP signature


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

2016-09-23 Thread Matthew Knepley
On Fri, Sep 23, 2016 at 9:38 AM, 丁老师  wrote:

> 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.
>

Tell the matrix it has a nullspace of constants:

http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetNullSpace.html

  Thanks,

Matt


> Regards
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener