FEApp_Application.hpp

Go to the documentation of this file.
00001 // $Id: FEApp_Application.hpp,v 1.5.2.2 2007/08/14 00:19:05 etphipp Exp $ 
00002 // $Source: /space/CVS/Trilinos/packages/sacado/example/FEApp/FEApp_Application.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_APPLICATION_HPP
00033 #define FEAPP_APPLICATION_HPP
00034 
00035 #include <vector>
00036 
00037 #include "Teuchos_RCP.hpp"
00038 #include "Teuchos_ParameterList.hpp"
00039 #include "Teuchos_SerialDenseMatrix.hpp"
00040 #include "Epetra_Vector.h"
00041 #include "Epetra_CrsMatrix.h"
00042 #include "Epetra_Import.h"
00043 #include "Epetra_Export.h"
00044 
00045 #include "FEApp_NodeBC.hpp"
00046 #include "FEApp_AbstractPDE.hpp"
00047 #include "FEApp_AbstractQuadrature.hpp"
00048 #include "FEApp_AbstractDiscretization.hpp"
00049 #include "FEApp_AbstractProblem.hpp"
00050 #include "FEApp_TemplateTypes.hpp"
00051 
00052 #include "Sacado_ScalarParameterLibrary.hpp"
00053 #include "Sacado_ScalarParameterVector.hpp"
00054 
00055 namespace FEApp {
00056 
00057   class Application {
00058   public:
00059 
00061     Application(const std::vector<double>& coords,
00062     const Teuchos::RCP<const Epetra_Comm>& comm,
00063     const Teuchos::RCP<Teuchos::ParameterList>& params,
00064     bool is_transient);
00065 
00067     ~Application();
00068 
00070     Teuchos::RCP<const Epetra_Map> getMap() const;
00071 
00073     Teuchos::RCP<const Epetra_CrsGraph> getJacobianGraph() const;
00074 
00076     Teuchos::RCP<const Epetra_Vector> getInitialSolution() const;
00077 
00079     Teuchos::RCP<Sacado::ScalarParameterLibrary> getParamLib();
00080 
00082     bool isTransient() const;
00083 
00085 
00088     void computeGlobalResidual(const Epetra_Vector* xdot,
00089              const Epetra_Vector& x,
00090              const Sacado::ScalarParameterVector* p,
00091              Epetra_Vector& f);
00092 
00094 
00097     void computeGlobalJacobian(double alpha, double beta,
00098              const Epetra_Vector* xdot,
00099              const Epetra_Vector& x,
00100              const Sacado::ScalarParameterVector* p,
00101              Epetra_Vector* f,
00102              Epetra_CrsMatrix& jac);
00103 
00105 
00108     void computeGlobalTangent(double alpha, double beta,
00109             bool sum_derivs,
00110             const Epetra_Vector* xdot,
00111             const Epetra_Vector& x,
00112             Sacado::ScalarParameterVector* p,
00113             const Epetra_MultiVector* Vx,
00114             const Teuchos::SerialDenseMatrix<int,double>* Vp,
00115             Epetra_Vector* f,
00116             Epetra_MultiVector* JVx,
00117             Epetra_MultiVector* fVp);
00118 
00119   private:
00120     
00122     Application(const Application&);
00123 
00125     Application& operator=(const Application&);
00126 
00127   protected:
00128 
00130     bool transient;
00131     
00133     Teuchos::RCP<FEApp::AbstractDiscretization> disc;
00134 
00136     std::vector< Teuchos::RCP<FEApp::NodeBC> > bc;
00137 
00139     Teuchos::RCP<const FEApp::AbstractQuadrature> quad;
00140 
00142     FEApp::AbstractPDE_TemplateManager<ValidTypes> pdeTM;
00143 
00145     Teuchos::RCP<Epetra_Vector> initial_x;
00146 
00148     Teuchos::RCP<Epetra_Import> importer;
00149 
00151     Teuchos::RCP<Epetra_Export> exporter;
00152 
00154     Teuchos::RCP<Epetra_Vector> overlapped_x;
00155 
00157     Teuchos::RCP<Epetra_Vector> overlapped_xdot;
00158 
00160     Teuchos::RCP<Epetra_Vector> overlapped_f;
00161 
00163     Teuchos::RCP<Epetra_CrsMatrix> overlapped_jac;
00164 
00166     Teuchos::RCP<Sacado::ScalarParameterLibrary> paramLib;
00167 
00168   };
00169 
00170 }
00171 
00172 #endif // FEAPP_APPLICATION_HPP

Generated on Tue Oct 20 12:55:02 2009 for Sacado Package Browser (Single Doxygen Collection) by doxygen 1.4.7