[Trilinos-Users] Running Rythmos DAE with a user defined Epetra_Operator as Jacobian

Bartlett, Roscoe A. bartlettra at ornl.gov
Mon May 5 07:50:22 MDT 2014


Create direct Thyra::ModelEvaluator subclasses instead.  Not sure there are good examples in Rythmos for this but that is the direction we have been going in recent development work.

-Ross

> -----Original Message-----
> From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-
> bounces at software.sandia.gov] On Behalf Of Andrea Mola
> Sent: Monday, May 05, 2014 9:45 AM
> To: trilinos-users at software.sandia.gov
> Subject: [Trilinos-Users] Running Rythmos DAE with a user defined
> Epetra_Operator as Jacobian
> 
> Dear all,
> I am trying to use Ryrhmos to solve a DAE system for the time
> advancement of a PDE system.
> So far, I have already been able to set up a small example which solves
> correctly a small DAE using a Jacobian defined as an Epetra_CrsMatrix.
> Unfortunately, I need to use a different Linear Operator, which I define
> as an Epetra_Operator (JacobianOperator :public Epetra_Operator). The
> problem comes when I define my AztecOOLinearOpWithSolveFactory to be
> passed to my EpetraExt::ModelEvaluator constructor. Even though I try to
> specify through the Thyra::initializeOp function that I will use a
> JacobianOperator instead of an Epetra_CrsMatrix, it still seems to think
> that the jacobian of my system is an Epetra_CrsMatrix. In fact, upon
> execution, when the model evaluator calls for a Jacobian evaluation, the
> dynamic cast
> 
> JacobianOperator &jac = dyn_cast<JacobianOperator>(*W_out);
> 
> fails with the following exception
> 
> terminate called after throwing an instance of 'Teuchos::m_bad_cast'
>    what():
> /home/amola/trilinos-11.2.3-
> Source/packages/teuchos/core/src/Teuchos_dyn_cast.cpp:61:
> 
> Throw number = 1
> 
> Throw test that evaluated to true: true
> 
> dyn_cast<16JacobianOperator>(15Epetra_Operator) : Error, the object with
> the concrete type '16Epetra_CrsMatrix' (passed in through the interface
> type '15Epetra_Operator')  does not support the interface
> '16JacobianOperator' and the dynamic cast failed!
> Aborted.
> 
> So, my question is: what should I do to be able to use an arbitrary
> Epetra_Operator in an EpetraExt::ModelEvaluator? I am not very familiar
> with the parameter lists, so probably the answer is there. Or,
> Thyra::initializeOp is just the wrong function to do what I need. Can
> anyone point me out an example that does that, or suggest me some
> solution?
> Thank you very much in advance for the help.
> Regards,
> 
> 
>      Andrea
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> https://software.sandia.gov/mailman/listinfo/trilinos-users


More information about the Trilinos-Users mailing list