FEApp_BoundaryFlux1DResponseFunction.hpp

Go to the documentation of this file.
00001 // $Id$ 
00002 // $Source$ 
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_BOUNDARYFLUX1DRESPONSEFUNCTION_HPP
00033 #define FEAPP_BOUNDARYFLUX1DRESPONSEFUNCTION_HPP
00034 
00035 #include "FEApp_AbstractResponseFunction.hpp"
00036 #include "Epetra_Map.h"
00037 #include "Epetra_Import.h"
00038 #include "Epetra_Vector.h"
00039 
00040 namespace FEApp {
00041 
00046   class BoundaryFlux1DResponseFunction : public AbstractResponseFunction {
00047   public:
00048   
00050     BoundaryFlux1DResponseFunction(unsigned int left_gid,
00051                                    unsigned int right_gid,
00052                                    unsigned int eqn,
00053                                    unsigned int num_eqns,
00054                                    double grid_spacing,
00055                                    const Epetra_Map& dofMap);
00056 
00058     virtual ~BoundaryFlux1DResponseFunction();
00059 
00061     virtual unsigned int numResponses() const;
00062 
00064     virtual void 
00065     evaluateResponses(const Epetra_Vector* xdot,
00066                       const Epetra_Vector& x,
00067                       const Teuchos::Array< Teuchos::RCP<ParamVec> >& p,
00068                       Epetra_Vector& g);
00069 
00071     virtual void 
00072     evaluateTangents(
00073      const Epetra_Vector* xdot,
00074      const Epetra_Vector& x,
00075      const Teuchos::Array< Teuchos::RCP<ParamVec> >& p,
00076      const Teuchos::Array< Teuchos::RCP<ParamVec> >& deriv_p,
00077      const Teuchos::Array< Teuchos::RCP<Epetra_MultiVector> >& dxdot_dp,
00078      const Teuchos::Array< Teuchos::RCP<Epetra_MultiVector> >& dx_dp,
00079      Epetra_Vector* g,
00080      const Teuchos::Array< Teuchos::RCP<Epetra_MultiVector> >& gt);
00081 
00083     virtual void 
00084     evaluateGradients(
00085     const Epetra_Vector* xdot,
00086     const Epetra_Vector& x,
00087     const Teuchos::Array< Teuchos::RCP<ParamVec> >& p,
00088     const Teuchos::Array< Teuchos::RCP<ParamVec> >& deriv_p,
00089     Epetra_Vector* g,
00090     Epetra_MultiVector* dg_dx,
00091     Epetra_MultiVector* dg_dxdot,
00092     const Teuchos::Array< Teuchos::RCP<Epetra_MultiVector> >& dg_dp);
00093 
00094 #if SG_ACTIVE
00096     virtual void 
00097     evaluateSGResponses(const Stokhos::VectorOrthogPoly<Epetra_Vector>* sg_xdot,
00098       const Stokhos::VectorOrthogPoly<Epetra_Vector>& sg_x,
00099       const ParamVec* p,
00100       const ParamVec* sg_p,
00101       const Teuchos::Array<SGType>* sg_p_vals,
00102       Stokhos::VectorOrthogPoly<Epetra_Vector>& sg_g);
00103 #endif
00104 
00105   private:
00106 
00108     BoundaryFlux1DResponseFunction(const BoundaryFlux1DResponseFunction&);
00109     
00111     BoundaryFlux1DResponseFunction& operator=(const BoundaryFlux1DResponseFunction&);
00112 
00113   protected:
00114 
00116     double grid_spacing;
00117 
00119     Epetra_Map *boundaryMap;
00120 
00122     Epetra_Import *importer;
00123 
00125     Epetra_Vector *bv;
00126 
00127   };
00128 
00129 }
00130 
00131 #endif // FEAPP_BOUNDARYFLUX1DRESPONSEFUNCTION_HPP

Generated on Wed May 12 21:39:32 2010 for Sacado Package Browser (Single Doxygen Collection) by  doxygen 1.4.7