transient_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_TRANSIENT_RB_EVALUATION_H 00021 #define LIBMESH_TRANSIENT_RB_EVALUATION_H 00022 00023 // rbOOmit includes 00024 #include "libmesh/rb_evaluation.h" 00025 #include "libmesh/rb_temporal_discretization.h" 00026 00027 // libMesh includes 00028 00029 // C++ includes 00030 00031 namespace libMesh 00032 { 00033 00034 class TransientRBThetaExpansion; 00035 00048 // ------------------------------------------------------------ 00049 // TransientRBEvaluation class definition 00050 00051 class TransientRBEvaluation : public RBEvaluation, public RBTemporalDiscretization 00052 { 00053 public: 00054 00058 TransientRBEvaluation (); 00059 00063 ~TransientRBEvaluation (); 00064 00068 typedef RBEvaluation Parent; 00069 00074 virtual void clear(); 00075 00083 virtual void resize_data_structures(const unsigned int Nmax, 00084 bool resize_error_bound_data=true); 00085 00091 virtual Real rb_solve(unsigned int N); 00092 00096 virtual Real get_rb_solution_norm(); 00097 00103 virtual Real residual_scaling_numer(Real alpha_LB); 00104 00110 virtual Real compute_residual_dual_norm(const unsigned int N); 00111 00118 virtual Real uncached_compute_residual_dual_norm(const unsigned int N); 00119 00125 void cache_online_residual_terms(const unsigned int N); 00126 00133 virtual void clear_riesz_representors(); 00134 00139 virtual void write_offline_data_to_files(const std::string& directory_name = "offline_data", 00140 const bool write_binary_data=true); 00141 00146 virtual void read_offline_data_from_files(const std::string& directory_name = "offline_data", 00147 bool read_error_bound_data=true, 00148 const bool read_binary_data=true); 00149 00150 //----------- PUBLIC DATA MEMBERS -----------// 00151 00155 DenseMatrix<Number> RB_L2_matrix; 00156 00160 std::vector< DenseMatrix<Number> > RB_M_q_vector; 00161 00166 std::vector< std::vector<Number> > RB_outputs_all_k; 00167 00172 std::vector< std::vector<Real> > RB_output_error_bounds_all_k; 00173 00177 DenseVector<Number> old_RB_solution; 00178 00182 std::vector< DenseVector<Number> > RB_temporal_solution_data; 00183 00188 std::vector< Real > error_bound_all_k; 00189 00194 std::vector<Real> initial_L2_error_all_N; 00195 00200 std::vector< DenseVector<Number> > RB_initial_condition_all_N; 00201 00206 std::vector< std::vector< std::vector<Number> > > Fq_Mq_representor_innerprods; 00207 std::vector< std::vector< std::vector<Number> > > Mq_Mq_representor_innerprods; 00208 std::vector< std::vector< std::vector< std::vector<Number> > > > Aq_Mq_representor_innerprods; 00209 00210 00215 Number cached_Fq_term; 00216 DenseVector<Number> cached_Fq_Aq_vector; 00217 DenseMatrix<Number> cached_Aq_Aq_matrix; 00218 DenseVector<Number> cached_Fq_Mq_vector; 00219 DenseMatrix<Number> cached_Aq_Mq_matrix; 00220 DenseMatrix<Number> cached_Mq_Mq_matrix; 00221 00226 std::vector< std::vector< NumericVector<Number>* > > M_q_representor; 00227 00228 }; 00229 00230 } 00231 00232 #endif // LIBMESH_TRANSIENT_RB_EVALUATION_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:49 UTC
Hosted By: