• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

MOR_MatrixMarketMVOutputFile.cpp

Go to the documentation of this file.
00001 //*****************************************************************//
00002 //    Albany 2.0:  Copyright 2012 Sandia Corporation               //
00003 //    This Software is released under the BSD license detailed     //
00004 //    in the file "license.txt" in the top-level Albany directory  //
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   // Nothing to do
00023 }
00024 
00025 void MatrixMarketMVOutputFile::write(const Epetra_MultiVector &mv)
00026 {
00027   // Write complete MultiVector (replace file if it exists)
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 } // namespace MOR

Generated on Wed Mar 26 2014 18:36:40 for Albany: a Trilinos-based PDE code by  doxygen 1.7.1