sum_shell_matrix.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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 00019 00020 #ifndef LIBMESH_SUM_SHELL_MATRIX_H 00021 #define LIBMESH_SUM_SHELL_MATRIX_H 00022 00023 // Local includes 00024 #include "libmesh/libmesh_common.h" 00025 #include "libmesh/reference_counted_object.h" 00026 #include "libmesh/libmesh.h" 00027 #include "libmesh/shell_matrix.h" 00028 00029 // C++ includes 00030 #include <vector> 00031 00032 namespace libMesh 00033 { 00034 00035 00036 00044 template <typename T> 00045 class SumShellMatrix : public ShellMatrix<T> 00046 { 00047 public: 00054 SumShellMatrix (void); 00055 00059 explicit 00060 SumShellMatrix (const std::vector<ShellMatrix<T>*>& mat); 00061 00065 virtual ~SumShellMatrix (); 00066 00071 virtual numeric_index_type m () const; 00072 00077 virtual numeric_index_type n () const; 00078 00083 virtual void vector_mult (NumericVector<T>& dest, 00084 const NumericVector<T>& arg) const; 00085 00089 virtual void vector_mult_add (NumericVector<T>& dest, 00090 const NumericVector<T>& arg) const; 00091 00095 virtual void get_diagonal (NumericVector<T>& dest) const; 00096 00100 std::vector<ShellMatrix<T>*> matrices; 00101 00102 }; 00103 00104 00105 00106 //----------------------------------------------------------------------- 00107 // SumShellMatrix inline members 00108 template <typename T> 00109 inline 00110 SumShellMatrix<T>::SumShellMatrix (void): 00111 ShellMatrix<T>(), 00112 matrices() 00113 {} 00114 00115 00116 00117 template <typename T> 00118 inline 00119 SumShellMatrix<T>::SumShellMatrix (const std::vector<ShellMatrix<T>*>& mat): 00120 ShellMatrix<T>(), 00121 matrices(mat) 00122 {} 00123 00124 00125 00126 template <typename T> 00127 inline 00128 SumShellMatrix<T>::~SumShellMatrix () 00129 {} 00130 00131 00132 } // namespace libMesh 00133 00134 00135 #endif // LIBMESH_SUM_SHELL_MATRIX_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:48 UTC
Hosted By: