[Trilinos-Users] access to the Jacobian postprocess
Veltz Romain
romain.veltz at inria.fr
Mon Mar 4 17:59:22 MST 2013
I have been using the method
void ProblemInterface::postProcessContinuationStep
(LOCA::Abstract::Iterator::StepStatus stepStatus, LOCA::Epetra::Group &group)
{
cout<<"-->Entry in postProcessContinuationStep, TEST = ";std::flush(cout);
// contruction du vecteur e1
Epetra_Vector e1b(*(Problem_->InitialGuess()));
e1b.Scale(0.0);
e1b[0] = 1.0;
NOX::Epetra::Vector e1(e1b);
// vector for result res = 1/Jac*e1
NOX::Epetra::Vector result(e1);
Teuchos::ParameterList p;
Teuchos::ParameterList& lsParams = p.sublist("Linear Solver");
lsParams.set("Aztec Solver", "GMRES");//GMRES //
lsParams.set("Size of Krylov Subspace",300);
lsParams.set("Max Iterations", 300);
lsParams.set("Tolerance", 1e-8);
lsParams.set("Output Frequency", 1);
lsParams.set("Scaling", "None");
bool stat = group.applyJacobianInverse(lsParams,e1,result);
cout<<stat<<endl;
double dotpr = result.innerProduct(e1);
cout<<dotpr<<endl<<endl;
cout <<"-->Leaving postProcessContinuationStep";
}
(where e1 and result are two vectors declared on the fly)
but so far the result is wrong. Indeed, I put a cout in my Jacobian implementation and it is not called during this function.
Can someone help me please?
Romain
On Feb 28, 2013, at 6:47 PM, Veltz Romain wrote:
> Dear John,
>
> Thank you for you help.
>
> I am using this Method because the Jacobian cannot be stored in memory (in fact I have also an implementation of the Jacobian using an Operator).
>
> My question is rather "from where can I call the jacobian method?"…sorry for the lack of precision.
>
> Everything I need is in the LOCA::Epetra::Group that I pass to the stepper. Should I implement a new version of the Stepper? Is there a simpler way?
>
> Romain
>
> On Feb 28, 2013, at 6:20 PM, John T. Foster wrote:
>
>> Can you use the accessor method for NOX::Epetra::FiniteDifference
>>
>> getUnderlyingMatrix() ??
>>
>> http://trilinos.sandia.gov/packages/docs/r10.0/packages/nox/doc/html/classNOX_1_1Epetra_1_1FiniteDifference.html#3b86ded520525685db9a2eb2ed1cc189
>>
>>
>>
>> John T. Foster
>> Assistant Professor of Mechanical Engineering
>> The University of Texas at San Antonio
>> AET 2.330
>> One UTSA Circle
>> San Antonio, TX 78249
>> 210.458.5521
>> john.foster at utsa.edu
>>
>>
>> On Thu, Feb 28, 2013 at 6:22 PM, Veltz Romain <romain.veltz at inria.fr> wrote:
>>> Hello,
>>>
>>> I am performing numerical continuation using LOCA::Epetra and a Matrix Free
>>> method for the Jacobian (using NOX::Epetra::FiniteDifference).
>>> I would like to compute the following scalar product after each successful
>>> continuation step: <e1,Jac^(-1).e1> where Jac is the jacobian and e1 is a
>>> constant vector (for all the continuation processes).
>>>
>>> Does anyone have some advice to do so please?
>>>
>>> Thank you a lot,
>>>
>>> Romain VELTZ.
>>>
>>> _______________________________________________
>>> Trilinos-Users mailing list
>>> Trilinos-Users at software.sandia.gov
>>> http://software.sandia.gov/mailman/listinfo/trilinos-users
>>>
>
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130304/62bdb66b/attachment.html
More information about the Trilinos-Users
mailing list