I was actually considering maintaining backward-compatibility since there
may be a small number of people (perhaps only Ata) that could be using this
functionality, although it is still pretty new.  Replacing these entirely
with DMSNESXXX would require them to upgrade to petsc-dev or petsc-3.4
(once it's out).  I'm not yet sure what's easier overall.
Dmitry

On Sat, Feb 2, 2013 at 3:56 PM, Jed Brown <j...@59a2.org> wrote:

> Cool, I'll hold off on testing with petsc-dev then.
>
>
> On Sat, Feb 2, 2013 at 3:24 PM, Dmitry Karpeev <karp...@mcs.anl.gov>wrote:
>
>> Yes, I am going to remove those.  I added those before petsc-3.3 was
>> released, although it might not have made into the libMesh trunk before
>> then.
>> Dmitry.
>>
>>
>> On Sat, Feb 2, 2013 at 2:27 PM, Jed Brown <j...@59a2.org> wrote:
>>
>>> Dmitry, this patch used an API (DMSetFunction and DMSetJacobian) that
>>> was deprecated at that time and has since been removed.
>>>
>>>
>>> https://github.com/libMesh/libmesh/commit/d6a70b22dc6db38805851dc01533c73a26ca21e8
>>>
>>> It would be pretty easy to update this code to use DMSNESSetFunction and
>>> DMSNESSetJacobian (see  src/snes/utils/dmdasnes.c for an example of how
>>> this should be done), but it's somewhat more work to maintain backward
>>> compatibility.
>>>
>>> Are you or someone else planning to do this?
>>>
>>>
>>> I would also suggest something like this (PETSC_VERSION_GT is defined in
>>> petsc-dev, needs petsc_macro.h support in general) to make this test work
>>> after we release petsc-3.4.
>>>
>>> diff --git i/src/solvers/petsc_linear_solver.C
>>> w/src/solvers/petsc_linear_solver.C
>>> index ae2c7a2..42e3d95 100644
>>> --- i/src/solvers/petsc_linear_solver.C
>>> +++ w/src/solvers/petsc_linear_solver.C
>>> @@ -217,7 +217,7 @@ void PetscLinearSolver<T>::init ()
>>>        // Have the Krylov subspace method use our good initial guess
>>>        // rather than 0, unless the user requested a KSPType of
>>>        // preonly, which complains if asked to use initial guesses.
>>> -#if PETSC_VERSION_LESS_THAN(3,0,0) || !PETSC_VERSION_RELEASE
>>> +#if PETSC_VERSION_LESS_THAN(3,0,0) || PETSC_VERSION_GT(3,3,0)
>>>        // Pre-3.0 and petsc-dev (as of October 2012) use non-const
>>> versions
>>>        KSPType ksp_type;
>>>  #else
>>> @@ -336,7 +336,7 @@ void PetscLinearSolver<T>::init ( PetscMatrix<T>*
>>> matrix )
>>>        // Have the Krylov subspace method use our good initial guess
>>>        // rather than 0, unless the user requested a KSPType of
>>>        // preonly, which complains if asked to use initial guesses.
>>> -#if PETSC_VERSION_LESS_THAN(3,0,0)
>>> +#if PETSC_VERSION_LESS_THAN(3,0,0) || PETSC_VERSION_GT(3,3,0)
>>>        KSPType ksp_type;
>>>  #else
>>>        const KSPType ksp_type;
>>>
>>>
>>
>>
>> --
>> Dmitry Karpeev, Ph.D.
>> Assistant Computational Mathematician
>> Mathematics and Computer Science
>> Argonne National Laboratory
>> Argonne, Illinois, USA
>> and
>> Fellow
>> Computation Institute
>> University of Chicago
>> 5735 S. Ellis Avenue
>> Chicago, IL 60637
>> -----------------------
>> Phone: 630-252-1229
>> Fax:   630-252-5986
>>
>
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to