1 /* ***************************************************************** 2 MESQUITE -- The Mesh Quality Improvement Toolkit 3 4 Copyright 2006 Sandia National Laboratories. Developed at the 5 University of Wisconsin--Madison under SNL contract number 6 624796. The U.S. Government and the University of Wisconsin 7 retain certain rights to this software. 8 9 This library is free software; you can redistribute it and/or 10 modify it under the terms of the GNU Lesser General Public 11 License as published by the Free Software Foundation; either 12 version 2.1 of the License, or (at your option) any later version. 13 14 This library is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 Lesser General Public License for more details. 18 19 You should have received a copy of the GNU Lesser General Public License 20 (lgpl.txt) along with this library; if not, write to the Free Software 21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 23 (2006) kraftche@cae.wisc.edu 24 25 ***************************************************************** */ 26 27 28 /** \file TShapeSize2DNB1.hpp 29 * \brief 30 * \author Jason Kraftcheck 31 */ 32 33 #ifndef MSQ_T_SHAPE_SIZE_2D_NB_1_HPP 34 #define MSQ_T_SHAPE_SIZE_2D_NB_1_HPP 35 36 #include "Mesquite.hpp" 37 #include "TMetricNonBarrier.hpp" 38 39 namespace MBMesquite { 40 41 /** |T|^2 - 2*sqrt(|T|^2 + 2*det(T))+2 */ 42 class TShapeSize2DNB1 : public TMetricNonBarrier2D 43 { 44 public: 45 46 MESQUITE_EXPORT virtual 47 ~TShapeSize2DNB1(); 48 49 MESQUITE_EXPORT virtual 50 std::string get_name() const; 51 52 MESQUITE_EXPORT virtual 53 bool evaluate( const MsqMatrix<2,2>& T, 54 double& result, 55 MsqError& err ); 56 57 MESQUITE_EXPORT virtual 58 bool evaluate_with_grad( const MsqMatrix<2,2>& T, 59 double& result, 60 MsqMatrix<2,2>& deriv_wrt_T, 61 MsqError& err ); 62 63 MESQUITE_EXPORT virtual 64 bool evaluate_with_hess( const MsqMatrix<2,2>& T, 65 double& result, 66 MsqMatrix<2,2>& deriv_wrt_T, 67 MsqMatrix<2,2> second_wrt_T[3], 68 MsqError& err ); 69 }; 70 71 72 73 } // namespace MBMesquite 74 75 #endif 76