[Trilinos-Users] Trilinos-Users Digest, Vol 38, Issue 13
Heroux, Michael A
maherou at sandia.gov
Fri Oct 17 07:20:57 MDT 2008
Riccardo,
We do not generally support this model of construction in our concrete data class since maps are often shared and resizing them would create a very complicated dependency graph with unintended and confused consequences.
Howver, you can use the Teuchos Reference Counted Pointer (RCP) to accomplish what you want in a similar fashion. You can create a Null valued RCP for each object you will eventually construct, then assign a concrete FECrsMatrix and Vector pointer to the RCP when you actually want to create one of these objects with the appropriate sizes and data. Resizing can occur by creating a new FECrsMatrix or Vector object and assigning its pointer to the RCP, which will properly delete the old one.
This approach is desirable from a few perspectives and should give you the functional model you like.
I hope this helps.
Mike
On 10/17/08 4:12 AM, "Riccardo Rossi" <rrossi at cimne.upc.edu> wrote:
dear all,
I am trying to write an interface to use the trilinos linear algebra
within my code.
unfortunately i am currently relying on the presence of an empty
constructor for my Matrix and Vector classes which i then "resize" (read
create a new object with the correct size and assign it to the first)
when i arrive to know the size and distribution across the processors
they are supposed to have.
The Epetra_FECrsMAtrix and Vector do not have such a constructor. I am
planning to construct them with an "empty" map, meaning a map with 0
global elements. ... does anyone know if this approach is likely to work
any comment or suggestion is welcome
thanks in advance
Riccardo
--
________________________________________________________________
Riccardo Rossi, Ph.D, Civil Engineer
member of the Kratos Group: kratos.cimne.upc.es
Centro Internacional de Métodos Numéricos en Ingeniería (CIMNE)
Universidad Politécnica de Cataluña (UPC)
Edificio C-1, campus Norte UPC
Gran Capitan, s/n
08034 Barcelona, España
Tel. (+34) 93 401 73 99
________________________________________________________________
_______________________________________________
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: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20081017/088a4c00/attachment.html
More information about the Trilinos-Users
mailing list