[CIG-CS] Discontinuous viscosity
Walter Landry
walter at geodynamics.org
Mon Mar 5 13:11:50 PST 2012
Back to the list.
Matthew Knepley <knepley at mcs.anl.gov> wrote:
> On Mon, Mar 5, 2012 at 9:01 AM, Walter Landry <walter at geodynamics.org>wrote:
>
>> Back to the list.
>>
>> Matthew Knepley <knepley at mcs.anl.gov> wrote:
>> > 2012/3/4 Walter Landry <walter at geodynamics.org>
>> > 2) You should be using PETSc, because even with GS, you could
>> > converge in 1000 iterations by partitioning fields using
>> > PCFIELDSPLIT. You could do it in < 10 using a nice Schur
>> > complement preconditioner.
>>
>> Not yet. The point of this exercise is to have a method that I can
>> eventually plug into Gamr. Gamr uses SAMRAI, so I would only be able
>> to use Petsc for the solve on the coarsest level. I still need a
>> smoother for the finer levels.
>
> I though SAMRAI could use PETSc on all levels. If not, the design is quite
> crappy. Have you talked to Michael Pernice abut this?
I take it back. Samrai defines a custom vector class that can be used
as a drop-in replacement for Petsc's Vec. It does not implement all
of operations defined in Petsc's VecOps. In particular, these are not
implemented and will abort at runtime
vecSetValues
vecAssemblyBegin
vecAssemblyEnd
vecSetOption
vecSetValuesBlocked
vecPlaceArray
vecReplaceArray
vecReciprocal
vecViewNative
vecConjugate
vecSetLocalToGlobalMapping
vecSetValuesLocal
vecResetArray
vecSetFromOptions
vecLoad
vecPointwiseMax
vecPointwiseMaxAbs
vecPointwiseMin
vecGetValues
these give bogus results for the index (though the main result is ok)
vecMax
vecMin
and these always return zero
getDataSize
getLocalDataSize
So I do not know which solvers will work and which will not.
There is also an interface that lets you use Petsc's SNES as a driver
for the overall solution. That, I believe, works. I had to patch
Samrai to build with Petsc 3.1.0, and I used their example as a test.
I sent a patch to the SAMRAI developers and got no response.
With that said, I am still at the point where I am trying to figure
out what works. It is quite possible that I will use SNES in the
final code.
Cheers,
Walter Landry
More information about the CIG-CS
mailing list