$extrastylesheet
rb_assembly_expansion.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_RB_ASSEMBLY_EXPANSION_H
00021 #define LIBMESH_RB_ASSEMBLY_EXPANSION_H
00022 
00023 // libMesh includes
00024 #include "libmesh/elem_assembly.h"
00025 #include "libmesh/reference_counted_object.h"
00026 
00027 // C++ includes
00028 #include <vector>
00029 
00030 
00031 namespace libMesh
00032 {
00033 
00041 // ------------------------------------------------------------
00042 // RBAssemblyExpansion class definition
00043 class RBAssemblyExpansion : public ReferenceCountedObject<RBAssemblyExpansion>
00044 {
00045 public:
00046 
00050   RBAssemblyExpansion();
00051 
00055   virtual ~RBAssemblyExpansion() {}
00056 
00060   void perform_A_interior_assembly(unsigned int q,
00061                                    FEMContext& context);
00062 
00066   void perform_A_boundary_assembly(unsigned int q,
00067                                    FEMContext& context);
00068 
00072   void perform_F_interior_assembly(unsigned int q,
00073                                    FEMContext& context);
00074 
00078   void perform_F_boundary_assembly(unsigned int q,
00079                                    FEMContext& context);
00080 
00084   void perform_output_interior_assembly(unsigned int output_index,
00085                                         unsigned int q_l,
00086                                         FEMContext& context);
00087 
00091   void perform_output_boundary_assembly(unsigned int output_index,
00092                                         unsigned int q_l,
00093                                         FEMContext& context);
00094 
00099   unsigned int get_n_A_terms() const;
00100 
00105   unsigned int get_n_F_terms() const;
00106 
00110   unsigned int get_n_outputs() const;
00111 
00115   unsigned int get_n_output_terms(unsigned int output_index) const;
00116 
00121   void attach_A_assembly(ElemAssembly* Aq_assembly);
00122 
00127   void attach_multiple_A_assembly(std::vector<ElemAssembly*> Aq_assembly);
00128 
00133   void attach_F_assembly(ElemAssembly* Fq_assembly);
00134 
00139   void attach_multiple_F_assembly(std::vector<ElemAssembly*> Fq_assembly);
00140 
00146   virtual void attach_output_assembly(std::vector<ElemAssembly*> output_assembly);
00147 
00154   virtual void attach_output_assembly(ElemAssembly* output_assembly);
00155 
00159   ElemAssembly& get_A_assembly(unsigned int q);
00160 
00164   ElemAssembly& get_F_assembly(unsigned int q);
00165 
00169   ElemAssembly& get_output_assembly(unsigned int output_index, unsigned int q_l);
00170 
00171 private:
00172 
00178   std::vector<ElemAssembly*> _A_assembly_vector;
00179 
00184   std::vector<ElemAssembly*> _F_assembly_vector;
00185 
00190   std::vector< std::vector<ElemAssembly*> > _output_assembly_vector;
00191 
00192 };
00193 
00194 }
00195 
00196 #endif // LIBMESH_RB_ASSEMBLY_EXPANSION_H