$extrastylesheet
solution_history.h
Go to the documentation of this file.
00001 // The libMesh Finite Element Library.
00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
00003 
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2.1 of the License, or (at your option) any later version.
00008 
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Lesser General Public License for more details.
00013 
00014 // You should have received a copy of the GNU Lesser General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 
00018 #ifndef LIBMESH_SOLUTION_HISTORY_H
00019 #define LIBMESH_SOLUTION_HISTORY_H
00020 
00021 // Local Includes
00022 #include "libmesh/system.h"
00023 
00024 namespace libMesh
00025 {
00026 
00031 class SolutionHistory
00032 {
00033 public:
00034 
00035   // Constructor
00036   SolutionHistory() :
00037     overwrite_previously_stored(false) {}
00038 
00039   // Destructor
00040   virtual ~SolutionHistory () {}
00041 
00042   // Function to store a solution, pure virtual
00043   virtual void store() = 0;
00044 
00045   // Function to retrieve a solution, pure virtual
00046   virtual void retrieve() = 0;
00047 
00048   // Cloning function for an UniquePtr, pure virtual, used in the
00049   // setter function in time_solver.C
00050   virtual UniquePtr<SolutionHistory > clone() const = 0;
00051 
00052   // Turn on overwrite_previously_stored to overwrite any
00053   // already-saved data encountered during subsequent store() calls
00054   void set_overwrite_previously_stored (bool val)
00055   { overwrite_previously_stored = val; }
00056 
00057 protected:
00058 
00059   // Flag to specify whether we want to overwrite previously stored
00060   // vectors at a given time or not
00061   bool overwrite_previously_stored;
00062 
00063 }; // end SolutionHistory class definition
00064 
00065 } // end namespace libMesh
00066 
00067 #endif // LIBMESH_SOLUTION_HISTORY_H