00001 // $Id: FEApp_BlockDiscretization.hpp,v 1.4 2008/08/01 22:57:12 etphipp Exp $ 00002 // $Source: /space/CVS/Trilinos/packages/sacado/example/FEApp/FEApp_BlockDiscretization.hpp,v $ 00003 // @HEADER 00004 // *********************************************************************** 00005 // 00006 // Sacado Package 00007 // Copyright (2006) Sandia Corporation 00008 // 00009 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00010 // the U.S. Government retains certain rights in this software. 00011 // 00012 // This library is free software; you can redistribute it and/or modify 00013 // it under the terms of the GNU Lesser General Public License as 00014 // published by the Free Software Foundation; either version 2.1 of the 00015 // License, or (at your option) any later version. 00016 // 00017 // This library is distributed in the hope that it will be useful, but 00018 // WITHOUT ANY WARRANTY; without even the implied warranty of 00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 // Lesser General Public License for more details. 00021 // 00022 // You should have received a copy of the GNU Lesser General Public 00023 // License along with this library; if not, write to the Free Software 00024 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00025 // USA 00026 // Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps 00027 // (etphipp@sandia.gov). 00028 // 00029 // *********************************************************************** 00030 // @HEADER 00031 00032 #ifndef FEAPP_BLOCKDISCRETIZATION_HPP 00033 #define FEAPP_BLOCKDISCRETIZATION_HPP 00034 00035 #include <vector> 00036 #include "FEApp_TemplateTypes.hpp" 00037 00038 #if SG_ACTIVE 00039 00040 #include "Epetra_Comm.h" 00041 #include "EpetraExt_BlockVector.h" 00042 #include "EpetraExt_BlockCrsMatrix.h" 00043 #include "EpetraExt_BlockUtility.h" 00044 00045 #include "FEApp_AbstractDiscretization.hpp" 00046 00047 #include "Stokhos_OrthogPolyBasis.hpp" 00048 00049 namespace FEApp { 00050 00051 class BlockDiscretization : public FEApp::AbstractDiscretization { 00052 public: 00053 00055 BlockDiscretization( 00056 const Teuchos::RCP<const Epetra_Comm>& comm, 00057 const Teuchos::RCP<const FEApp::AbstractDiscretization>& underlyingDisc_, 00058 const Teuchos::RCP<const Stokhos::OrthogPolyBasis<double> >& sg_basis_, 00059 bool makeJacobian); 00060 00062 virtual ~BlockDiscretization(); 00063 00065 virtual void createMesh(); 00066 00068 virtual void createMaps(); 00069 00071 virtual void createJacobianGraphs(); 00072 00074 virtual Teuchos::RCP<const FEApp::Mesh> 00075 getMesh() const; 00076 00078 virtual Teuchos::RCP<const Epetra_Map> 00079 getMap() const; 00080 00082 virtual Teuchos::RCP<const Epetra_Map> 00083 getOverlapMap() const; 00084 00086 virtual Teuchos::RCP<const Epetra_CrsGraph> 00087 getJacobianGraph() const; 00088 00090 virtual Teuchos::RCP<const Epetra_CrsGraph> 00091 getOverlapJacobianGraph() const; 00092 00094 virtual int getNumNodesPerElement() const; 00095 00097 Teuchos::RCP<EpetraExt::BlockCrsMatrix> 00098 getJacobian(); 00099 00101 Teuchos::RCP<EpetraExt::BlockCrsMatrix> 00102 getOverlapJacobian(); 00103 00104 00105 private: 00106 00108 BlockDiscretization(const BlockDiscretization&); 00109 00111 BlockDiscretization& operator=(const BlockDiscretization&); 00112 00113 protected: 00114 00116 Teuchos::RCP<const FEApp::AbstractDiscretization> underlyingDisc; 00117 00119 Teuchos::RCP<const Epetra_Comm> globalComm; 00120 00122 Teuchos::RCP<const Stokhos::OrthogPolyBasis<double> > sg_basis; 00123 00125 Teuchos::RCP<const Epetra_Map> map; 00126 00128 Teuchos::RCP<const Epetra_Map> overlap_map; 00129 00131 Teuchos::RCP<const Epetra_CrsGraph> graph; 00132 00134 Teuchos::RCP<const Epetra_CrsGraph> overlap_graph; 00135 00137 Teuchos::RCP<EpetraExt::BlockCrsMatrix> jac; 00138 00140 Teuchos::RCP<EpetraExt::BlockCrsMatrix> overlap_jac; 00141 00142 }; 00143 00144 } 00145 00146 #endif // SG_ACTIVE 00147 00148 #endif // FEAPP_CZERODISCRETIZATION_HPP
1.4.7