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

           Branch data     Line data    Source code
       1                 :            : /* *****************************************************************
       2                 :            :     MESQUITE -- The Mesh Quality Improvement Toolkit
       3                 :            : 
       4                 :            :     Copyright 2004 Sandia Corporation and Argonne National
       5                 :            :     Laboratory.  Under the terms of Contract DE-AC04-94AL85000
       6                 :            :     with Sandia Corporation, the U.S. Government retains certain
       7                 :            :     rights in 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                 :            :     [email protected], [email protected], [email protected],
      24                 :            :     [email protected], [email protected], [email protected]
      25                 :            : 
      26                 :            :   ***************************************************************** */
      27                 :            : /*!
      28                 :            :   \file   QualityImprover.hpp
      29                 :            :   \brief
      30                 :            : 
      31                 :            :   The Quality Improver Class is the base class for all the algorythms
      32                 :            : 
      33                 :            :   \author Thomas Leurent
      34                 :            :   \date   2002-01-17
      35                 :            : */
      36                 :            : 
      37                 :            : #ifndef Mesquite_QualityImprover_hpp
      38                 :            : #define Mesquite_QualityImprover_hpp
      39                 :            : 
      40                 :            : #include <string>
      41                 :            : 
      42                 :            : #include "Mesquite.hpp"
      43                 :            : #include "Instruction.hpp"
      44                 :            : #include "TerminationCriterion.hpp"
      45                 :            : 
      46                 :            : namespace MBMesquite
      47                 :            : {
      48                 :            : class PatchSet;
      49                 :            : class MsqError;
      50                 :            : class Mesh;
      51                 :            : class MeshDomain;
      52                 :            : class Settings;
      53                 :            : 
      54                 :            : /*! \class QualityImprover
      55                 :            :   \brief Base class for all quality improvers.
      56                 :            :   Mote that the PatchData settings are inherited from the PathDataUser class.
      57                 :            : 
      58                 :            : */
      59                 :            : class MESQUITE_EXPORT QualityImprover : public Instruction
      60                 :            : {
      61                 :            :   public:
      62                 :            :     // Constructor is protected ... see below.
      63                 :            : 
      64                 :            :     // virtual destructor ensures use of polymorphism during destruction
      65                 :            :     virtual ~QualityImprover();
      66                 :            : 
      67                 :            :     //! Sets in the termination criterion for the concrete solver's
      68                 :            :     //! optimization.
      69                 :        120 :     void set_inner_termination_criterion( TerminationCriterion* crit )
      70                 :            :     {
      71                 :        120 :         innerTerminationCriterion = crit;
      72                 :        120 :     }
      73                 :            :     //! Sets in the termination criterion for the outer loop over
      74                 :            :     //! patches.
      75                 :        110 :     void set_outer_termination_criterion( TerminationCriterion* crit )
      76                 :            :     {
      77                 :        110 :         outerTerminationCriterion = crit;
      78                 :        110 :     }
      79                 :            : 
      80                 :            :     virtual PatchSet* get_patch_set() = 0;
      81                 :            : 
      82                 :            :     virtual void initialize_queue( MeshDomainAssoc* mesh_and_domain, const Settings* settings, MsqError& err );
      83                 :            : 
      84                 :            :   protected:
      85                 :            :     /*! The default constructor initialises a few member variables
      86                 :            :         to default values.
      87                 :            :         This can be reused by concrete class constructor. */
      88                 :            :     QualityImprover();
      89                 :            : 
      90                 :            :     //! return the outer termination criterion pointer
      91                 :        128 :     TerminationCriterion* get_outer_termination_criterion()
      92                 :            :     {
      93                 :        128 :         return outerTerminationCriterion;
      94                 :            :     }
      95                 :            :     //! return the inner termination criterion pointer
      96                 :      79069 :     TerminationCriterion* get_inner_termination_criterion()
      97                 :            :     {
      98                 :      79069 :         return innerTerminationCriterion;
      99                 :            :     }
     100                 :            : 
     101                 :            :   private:
     102                 :            :     TerminationCriterion* innerTerminationCriterion;
     103                 :            :     TerminationCriterion* outerTerminationCriterion;
     104                 :            :     // default TerminationCriterion for outer loop will be set in constructor
     105                 :            :     TerminationCriterion* defaultOuterCriterion;
     106                 :            :     // default TerminationCriterion for inner loop set by concrete improver
     107                 :            :     TerminationCriterion* defaultInnerCriterion;
     108                 :            : };
     109                 :            : 
     110                 :            : }  // namespace MBMesquite
     111                 :            : 
     112                 :            : #endif

Generated by: LCOV version 1.11