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 00007 #include "MOR_NOXEpetraCompositeObserver.hpp" 00008 00009 namespace MOR { 00010 00011 void 00012 NOXEpetraCompositeObserver::observeSolution(const Epetra_Vector& solution) 00013 { 00014 for (ObserverSequence::iterator it = observers_.begin(), it_end = observers_.end(); it != it_end; ++it) { 00015 (*it)->observeSolution(solution); 00016 } 00017 } 00018 00019 void 00020 NOXEpetraCompositeObserver::observeSolution(const Epetra_Vector& solution, double time_or_param_val) 00021 { 00022 for (ObserverSequence::iterator it = observers_.begin(), it_end = observers_.end(); it != it_end; ++it) { 00023 (*it)->observeSolution(solution, time_or_param_val); 00024 } 00025 } 00026 00027 int 00028 NOXEpetraCompositeObserver::observerCount() const 00029 { 00030 return observers_.size(); 00031 } 00032 00033 void 00034 NOXEpetraCompositeObserver::addObserver(const Teuchos::RCP<NOX::Epetra::Observer> &obs) 00035 { 00036 observers_.push_back(obs); 00037 } 00038 00039 } // end namespace MOR