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 #ifndef MOR_SNAPSHOTCOLLECTIONOBSERVER_HPP 00007 #define MOR_SNAPSHOTCOLLECTIONOBSERVER_HPP 00008 00009 #include "NOX_Epetra_Observer.H" 00010 00011 #include "MOR_SnapshotCollection.hpp" 00012 00013 #include "Teuchos_RCP.hpp" 00014 00015 namespace MOR { 00016 00017 class MultiVectorOutputFile; 00018 00019 class SnapshotCollectionObserver : public NOX::Epetra::Observer 00020 { 00021 public: 00022 SnapshotCollectionObserver( 00023 int period, 00024 const Teuchos::RCP<MultiVectorOutputFile> &snapshotFile); 00025 00026 virtual void observeSolution(const Epetra_Vector& solution); 00027 virtual void observeSolution(const Epetra_Vector& solution, double time_or_param_val); 00028 00029 private: 00030 SnapshotCollection snapshotCollector_; 00031 00032 // Disallow copy & assignment 00033 SnapshotCollectionObserver(const SnapshotCollectionObserver &); 00034 SnapshotCollectionObserver operator=(const SnapshotCollectionObserver &); 00035 }; 00036 00037 } // namespace MOR 00038 00039 #endif /*MOR_SNAPSHOTCOLLECTIONOBSERVER_HPP*/