Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #include "MOR_MatrixMarketMVOutputFile.hpp"
00007
00008 #include "EpetraExt_MultiVectorOut.h"
00009
00010 #include "Teuchos_TestForException.hpp"
00011
00012 #include <stdexcept>
00013
00014 namespace MOR {
00015
00016 using Teuchos::RCP;
00017 using EpetraExt::MultiVectorToMatrixMarketFile;
00018
00019 MatrixMarketMVOutputFile::MatrixMarketMVOutputFile(const std::string &path) :
00020 MultiVectorOutputFile(path)
00021 {
00022
00023 }
00024
00025 void MatrixMarketMVOutputFile::write(const Epetra_MultiVector &mv)
00026 {
00027
00028 const int err = MultiVectorToMatrixMarketFile(path().c_str(), mv);
00029
00030 TEUCHOS_TEST_FOR_EXCEPTION(err != 0,
00031 std::runtime_error,
00032 "Cannot create output file: " + path());
00033 }
00034
00035 }