LCOV - code coverage report
Current view: top level - src/mesquite/Mesh - MeshUtil.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 1 1 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                 :            :     (2010) [email protected]
      24                 :            : 
      25                 :            :   ***************************************************************** */
      26                 :            : 
      27                 :            : /** \file MeshUtil.hpp
      28                 :            :  *  \author Jason Kraftcheck
      29                 :            :  */
      30                 :            : 
      31                 :            : #ifndef MSQ_MESH_UTIL_HPP
      32                 :            : #define MSQ_MESH_UTIL_HPP
      33                 :            : 
      34                 :            : #include "Mesquite.hpp"
      35                 :            : 
      36                 :            : namespace MBMesquite
      37                 :            : {
      38                 :            : 
      39                 :            : class Mesh;
      40                 :            : class MsqError;
      41                 :            : class SimpleStats;
      42                 :            : class Settings;
      43                 :            : class PatchData;
      44                 :            : 
      45                 :            : /**\brief Miscelanions operations performed on an entire \c Mesh
      46                 :            :  *        without the conveinience of a \c PatchData.
      47                 :            :  */
      48                 :            : class MeshUtil
      49                 :            : {
      50                 :            :   private:
      51                 :            :     Mesh* myMesh;
      52                 :            :     Settings* mySettings;
      53                 :            :     PatchData* globalPatch;
      54                 :            : 
      55                 :            :   protected:
      56                 :            :     PatchData* get_global_patch( MsqError& err );
      57                 :            : 
      58                 :            :   public:
      59                 :         33 :     MeshUtil( Mesh* mesh, Settings* settings = 0 ) : myMesh( mesh ), mySettings( settings ), globalPatch( 0 ) {}
      60                 :            : 
      61                 :            :     ~MeshUtil();
      62                 :            : 
      63                 :            :     /**\brief Calcluate statistics for mesh edge lengths
      64                 :            :      */
      65                 :            :     void edge_length_distribution( SimpleStats& result, MsqError& err );
      66                 :            : 
      67                 :            :     void lambda_distribution( SimpleStats& result, MsqError& err );
      68                 :            : 
      69                 :            :     /**\brief Given two meshes, check if they are different, return true if they are.
      70                 :            :      *
      71                 :            :      *\param mesh1 the first mesh to compare
      72                 :            :      *\param mesh2 the second mesh to compare
      73                 :            :      *\param tol a relative tolerance for coordinates
      74                 :            :      *\param do_print flag for printing differences
      75                 :            :      *
      76                 :            :      * \NOTE Only basic mesh properties are checked, number of vertices & elements,
      77                 :            :      * element connectivity, and coordinates (within the given relative tolerance).
      78                 :            :      */
      79                 :            :     static bool meshes_are_different( Mesh& mesh1, Mesh& mesh2, MsqError& err, double tol = 1.e-5,
      80                 :            :                                       bool do_print = false );
      81                 :            : };
      82                 :            : 
      83                 :            : }  // namespace MBMesquite
      84                 :            : 
      85                 :            : #endif

Generated by: LCOV version 1.11