Obtaining singular values of Jacobian


could you give me a hint how to dump out information about the Jacobian? I would like to get a better feeling for one of the problems that I try to solve. For that I would like to get a feeling how the singular values look like. The problem is a steady state problem that only depends on the boundary values. This means I do not have to give initial conditions or so. My idea was roughly the following.

  1. Set up the simulation to have two “time steps” in preCICE, i.e. setting <max-time value="2"/> and <timestep-length value="1" /> in the preCICE config file. The first preCICE “time step” is used to solve the problem. The second “time step” is purely used to mess around with preCICE.
  2. Use the IMVJ postprocessing.
  3. Solve the problem until reaching the steady state in the first “time step”.
  4. Set the options of the IMVJ postprocessing such that drops all singular values at the beginning of the “second” time step. Ideally, it would tell me what the values where.
  5. Abort simulation after dumping the information such that “second time step” is never carried out.

Does this approach make sense/work? Can I find a bit more information about the settings for the IMVJ postprocessing than in the XML reference and the IMVJ wiki page?

Thank you in advance!

Hi Alex,

Yes, this approach makes sense.

I guess you are referring to this wiki page, right?
Which information are you missing there?
For more, I would suggest to directly have a look at the paper from Klaudius.

The following debug statement gives you the number of truncated and non-truncated singular values. Maybe this does the job already? For more information, we could easily add more statements there.

To get the debug output (be sure to use preCICE in Debug mode), you could use:

    <sink type="stream" output="stdout"  filter= "(%Severity% > debug) or (%Severity% >= debug and %Module% contains SVDFactorization)"  enabled="true" />	

More information logging on this wiki page.

Thank you! This helps a lot. I will see if I am already happy with the debugging output or whether I have to add something more there.

I just wanted to give a short update that it worked. If somebody else wants to do something similar, ensure to set the chunk-size to a proper value. In my case I set chunk-size="0" so it is truncated after the first time step. I used the following configuration for the IQN-IMVJ scheme:

<imvj-restart-mode type="RS-SVD" chunk-size="0" truncation-threshold="1e-4" reused-timesteps-at-restart="0"/>

I obtained the actual values of the singuar values via a debugging session.

1 Like