[Trilinos-Users] problem with rythmos
Markus Berndt
berndt at lanl.gov
Thu Jan 13 12:50:56 MST 2011
While prototyping with rythmos, I ran into a problem. We are planning
to use rythmos for a nonlinear time-dependent problem (Richards
equation). The preconditioner we are using with NOX for the steady
state problem does not actually assemble the complete Jacobian, instead
it derives from Epetra_Operator and just implements ApplyInverse(). To
see if this approach would work with rythmos, I modified the example in
$TRILINOS_SOURCE/packages/rythmos/example/epetra/1Dfem such that the
Jacobian is hidden inside a wrapper that derives from Epetra_Operator.
When I run the example with an xml file that defines as a linear solver
GMRES without preconditioning (either using BELOS or AZTECOO), it runs
into an exception in Thyra. Here is the output:
--- output ---
$ ./cxx_main.exe --method=BDF \
--extra-linear-solver-params-file="_Extra_Belos_Params-test.xml"
The parameter list after being read in:
Linear Solver Type : string = Belos
Preconditioner Type : string = None
Linear Solver Types ->
Belos ->
Solver Type : string = Block GMRES
Solver Types ->
Block GMRES ->
Convergence Tolerance : double = 1e-12
Created a LinearOpWithSolveFactory described as:
Thyra::BelosLinearOpWithSolveFactory
p=0: *** Caught standard std::exception of type 'std::logic_error' :
/home/berndt/Packages/Trilinos/source/trilinos-10.6.1-Source/packages/thyra/adapters/epetraext/src/model_evaluator/Thyra_EpetraModelEvaluator.cpp:739:
Throw number = 1
Throw test that evaluated to true: !allFuncsWhereScaled
Error, we can not currently handle epetra output objects that could not
be scaled. Special code will have to be added to handle this (i.e.
using implicit diagonal and multiplied linear operators to implicitly do
the scaling.
End Result: TEST FAILED
--- end output ---
After digging in Thyra and EpetraExt, I found that there is a dynamic
cast of the object that is supposed to hold the Jacobian to
Epetra_RowMatrix. So, if the Jacobian is of type Epetra_CrsMatrix, this
works, but not when the Jacobian is of type Epetra_Operator.
How should I proceed? With some effort, I could generate an
Epetra_CrsMatrix, but in the future we are planning to use this to
time-step multiple physics that are implicitly coupled, where generating
a full Jacobian will not be easy.
Of course, it would be great if the functionality in Thyra/EpetraExt
could be extended as described in the error message after the throw.
Thanks
- Markus
--
Markus Berndt, LANL CCS-2, Mail Stop D413, 505-665-4711
More information about the Trilinos-Users
mailing list