Re: [Libmesh-users] Libmesh with Tao

2011-06-02 Thread Roy Stogner
On Fri, 3 Jun 2011, Jed Brown wrote: > PETSc uses const for all array arguments that are const. If any are > missing, it's a bug. PETSc does not use const for typedefs because > of the language (scope of const as it applies to typedefs). To have > a const-correct API, we would either need to cre

Re: [Libmesh-users] Libmesh with Tao

2011-06-02 Thread Jed Brown
On Thu, Jun 2, 2011 at 21:49, Roy Stogner wrote: > are we some kind of oddball > nitpickers for using the const keyword in math software? > PETSc uses const for all array arguments that are const. If any are missing, it's a bug. PETSc does not use const for typedefs because of the language (scop

Re: [Libmesh-users] Libmesh with Tao

2011-06-02 Thread Roy Stogner
On Thu, 2 Jun 2011, Vijay S. Mahadevan wrote: > I have a question related to this. Since PetscVector does not provide > a const version of vec(), what do you do when all you have is a const > PetscVector, for example in the residual/assembly but want to access > the vec() explicitly ? Petsc does

Re: [Libmesh-users] Libmesh with Tao

2011-06-02 Thread Vijay S. Mahadevan
Roy, I have a question related to this. Since PetscVector does not provide a const version of vec(), what do you do when all you have is a const PetscVector, for example in the residual/assembly but want to access the vec() explicitly ? Petsc does not have any "const" qualifiers and so this needs

Re: [Libmesh-users] Libmesh with Tao

2011-06-02 Thread Roy Stogner
On Thu, 2 Jun 2011, Ataollah Mesgarnejad wrote: > I was wondering if it is possible to use Libmesh along with Tao to > do a constrained minimization? What I think is needed a way to use > Libmesh to make PETSc Mat and Vec. PetscMatrix::mat() PetscVector::vec() --- Roy --

[Libmesh-users] Libmesh with Tao

2011-06-02 Thread Ataollah Mesgarnejad
Dear all, I was wondering if it is possible to use Libmesh along with Tao to do a constrained minimization? What I think is needed a way to use Libmesh to make PETSc Mat and Vec. Best, Ata -- Simplify data backup and re