MOAB: Mesh Oriented datABase  (version 5.2.1)
ShapeImprover.hpp
Go to the documentation of this file.
00001 /* *****************************************************************
00002     MESQUITE -- The Mesh Quality Improvement Toolkit
00003 
00004     Copyright 2010 Sandia National Laboratories.  Developed at the
00005     University of Wisconsin--Madison under SNL contract number
00006     624796.  The U.S. Government and the University of Wisconsin
00007     retain certain rights to this software.
00008 
00009     This library is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU Lesser General Public
00011     License as published by the Free Software Foundation; either
00012     version 2.1 of the License, or (at your option) any later version.
00013 
00014     This library is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017     Lesser General Public License for more details.
00018 
00019     You should have received a copy of the GNU Lesser General Public License
00020     (lgpl.txt) along with this library; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00023     (2010) kraftche@cae.wisc.edu
00024 
00025   ***************************************************************** */
00026 
00027 /** \file ShapeImprover.hpp
00028  *  \brief
00029  *  \author Jason Kraftcheck
00030  */
00031 
00032 #ifndef MSQ_SHAPE_IMPROVER_HPP
00033 #define MSQ_SHAPE_IMPROVER_HPP
00034 
00035 #include "Mesquite.hpp"
00036 #include "Wrapper.hpp"
00037 
00038 namespace MBMesquite
00039 {
00040 
00041 /**\brief Wrapper that implements TMP-based shape improvement
00042  */
00043 class ShapeImprover : public Wrapper
00044 {
00045 
00046   public:
00047     MESQUITE_EXPORT
00048     ShapeImprover();
00049 
00050     /*\brief Set limit on seconds of CPU time
00051      *
00052      * Default is no limit on CPU time.
00053      */
00054     MESQUITE_EXPORT
00055     void set_cpu_time_limit( double seconds );
00056 
00057     /*\brief Set mean edge length factor for termination
00058      *
00059      * Optimization will cease when, for a given iteration,
00060      * no vertex is moved more than beta * (mean - sigma)
00061      * where mean is the average edge length of the initial mesh
00062      * and sigma is the standard deviation of the edge lengths
00063      * in the initial mesh.  beta is the value passed to this
00064      * function.  beta must be greater than zero and less than one.
00065      * The default value for beta is 10 percent of the meshes
00066      * minimum edge length.
00067      */
00068     MESQUITE_EXPORT
00069     void set_vertex_movement_limit_factor( double beta );
00070 
00071     MESQUITE_EXPORT
00072     void set_parallel_iterations( int count );
00073 
00074   protected:
00075     MESQUITE_EXPORT
00076     void run_wrapper( MeshDomainAssoc* mesh_and_domain, ParallelMesh* pmesh, Settings* settings, QualityAssessor* qa,
00077                       MsqError& err );
00078 
00079   private:
00080     double maxTime, mBeta;
00081     int parallelIterations;
00082 };
00083 
00084 }  // namespace MBMesquite
00085 
00086 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines