SundanceFunctional.hpp
Go to the documentation of this file.
00001 /* @HEADER@ */
00002 // ************************************************************************
00003 // 
00004 //                              Sundance
00005 //                 Copyright (2005) Sandia Corporation
00006 // 
00007 // Copyright (year first published) Sandia Corporation.  Under the terms 
00008 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government 
00009 // retains certain rights in this software.
00010 // 
00011 // This library is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Lesser General Public License as
00013 // published by the Free Software Foundation; either version 2.1 of the
00014 // License, or (at your option) any later version.
00015 //  
00016 // This library is distributed in the hope that it will be useful, but
00017 // WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019 // Lesser General Public License for more details.
00020 //                                                                                 
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License along with this library; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024 // USA                                                                                
00025 // Questions? Contact Kevin Long (krlong@sandia.gov), 
00026 // Sandia National Laboratories, Livermore, California, USA
00027 // 
00028 // ************************************************************************
00029 /* @HEADER@ */
00030 
00031 #ifndef SUNDANCE_FUNCTIONAL_H
00032 #define SUNDANCE_FUNCTIONAL_H
00033 
00034 #include "SundanceDefs.hpp"
00035 #include "SundanceLinearProblem.hpp"
00036 #include "SundanceVectorCalculus.hpp"
00037 #include "SundanceNonlinearProblem.hpp"
00038 #include "SundanceFunctionalEvaluator.hpp"
00039 #include "TSFNonlinearOperator.hpp"
00040 #include "TSFLinearSolverDecl.hpp"
00041 #include "TSFVectorDecl.hpp"
00042 #include "TSFVectorType.hpp"
00043 
00044 namespace Sundance
00045 {
00046 using namespace Sundance;
00047 using namespace Teuchos;
00048 
00049 /**
00050  *
00051  */
00052 class Functional
00053 {
00054 public:
00055   /** */
00056   Functional(){;}
00057 
00058   /** */
00059   Functional(
00060     const Mesh& mesh, 
00061     const Expr& integral, 
00062     const TSFExtended::VectorType<double>& vecType);
00063 
00064   /** */
00065   Functional(
00066     const Mesh& mesh, 
00067     const Expr& integral, 
00068     const Expr& essentialBC,
00069     const TSFExtended::VectorType<double>& vecType);
00070 
00071   /** */
00072   LinearProblem linearVariationalProb(const Expr& var,
00073     const Expr& varEvalPts,
00074     const Expr& unk,
00075     const Expr& fixed,
00076     const Expr& fixedEvalPts) const ;
00077 
00078     
00079   /** */
00080   NonlinearProblem
00081   nonlinearVariationalProb(const Expr& var,
00082     const Expr& varEvalPts,
00083     const Expr& unk,
00084     const Expr& unkEvalPts,
00085     const Expr& fixed,
00086     const Expr& fixedEvalPts) const ;
00087 
00088 
00089   /** */
00090   FunctionalEvaluator evaluator(const Expr& var,
00091     const Expr& varEvalPts,
00092     const Expr& fixed,
00093     const Expr& fixedEvalPts) const ;
00094 
00095 
00096   /** */
00097   FunctionalEvaluator evaluator(const Expr& var,
00098     const Expr& varEvalPts) const ;
00099 
00100   /** */
00101   const Mesh& mesh() const {return mesh_;}
00102     
00103 
00104 private:
00105   Mesh mesh_;
00106 
00107   Expr integral_;
00108 
00109   Expr bc_;
00110 
00111   TSFExtended::VectorType<double> vecType_;
00112     
00113 };
00114 
00115 /** \relates Functional */
00116 double L2Norm(const Mesh& mesh, const CellFilter& domain,
00117   const Expr& expr, const QuadratureFamily& quad);
00118 
00119 /** \relates Functional */
00120 double H1Seminorm(
00121   const Mesh& mesh,
00122   const CellFilter& filter,
00123   const Expr& f,
00124   const QuadratureFamily& quad);
00125 
00126 /** \relates Functional */
00127 double H1Norm(
00128   const Mesh& mesh,
00129   const CellFilter& filter,
00130   const Expr& f,
00131   const QuadratureFamily& quad);
00132 }
00133 
00134 
00135 #endif

Site Contact