LCOV - code coverage report
Current view: top level - src/mesquite/Mesh - MeshDecorator.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 MeshDecorator.hpp
      28                 :            :  *  \brief Definition of MBMesquite::MeshDecorator class
      29                 :            :  *  \author Jason Kraftcheck
      30                 :            :  */
      31                 :            : 
      32                 :            : #ifndef MSQ_MESH_DECORATOR_HPP
      33                 :            : #define MSQ_MESH_DECORATOR_HPP
      34                 :            : 
      35                 :            : #include "Mesquite.hpp"
      36                 :            : #include "MeshInterface.hpp"
      37                 :            : 
      38                 :            : namespace MBMesquite
      39                 :            : {
      40                 :            : 
      41                 :            : /**\brief Utility class for implementing decorators for the MBMesquite::Mesh interface
      42                 :            :  *
      43                 :            :  * This is a utility class that to assist with implementing decorators
      44                 :            :  * for the MBMesquite::Mesh interface.  This class implements a "dumb"
      45                 :            :  * decorator that passes all operations to its underlying (decorated)
      46                 :            :  * Mesh instance unchanged.  The intention is that useful decorators
      47                 :            :  * subclass this class, overriding only those functions for which they
      48                 :            :  * modify the behavioir.
      49                 :            :  */
      50                 :            : class MESQUITE_EXPORT MeshDecorator : public Mesh
      51                 :            : {
      52                 :            :   private:
      53                 :            :     Mesh* myMesh;  //< The actual Mesh this instance decorates
      54                 :            : 
      55                 :            :   protected:
      56                 :            :     void set_mesh( Mesh* mesh );
      57                 :            : 
      58                 :            :   public:
      59                 :            :     MeshDecorator();
      60                 :            :     MeshDecorator( Mesh* real_mesh );
      61                 :            : 
      62                 :            :     virtual ~MeshDecorator();
      63                 :            : 
      64                 :            :     /**\brief Get the real Mesh instance */
      65                 :    5822206 :     Mesh* get_mesh() const
      66                 :            :     {
      67                 :    5822206 :         return myMesh;
      68                 :            :     }
      69                 :            : 
      70                 :            :     //************ Operations on entire mesh ****************
      71                 :            : 
      72                 :            :     virtual int get_geometric_dimension( MsqError& err );
      73                 :            : 
      74                 :            :     virtual void get_all_elements( std::vector< ElementHandle >& elements, MsqError& err );
      75                 :            : 
      76                 :            :     virtual void get_all_vertices( std::vector< VertexHandle >& vertices, MsqError& err );
      77                 :            : 
      78                 :            :     //************ Vertex Properties ********************
      79                 :            : 
      80                 :            :     virtual void vertices_get_fixed_flag( const VertexHandle vert_array[], std::vector< bool >& fixed_flag_array,
      81                 :            :                                           size_t num_vtx, MsqError& err );
      82                 :            : 
      83                 :            :     virtual void vertices_get_slaved_flag( const VertexHandle vert_array[], std::vector< bool >& slaved_flag_array,
      84                 :            :                                            size_t num_vtx, MsqError& err );
      85                 :            : 
      86                 :            :     virtual void vertices_get_coordinates( const VertexHandle vert_array[], MsqVertex* coordinates, size_t num_vtx,
      87                 :            :                                            MsqError& err );
      88                 :            : 
      89                 :            :     virtual void vertex_set_coordinates( VertexHandle vertex, const Vector3D& coordinates, MsqError& err );
      90                 :            : 
      91                 :            :     virtual void vertex_set_byte( VertexHandle vertex, unsigned char byte, MsqError& err );
      92                 :            : 
      93                 :            :     virtual void vertices_set_byte( const VertexHandle* vert_array, const unsigned char* byte_array, size_t array_size,
      94                 :            :                                     MsqError& err );
      95                 :            : 
      96                 :            :     virtual void vertex_get_byte( const VertexHandle vertex, unsigned char* byte, MsqError& err );
      97                 :            : 
      98                 :            :     virtual void vertices_get_byte( const VertexHandle* vertex, unsigned char* byte_array, size_t array_size,
      99                 :            :                                     MsqError& err );
     100                 :            : 
     101                 :            :     //**************** Vertex Topology *****************
     102                 :            : 
     103                 :            :     virtual void vertices_get_attached_elements( const VertexHandle* vertex_array, size_t num_vertex,
     104                 :            :                                                  std::vector< ElementHandle >& elements, std::vector< size_t >& offsets,
     105                 :            :                                                  MsqError& err );
     106                 :            : 
     107                 :            :     //*************** Element Topology *************
     108                 :            : 
     109                 :            :     virtual void elements_get_attached_vertices( const ElementHandle* elem_handles, size_t num_elems,
     110                 :            :                                                  std::vector< VertexHandle >& vert_handles,
     111                 :            :                                                  std::vector< size_t >& offsets, MsqError& err );
     112                 :            : 
     113                 :            :     virtual void elements_get_topologies( const ElementHandle* element_handle_array, EntityTopology* element_topologies,
     114                 :            :                                           size_t num_elements, MsqError& err );
     115                 :            : 
     116                 :            :     //***************  Tags  ***********
     117                 :            : 
     118                 :            :     virtual TagHandle tag_create( const std::string& tag_name, TagType type, unsigned length, const void* default_value,
     119                 :            :                                   MsqError& err );
     120                 :            : 
     121                 :            :     virtual void tag_delete( TagHandle handle, MsqError& err );
     122                 :            : 
     123                 :            :     virtual TagHandle tag_get( const std::string& name, MsqError& err );
     124                 :            : 
     125                 :            :     virtual void tag_properties( TagHandle handle, std::string& name_out, TagType& type_out, unsigned& length_out,
     126                 :            :                                  MsqError& err );
     127                 :            : 
     128                 :            :     virtual void tag_set_element_data( TagHandle handle, size_t num_elems, const ElementHandle* elem_array,
     129                 :            :                                        const void* tag_data, MsqError& err );
     130                 :            : 
     131                 :            :     virtual void tag_set_vertex_data( TagHandle handle, size_t num_elems, const VertexHandle* node_array,
     132                 :            :                                       const void* tag_data, MsqError& err );
     133                 :            : 
     134                 :            :     virtual void tag_get_element_data( TagHandle handle, size_t num_elems, const ElementHandle* elem_array,
     135                 :            :                                        void* tag_data, MsqError& err );
     136                 :            : 
     137                 :            :     virtual void tag_get_vertex_data( TagHandle handle, size_t num_elems, const VertexHandle* node_array,
     138                 :            :                                       void* tag_data, MsqError& err );
     139                 :            : 
     140                 :            :     //**************** Memory Management ****************
     141                 :            : 
     142                 :            :     virtual void release_entity_handles( const EntityHandle* handle_array, size_t num_handles, MsqError& err );
     143                 :            : 
     144                 :            :     virtual void release();
     145                 :            : };
     146                 :            : 
     147                 :            : }  // namespace MBMesquite
     148                 :            : 
     149                 :            : #endif

Generated by: LCOV version 1.11