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_NITSCHEBC_H 00032 #define SUNDANCE_NITSCHEBC_H 00033 00034 #include "SundanceDefs.hpp" 00035 #include "SundanceExpr.hpp" 00036 00037 00038 namespace Sundance 00039 { 00040 class CellFilter; 00041 class QuadratureFamily; 00042 00043 /** 00044 * This function forms the expressions that apply the Dirichlet 00045 * BC \f$u=u_{BC}\f$ via Nitsche's method for the Poisson operator. 00046 */ 00047 Expr NitschePoissonDirichletBC(int dim, 00048 const CellFilter& cells, 00049 const QuadratureFamily& quad, 00050 const Expr& kappa, 00051 const Expr& v, 00052 const Expr& u, 00053 const Expr& uBC, 00054 const double& gamma); 00055 00056 /** 00057 * This function forms the expressions that apply the Dirichlet 00058 * BC \f${\bf u}={\bf u}_{BC}\f$ via Nitsche's method for the Stokes operator. 00059 * 00060 * \param cells the surface on which the BC is to be applied 00061 * \param quad the quadrature rule to be used 00062 * \param nu the viscosity, which may be a function of velocity 00063 * \param v velocity test function 00064 * \param q pressure test function 00065 * \param u velocity unknown function 00066 * \param p pressure unknown function 00067 * \param uBC specified velocity at surface 00068 */ 00069 Expr NitscheStokesNoSlipBC(const CellFilter& cells, 00070 const QuadratureFamily& quad, 00071 const Expr& nu, 00072 const Expr& v, 00073 const Expr& q, 00074 const Expr& u, 00075 const Expr& p, 00076 const Expr& uBC, 00077 const double& gamma1, 00078 const double& gamma2 00079 ); 00080 00081 00082 00083 00084 } 00085 00086 00087 #endif