#include <EpetraExt_XMLReader.h>
Constructor and destructor. | |
| XMLReader (const Epetra_Comm &Comm, const std::string &FileName) | |
| ctor | |
| ~XMLReader () | |
| dtor | |
Read operations | |
| void | Read (const std::string &Label, Epetra_Map *&Map) |
Reads the Epetra_Map stored with label Label. | |
| void | Read (const std::string &Label, Epetra_CrsGraph *&Graph) |
Reads the Epetra_CrsGraph stored with label Label. | |
| void | Read (const std::string &Label, Epetra_CrsMatrix *&Matrix) |
Reads the Epetra_CrsMatrix stored with label Label. | |
| void | Read (const std::string &Label, Epetra_MultiVector *&MultiVector) |
Reads the Epetra_MultiVector stored with label Label. | |
| void | Read (const std::string &Label, std::vector< std::string > &Content) |
Reads a std::vector of strings with label Label. | |
| void | Read (const std::string &Label, Teuchos::ParameterList &List) |
Reads the Teuchos::ParameterList stored with label Label. | |
Class EpetraExt::XMLReader allows to read several Trilinos objects stored in XML files. The XML data format is specified in the documentation of class EpetraExt::XMLWriter, which also contains a MATLAB script. A typical usage of this class is reported in file epetraext/example/inout/XML_IO.cpp.
This class requires Teuchos to be configured with the option --enable-teuchos-expat.
Reading objects from a file requires the following steps. First, we define an XMLReader object,
EpetraExt::XMLReader XMLReader(Comm, "data.xml");
Epetra_Map* MyMap; Epetra_CrsMatrix* MyMatrix; Epetra_MultiVector* MyLHS; Epetra_MultiVector* MyRHS; Teuchos::ParameterList MyParameters; std::vector<std::string> Author; std::vector<std::string> Date; std::vector<std::string> MyContent;
XMLReader.Read("Author", Author); XMLReader.Read("Date", Date); XMLReader.Read("MyMap", MyMap); XMLReader.Read("MyMatrix", MyMatrix); XMLReader.Read("MyLHS", MyLHS); XMLReader.Read("MyRHS", MyRHS); XMLReader.Read("MyContent", MyContent); XMLReader.Read("MyParameters", MyParameters);
delete.
Definition at line 68 of file EpetraExt_XMLReader.h.
|
||||||||||||
|
ctor
Definition at line 48 of file EpetraExt_XMLReader.cpp. |
|
|
dtor
Definition at line 76 of file EpetraExt_XMLReader.h. |
|
||||||||||||
|
Reads the Epetra_Map stored with label
Definition at line 221 of file EpetraExt_XMLReader.cpp. |
|
||||||||||||
|
Reads the Epetra_CrsGraph stored with label
Definition at line 64 of file EpetraExt_XMLReader.cpp. |
|
||||||||||||
|
Reads the Epetra_CrsMatrix stored with label
Definition at line 112 of file EpetraExt_XMLReader.cpp. |
|
||||||||||||
|
Reads the Epetra_MultiVector stored with label
Definition at line 163 of file EpetraExt_XMLReader.cpp. |
|
||||||||||||
|
Reads a std::vector of strings with label
Definition at line 288 of file EpetraExt_XMLReader.cpp. |
|
||||||||||||
|
Reads the Teuchos::ParameterList stored with label
Definition at line 315 of file EpetraExt_XMLReader.cpp. |
1.3.9.1