[Trilinos-Users] ML: reusing structures
eric.marttila at thermoanalytics.com
Thu Feb 9 08:22:34 MST 2012
I don't know enough to answer your 2nd and 3rd questions, but regarding your
first question: Internally, the MultiLevelPreconditioner class holds a pointer
to the A matrix. You are not really passing it 'by value' - it is being
passed by reference since the MultiLevelPreconditioner constructor is defined
to take a reference.
Hope this helps.
On Thursday, February 09, 2012 06:28:11 am Nico Schlömer wrote:
> I've started to get my hands a little dirty with ML's reusing
> strategies, specifically referring to
> If what I understand from the docs is correct, then
> ================= *snip* =================
> // set up matrix A (ptr)
> if ( ML is not build )
> // set up ML list
> MlPrec_ = Teuchos::rcp( new ML_Epetra::MultiLevelPreconditioner(
> *A, MLList ) );
> // Solve linear systems with MLPrec, A
> // change values of A, not its pointer
> // ? MlPrec_->ReComputePreconditioner();
> // Solve more linear systems with MLPrec, A
> ================= *snap* =================
> is what you're supposed to do.
> Three questions about it:
> (a) Out of interest: How is the data of the matrix A handled in ML?
> Are references to it passed around?
> It seems a bit funny to pass in A by value (*A), but then after
> that the pointer to A can't change.
> (b) There is also ReComputePreconditioner(). What are possible use cases
> for it? (c) ComputePreconditioner runs about twice as long with
> checkFiltering *disabled*. Is this somethings that's supposed to happen?
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
Eric A. Marttila
23440 Airpark Blvd.
Calumet, MI 49913
email: Eric.Marttila at ThermoAnalytics.com
More information about the Trilinos-Users