$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 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_SHELL_MATRIX_H 00021 #define LIBMESH_SHELL_MATRIX_H 00022 00023 00024 // Local includes 00025 #include "libmesh/libmesh_common.h" 00026 #include "libmesh/reference_counted_object.h" 00027 #include "libmesh/libmesh.h" 00028 #include "libmesh/id_types.h" 00029 #include "libmesh/parallel_object.h" 00030 00031 namespace libMesh 00032 { 00033 00034 // forward declarations 00035 template <typename T> class NumericVector; 00036 00037 00046 template <typename T> 00047 class ShellMatrix : public ReferenceCountedObject<ShellMatrix<T> >, 00048 public ParallelObject 00049 { 00050 public: 00054 ShellMatrix (const Parallel::Communicator &comm_in 00055 LIBMESH_CAN_DEFAULT_TO_COMMWORLD); 00056 00060 virtual ~ShellMatrix (); 00061 00066 virtual numeric_index_type m () const = 0; 00067 00072 virtual numeric_index_type n () const = 0; 00073 00078 virtual void vector_mult (NumericVector<T>& dest, 00079 const NumericVector<T>& arg) const = 0; 00080 00084 virtual void vector_mult_add (NumericVector<T>& dest, 00085 const NumericVector<T>& arg) const = 0; 00086 00090 virtual void get_diagonal (NumericVector<T>& dest) const = 0; 00091 00092 }; 00093 00094 00095 00096 //----------------------------------------------------------------------- 00097 // ShellMatrix inline members 00098 template <typename T> 00099 inline 00100 ShellMatrix<T>::ShellMatrix (const Parallel::Communicator &comm_in) : 00101 ParallelObject(comm_in) 00102 {} 00103 00104 00105 00106 template <typename T> 00107 inline 00108 ShellMatrix<T>::~ShellMatrix () 00109 {} 00110 00111 00112 } // namespace libMesh 00113 00114 00115 #endif // LIBMESH_SHELL_MATRIX_H