LCOV - code coverage report
Current view: top level - src/mesquite/Wrappers - LaplaceWrapper.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 3 3 100.0 %
Date: 2020-07-18 00:09:26 Functions: 1 1 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* *****************************************************************
       2                 :            :     MESQUITE -- The Mesh Quality Improvement Toolkit
       3                 :            : 
       4                 :            :     Copyright 2010 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                 :            :     (2011) [email protected]
      24                 :            : 
      25                 :            :   ***************************************************************** */
      26                 :            : 
      27                 :            : /** \file LaplaceWrapper.hpp
      28                 :            :  *  \brief Define LaplaceWrapper class
      29                 :            :  *  \author Jason Kraftcheck
      30                 :            :  */
      31                 :            : 
      32                 :            : #ifndef MSQ_LAPLACE_WRAPPER_HPP
      33                 :            : #define MSQ_LAPLACE_WRAPPER_HPP
      34                 :            : 
      35                 :            : #include "Wrapper.hpp"
      36                 :            : 
      37                 :            : namespace MBMesquite
      38                 :            : {
      39                 :            : 
      40                 :            : class LaplaceWrapper : public Wrapper
      41                 :            : {
      42                 :            :   public:
      43                 :            :     MESQUITE_EXPORT
      44                 :            :     LaplaceWrapper();
      45                 :            : 
      46                 :            :     /**\brief Specify timeout after which untangler will exit
      47                 :            :      *
      48                 :            :      *  Specify a value less than or equal to zero for no limit
      49                 :            :      */
      50                 :            :     void set_cpu_time_limit( double seconds )
      51                 :            :     {
      52                 :            :         maxTime = seconds;
      53                 :            :     }
      54                 :            :     double get_cpu_time_limit() const
      55                 :            :     {
      56                 :            :         return maxTime;
      57                 :            :     }
      58                 :            : 
      59                 :            :     /**\brief Specify factor by which to minimum distance a vertex must
      60                 :            :      *        move in an iteration to avoid termination of the untangler
      61                 :            :      *
      62                 :            :      *  Specify a value less than or equal to zero for no limit.
      63                 :            :      *\NOTE Culling cannot be done w/out a limit on vertex movement
      64                 :            :      */
      65                 :          1 :     void set_vertex_movement_limit_factor( double f )
      66                 :            :     {
      67                 :          1 :         movementFactor = f;
      68                 :          1 :     }
      69                 :            :     double get_vertex_movement_limit_factor() const
      70                 :            :     {
      71                 :            :         return movementFactor;
      72                 :            :     }
      73                 :            : 
      74                 :            :     /**\brief Specify maximum number of iterations.
      75                 :            :      *
      76                 :            :      * Specify a value less than or equal to zero for no limit
      77                 :            :      */
      78                 :            :     void set_iteration_limit( int limit )
      79                 :            :     {
      80                 :            :         iterationLimit = limit;
      81                 :            :     }
      82                 :            :     int get_iteration_limit() const
      83                 :            :     {
      84                 :            :         return iterationLimit;
      85                 :            :     }
      86                 :            : 
      87                 :            :     /**\brief Cull vertices based on movement limit */
      88                 :            :     inline void enable_culling( bool yesno )
      89                 :            :     {
      90                 :            :         doCulling = yesno;
      91                 :            :     }
      92                 :            :     inline bool is_culling_enabled() const
      93                 :            :     {
      94                 :            :         return doCulling;
      95                 :            :     }
      96                 :            : 
      97                 :            :     MESQUITE_EXPORT
      98                 :            :     ~LaplaceWrapper();
      99                 :            : 
     100                 :            :   protected:
     101                 :            :     MESQUITE_EXPORT
     102                 :            :     void run_wrapper( MeshDomainAssoc* mesh_and_domain, ParallelMesh* pmesh, Settings* settings, QualityAssessor* qa,
     103                 :            :                       MsqError& err );
     104                 :            : 
     105                 :            :   private:
     106                 :            :     double maxTime, movementFactor;
     107                 :            :     int iterationLimit;
     108                 :            :     bool doCulling;
     109                 :            : };
     110                 :            : 
     111                 :            : }  // namespace MBMesquite
     112                 :            : 
     113                 :            : #endif

Generated by: LCOV version 1.11