$extrastylesheet
00001 // rbOOmit: An implementation of the Certified Reduced Basis method. 00002 // Copyright (C) 2009, 2010 David J. Knezevic 00003 00004 // This file is part of rbOOmit. 00005 00006 // rbOOmit is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License, or (at your option) any later version. 00010 00011 // rbOOmit is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 00020 #ifndef LIBMESH_DERIVED_RB_EVALUATION_H 00021 #define LIBMESH_DERIVED_RB_EVALUATION_H 00022 00023 // Local includes 00024 #include "libmesh/dense_vector.h" 00025 #include "libmesh/rb_evaluation.h" 00026 00027 // C++ includes 00028 00029 namespace libMesh 00030 { 00031 00032 class System; 00033 class string; 00034 00045 // ------------------------------------------------------------ 00046 // DerivedRBEvaluation class definition 00047 00048 template<class Base> 00049 class DerivedRBEvaluation : public Base 00050 { 00051 public: 00052 00056 DerivedRBEvaluation (const Parallel::Communicator &comm 00057 LIBMESH_CAN_DEFAULT_TO_COMMWORLD); 00058 00062 virtual void clear(); 00063 00067 virtual unsigned int get_n_basis_functions() const; 00068 00073 virtual void set_n_basis_functions(unsigned int n_bfs); 00074 00080 virtual void write_out_basis_functions(System& sys, 00081 const std::string& directory_name = "offline_data", 00082 const bool write_binary_basis_functions = true); 00083 00089 virtual void read_in_basis_functions(System& sys, 00090 const std::string& directory_name = "offline_data", 00091 const bool read_binary_basis_functions = true); 00092 00093 //----------- PUBLIC DATA MEMBERS -----------// 00094 00099 std::vector< DenseVector<Number> > derived_basis_functions; 00100 00105 enum DERIVED_RESIDUAL_TYPE { RESIDUAL_WRT_UBER, RESIDUAL_WRT_TRUTH }; 00106 00113 DERIVED_RESIDUAL_TYPE residual_type_flag; 00114 00115 }; 00116 00117 // And introduce convenient typedefs 00118 typedef DerivedRBEvaluation<RBEvaluation> SteadyDerivedRBEvaluation; 00119 00120 } 00121 00122 #endif // LIBMESH_DERIVED_RB_EVALUATION_H