derived_rb_evaluation.h
Go to the documentation of this file.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 (); 00057 00061 virtual void clear(); 00062 00066 virtual unsigned int get_n_basis_functions() const; 00067 00072 virtual void set_n_basis_functions(unsigned int n_bfs); 00073 00079 virtual void write_out_basis_functions(System& sys, 00080 const std::string& directory_name = "offline_data", 00081 const bool write_binary_basis_functions = true); 00082 00088 virtual void read_in_basis_functions(System& sys, 00089 const std::string& directory_name = "offline_data", 00090 const bool read_binary_basis_functions = true); 00091 00092 //----------- PUBLIC DATA MEMBERS -----------// 00093 00098 std::vector< DenseVector<Number> > derived_basis_functions; 00099 00104 enum DERIVED_RESIDUAL_TYPE { RESIDUAL_WRT_UBER, RESIDUAL_WRT_TRUTH }; 00105 00112 DERIVED_RESIDUAL_TYPE residual_type_flag; 00113 00114 }; 00115 00116 // And introduce convenient typedefs 00117 typedef DerivedRBEvaluation<RBEvaluation> SteadyDerivedRBEvaluation; 00118 00119 } 00120 00121 #endif // LIBMESH_DERIVED_RB_EVALUATION_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:46 UTC
Hosted By: