[petsc-users] GAMG and linear elasticity

Tabrez Ali stali at geology.wisc.edu
Tue Aug 27 17:22:03 CDT 2013


I had missed PCSetCoordinates in ex56.

So is there a correspondence b/w the coordinates [0.x 0.y 0.z 1.x 1.y  
1.z ...] passed to PCSetCoordinates/MatNullSpaceCreateRigidBody and  
the solution vector [0.ux 0.uy 0.uz ...]? What happens when I am  
solving the poroelasticity problem where there is an additional  
pressure field associate with each node?

Tabrez

On Aug 27, 2013, at 3:15 PM, Jed Brown wrote:

> Tabrez Ali <stali at geology.wisc.edu> writes:
>
>> Hello
>>
>> What is the proper way to use GAMG on a vanilla 3D linear elasticity
>> problem. Should I use
>>
>> -pc_type gamg -pc_gamg_type agg -pc_gamg_agg_nsmooths 1
>
> Yeah, and only the first of these is needed because the others are
> default with -pc_type gamg.
>
>> -pc_type fieldsplit -pc_fieldsplit_block_size 3 -fieldsplit_pc_type  
>> gamg
>> -fieldsplit_pc_gamg_type agg -fieldsplit_pc_gamg_agg_nsmooths 1
>>
>> Do these options even make sense? With the second set of options  
>> the %
>> increase in number of iterations with increasing problem size is  
>> lower
>> than the first but not optimal.
>
> And it's probably more expensive because it has to do inner solves.
> Also, if you have less compressible regions, it will get much worse.
>
>> Also, ksp/ksp/examples/ex56 performs much better in that the number  
>> of
>> iterations remain more or less constant unlike what I see with my own
>> problem. What am I doing wrong?
>
> You probably forgot to set the near null space.  You can use
> MatSetNearNullSpace (and maybe MatNullSpaceCreateRigidBody) or the  
> more
> hacky (IMO) PCSetCoordinates.  It's important to have translational
> *and* rotational modes in the near null space that GAMG uses to  
> build a
> coarse space.



More information about the petsc-users mailing list