[dune-pdelab] Jacobian_volume vs jacobian_apply_volume

René Heß rene.hk-edv at gmx.de
Wed Jul 8 11:25:18 CEST 2020


Hi,

that should be possible: If you look at

dune-pdelab/dune/pdelab/test/testnumericaljacobianmethods.cc

you see how to get numerical Jacobians for all the methods. Just remove
the line with NumericalJacobianVolume and implement the jacobian_volume
method yourself (Note: Ignore the PostSkeleton methods).


Best regards,
René


Amir Peiraviminaei <apminaei at gmail.com> writes:

> Thanks René.
> The pdes that I'm working on are highly nonlinear and I'm trying to reduce
> the assembly time.
> I'm wondering whether it is possible to implement jacobian_volume,i.e.
> analytic jacobian and for the skeleton and boundary parts just use the
> numerical jacobian(default)?
> Best
> Amir
>
> On Tue, Jul 7, 2020 at 5:12 PM René Heß <rene.hk-edv at gmx.de> wrote:
>
>> Hi Amir,
>>
>>
>> the jacobian methods will assemble the Jacobian matrix J. This matrix
>> will be used by the linear solvers to solve your system.
>>
>> Some solvers only need J to calculate the application of J to a vector
>> x. This means the solvers only needs to be able to compute Jx for a
>> given vector x. With the jacobian apply methods it is possible to
>> calculate this application of the Jacobian without ever assembling J.
>>
>> This can be used to implement matrix-free solvers that could be faster
>> for certain cases. In your case you can ignore this issue and you won't
>> need the jacobian_apply methods (or if the compiler complains you can
>> just use the numerical methods, they won't be used anyway).
>>
>>
>> Best regards,
>> René
>>
>>
>> Amir Peiraviminaei <apminaei at gmail.com> writes:
>>
>> > Hi everyone,
>> > I'm using pdelab for a FV scheme and tutorial 02 as an example. So far I
>> > have used only numerical jacobian, Now I want to implement analytical
>> > jacobian myself, my question is
>> > 1. What is the difference between jacobian_volume and
>> jacobian_apply_volume?
>> > (tutorial 02 uses both)
>> >
>> > Best
>> > Amir
>> > _______________________________________________
>> > dune-pdelab mailing list
>> > dune-pdelab at lists.dune-project.org
>> > https://lists.dune-project.org/mailman/listinfo/dune-pdelab
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20200708/f40b5ad3/attachment.sig>


More information about the dune-pdelab mailing list