[Trilinos-Users] AztecOO and ~OperatorData()
Simone Deparis
deparis at MIT.EDU
Tue Dec 13 13:30:40 MST 2005
Williams, Alan B wrote:
> Simone,
>
> No, AztecOO does not destroy your P operator. When you use
> SetPrecOperator, AztecOO wraps your operator in an internal struct.
> AztecOO later destroys that struct, but it should not destroy your
> operator.
>
> Alan
I see... You are right. I missed it:
AztecOO::OperatorData::~OperatorData()
{
if (X!=0) delete X;
if (Y!=0) delete Y;
}
the operator A is not destroyed. :-)
Thank you
Simone
>
>
>
>>-----Original Message-----
>>From: trilinos-users-bounces at software.sandia.gov
>>[mailto:trilinos-users-bounces at software.sandia.gov] On Behalf
>>Of Simone Deparis
>>Sent: Tuesday, December 13, 2005 12:26 PM
>>To: trilinos-users at software.sandia.gov
>>Subject: [Trilinos-Users] AztecOO and ~OperatorData()
>>
>>Hi,
>>
>>I have the following issue/understanding:
>>
>>I have a preconditioner P of type Prec derived from Epetra_Operator:
>>
>>Prec P;
>>
>>I set this as preconditioner to Aztec00:
>>
>>{
>> AztecOO Solver(Problem); // Problem is of class Epetra_LinearProblem
>> Solver.SetPrecOperator(&P);
>> M_Solver->Iterate(numiter, tol);
>>}
>>
>>Now the instance Solver of Aztec00 has been destroyed (since
>>outside the brackets).
>>If I look through Aztec00.cpp, the destruction of Solver has
>>involved the distruction of my preconditioner P ( through
>>AztecOO::DeleteMemory() and AztecOO::~AztecOO(void) ).
>>
>>Do I understand well what's going on? If I am right, is this
>>the behavior that we wish?
>>I don't! I would prefer that I decide when to destroy my
>>preconditioner.
>> Is there a reason for this?
>>
>>Thank you
>>
>>Simone
>>
>>
>>--
>>_____________________________________________________________________
>> Simone Deparis
>> .~. Mech Eng Dept - MIT
>> /V\ L I N U X 77 Mass Ave Room 3-264
>> // \\ ================= Cambridge MA 02139
>>/( )\ USA
>> ^^-^^
>>phone : +1 617 452 3285 mailto:deparis at mit.edu
>>fax : +1 617 258 8559 http://www.mit.edu/~deparis
>>_____________________________________________________________________
>>
>>
>>
>>_______________________________________________
>>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
>
--
_____________________________________________________________________
Simone Deparis
.~. Mech Eng Dept - MIT
/V\ L I N U X 77 Mass Ave Room 3-264
// \\ ================= Cambridge MA 02139
/( )\ USA
^^-^^
phone : +1 617 452 3285 mailto:deparis at mit.edu
fax : +1 617 258 8559 http://www.mit.edu/~deparis
_____________________________________________________________________
More information about the Trilinos-Users
mailing list