LCOV - code coverage report
Current view: top level - src/mesquite/Mesh - ExtraData.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 2 2 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 2006 Lawrence Livermore National Laboratory.  Under
       5                 :            :     the terms of Contract B545069 with the University of Wisconsin --
       6                 :            :     Madison, Lawrence Livermore National Laboratory 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                 :            :     (2006) [email protected]
      24                 :            : 
      25                 :            :   ***************************************************************** */
      26                 :            : 
      27                 :            : /** \file ExtraData.hpp
      28                 :            :  *  \brief
      29                 :            :  *  \author Jason Kraftcheck
      30                 :            :  */
      31                 :            : 
      32                 :            : #ifndef MSQ_EXTRA_DATA_HPP
      33                 :            : #define MSQ_EXTRA_DATA_HPP
      34                 :            : 
      35                 :            : #include "Mesquite.hpp"
      36                 :            : #include <stdlib.h>
      37                 :            : 
      38                 :            : namespace MBMesquite
      39                 :            : {
      40                 :            : 
      41                 :            : class PatchData;
      42                 :            : class MsqError;
      43                 :            : 
      44                 :            : /**\brief Object used to attach auxiliary data to PatchData */
      45                 :            : class ExtraData
      46                 :            : {
      47                 :            :   public:
      48                 :            :     ExtraData( PatchData& patch );
      49                 :            : 
      50                 :            :     virtual ~ExtraData();
      51                 :            : 
      52                 :     370573 :     PatchData* get_patch_data() const
      53                 :            :     {
      54                 :     370573 :         return patchPtr;
      55                 :            :     }
      56                 :            : 
      57                 :            :     /**\brief Notify that the owning PatchData is being destroyed.
      58                 :            :      *
      59                 :            :      * Notify an ExtraData object that the patch it is attached to
      60                 :            :      * is being destroyed.  The ExtraData will have been removed
      61                 :            :      * from the PatchData before being notified.  Therefore
      62                 :            :      * this->get_patch_data() will return NULL.
      63                 :            :      *
      64                 :            :      * ExtraData instances will also be notified via this method
      65                 :            :      * and removed and removed from the PatchData if the attached
      66                 :            :      * MBMesquite::Mesh or MBMesquite::MeshDomain instance is changed.
      67                 :            :      */
      68                 :            :     virtual void notify_patch_destroyed() = 0;
      69                 :            : 
      70                 :            :     /**\brief Notify that the patch (mesh) in the PatchData is changing
      71                 :            :      *
      72                 :            :      * Notify attached ExtraData that the PatchData is being changed
      73                 :            :      * to contain an new patch (set of mesh entities.)
      74                 :            :      */
      75                 :            :     virtual void notify_new_patch() = 0;
      76                 :            : 
      77                 :            :     /**\brief Nofity that a subpatch is being created from this patch.
      78                 :            :      *\param sub_patch The new, populated subpatch
      79                 :            :      *\param vertex_index_map The indices in the original patch for each
      80                 :            :      *          vertex in the subpatch.
      81                 :            :      *\param element_index_map The indices in the original patch for each
      82                 :            :      *          element in the subpatch.
      83                 :            :      */
      84                 :            :     virtual void notify_sub_patch( PatchData& sub_patch, const size_t* vertex_index_map,
      85                 :            :                                    const size_t* element_index_map, MsqError& err ) = 0;
      86                 :            : 
      87                 :            :   private:
      88                 :            :     friend class PatchData;
      89                 :            :     ExtraData* patchNext;
      90                 :            :     PatchData* patchPtr;
      91                 :            : };
      92                 :            : 
      93                 :            : }  // namespace MBMesquite
      94                 :            : 
      95                 :            : #endif

Generated by: LCOV version 1.11