LCOV - code coverage report
Current view: top level - src/mesquite/Mesh - MeshDecorator.cpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 18 74 24.3 %
Date: 2020-07-18 00:09:26 Functions: 9 30 30.0 %
Branches: 3 6 50.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.cpp
      28                 :            :  *  \brief Implementation of MBMesquite::MeshDecorator class
      29                 :            :  *  \author Jason Kraftcheck
      30                 :            :  */
      31                 :            : 
      32                 :            : #include "Mesquite.hpp"
      33                 :            : #include "MeshDecorator.hpp"
      34                 :            : 
      35                 :            : namespace MBMesquite
      36                 :            : {
      37                 :            : 
      38                 :         20 : MeshDecorator::MeshDecorator() : myMesh( 0 ) {}
      39                 :          0 : MeshDecorator::MeshDecorator( Mesh* mesh ) : myMesh( mesh ) {}
      40                 :            : 
      41         [ -  + ]:         20 : MeshDecorator::~MeshDecorator() {}
      42                 :            : 
      43                 :         10 : void MeshDecorator::set_mesh( Mesh* mesh )
      44                 :            : {
      45                 :         10 :     myMesh = mesh;
      46                 :         10 : }
      47                 :            : 
      48                 :          0 : void MeshDecorator::vertices_get_coordinates( const VertexHandle vert_array[], MsqVertex* coordinates, size_t num_vtx,
      49                 :            :                                               MsqError& err )
      50                 :            : {
      51                 :          0 :     return get_mesh()->vertices_get_coordinates( vert_array, coordinates, num_vtx, err );
      52                 :            : }
      53                 :            : 
      54                 :          0 : void MeshDecorator::vertex_set_coordinates( VertexHandle vertex, const Vector3D& coordinates, MsqError& err )
      55                 :            : {
      56                 :          0 :     return get_mesh()->vertex_set_coordinates( vertex, coordinates, err );
      57                 :            : }
      58                 :            : 
      59                 :            : //************ Operations on entire mesh ****************
      60                 :            : 
      61                 :          0 : int MeshDecorator::get_geometric_dimension( MsqError& err )
      62                 :            : {
      63                 :          0 :     return get_mesh()->get_geometric_dimension( err );
      64                 :            : }
      65                 :            : 
      66                 :          0 : void MeshDecorator::get_all_elements( std::vector< ElementHandle >& elements, MsqError& err )
      67                 :            : {
      68                 :          0 :     get_mesh()->get_all_elements( elements, err );
      69                 :          0 : }
      70                 :            : 
      71                 :          6 : void MeshDecorator::get_all_vertices( std::vector< VertexHandle >& vertices, MsqError& err )
      72                 :            : {
      73                 :          6 :     get_mesh()->get_all_vertices( vertices, err );
      74                 :          6 : }
      75                 :            : 
      76                 :            : //************ Vertex Properties ********************
      77                 :            : 
      78                 :          0 : void MeshDecorator::vertices_get_fixed_flag( const VertexHandle vert_array[], std::vector< bool >& fixed_flag_array,
      79                 :            :                                              size_t num_vtx, MsqError& err )
      80                 :            : {
      81                 :          0 :     get_mesh()->vertices_get_fixed_flag( vert_array, fixed_flag_array, num_vtx, err );
      82                 :          0 : }
      83                 :            : 
      84                 :          0 : void MeshDecorator::vertices_get_slaved_flag( const VertexHandle vert_array[], std::vector< bool >& flag_array,
      85                 :            :                                               size_t num_vtx, MsqError& err )
      86                 :            : {
      87                 :          0 :     get_mesh()->vertices_get_slaved_flag( vert_array, flag_array, num_vtx, err );
      88                 :          0 : }
      89                 :            : 
      90                 :          0 : void MeshDecorator::vertex_set_byte( VertexHandle vertex, unsigned char byte, MsqError& err )
      91                 :            : {
      92                 :          0 :     get_mesh()->vertex_set_byte( vertex, byte, err );
      93                 :          0 : }
      94                 :            : 
      95                 :          0 : void MeshDecorator::vertices_set_byte( const VertexHandle* vert_array, const unsigned char* byte_array,
      96                 :            :                                        size_t array_size, MsqError& err )
      97                 :            : {
      98                 :          0 :     get_mesh()->vertices_set_byte( vert_array, byte_array, array_size, err );
      99                 :          0 : }
     100                 :            : 
     101                 :          0 : void MeshDecorator::vertex_get_byte( const VertexHandle vertex, unsigned char* byte, MsqError& err )
     102                 :            : {
     103                 :          0 :     get_mesh()->vertex_get_byte( vertex, byte, err );
     104                 :          0 : }
     105                 :            : 
     106                 :          0 : void MeshDecorator::vertices_get_byte( const VertexHandle* vertex, unsigned char* byte_array, size_t array_size,
     107                 :            :                                        MsqError& err )
     108                 :            : {
     109                 :          0 :     get_mesh()->vertices_get_byte( vertex, byte_array, array_size, err );
     110                 :          0 : }
     111                 :            : 
     112                 :            : //**************** Vertex Topology *****************
     113                 :            : 
     114                 :          0 : void MeshDecorator::vertices_get_attached_elements( const VertexHandle* vertex_array, size_t num_vertex,
     115                 :            :                                                     std::vector< ElementHandle >& elements,
     116                 :            :                                                     std::vector< size_t >& offsets, MsqError& err )
     117                 :            : {
     118                 :          0 :     get_mesh()->vertices_get_attached_elements( vertex_array, num_vertex, elements, offsets, err );
     119                 :          0 : }
     120                 :            : 
     121                 :            : //*************** Element Topology *************
     122                 :            : 
     123                 :          0 : void MeshDecorator::elements_get_attached_vertices( const ElementHandle* elem_handles, size_t num_elems,
     124                 :            :                                                     std::vector< VertexHandle >& vert_handles,
     125                 :            :                                                     std::vector< size_t >& offsets, MsqError& err )
     126                 :            : {
     127                 :          0 :     get_mesh()->elements_get_attached_vertices( elem_handles, num_elems, vert_handles, offsets, err );
     128                 :          0 : }
     129                 :            : 
     130                 :          0 : void MeshDecorator::elements_get_topologies( const ElementHandle* element_handle_array,
     131                 :            :                                              EntityTopology* element_topologies, size_t num_elements, MsqError& err )
     132                 :            : {
     133                 :          0 :     get_mesh()->elements_get_topologies( element_handle_array, element_topologies, num_elements, err );
     134                 :          0 : }
     135                 :            : 
     136                 :            : //***************  Tags  ***********
     137                 :            : 
     138                 :          0 : TagHandle MeshDecorator::tag_create( const std::string& tag_name, TagType type, unsigned length,
     139                 :            :                                      const void* default_value, MsqError& err )
     140                 :            : {
     141                 :          0 :     return get_mesh()->tag_create( tag_name, type, length, default_value, err );
     142                 :            : }
     143                 :            : 
     144                 :          6 : void MeshDecorator::tag_delete( TagHandle handle, MsqError& err )
     145                 :            : {
     146                 :          6 :     get_mesh()->tag_delete( handle, err );
     147                 :          6 : }
     148                 :            : 
     149                 :          0 : TagHandle MeshDecorator::tag_get( const std::string& name, MsqError& err )
     150                 :            : {
     151                 :          0 :     return get_mesh()->tag_get( name, err );
     152                 :            : }
     153                 :            : 
     154                 :          3 : void MeshDecorator::tag_properties( TagHandle handle, std::string& name_out, TagType& type_out, unsigned& length_out,
     155                 :            :                                     MsqError& err )
     156                 :            : {
     157                 :          3 :     get_mesh()->tag_properties( handle, name_out, type_out, length_out, err );
     158                 :          3 : }
     159                 :            : 
     160                 :          0 : void MeshDecorator::tag_set_element_data( TagHandle handle, size_t num_elems, const ElementHandle* elem_array,
     161                 :            :                                           const void* tag_data, MsqError& err )
     162                 :            : {
     163                 :          0 :     get_mesh()->tag_set_element_data( handle, num_elems, elem_array, tag_data, err );
     164                 :          0 : }
     165                 :            : 
     166                 :          6 : void MeshDecorator::tag_set_vertex_data( TagHandle handle, size_t num_elems, const VertexHandle* node_array,
     167                 :            :                                          const void* tag_data, MsqError& err )
     168                 :            : {
     169                 :          6 :     get_mesh()->tag_set_vertex_data( handle, num_elems, node_array, tag_data, err );
     170                 :          6 : }
     171                 :            : 
     172                 :          0 : void MeshDecorator::tag_get_element_data( TagHandle handle, size_t num_elems, const ElementHandle* elem_array,
     173                 :            :                                           void* tag_data, MsqError& err )
     174                 :            : {
     175                 :          0 :     get_mesh()->tag_get_element_data( handle, num_elems, elem_array, tag_data, err );
     176                 :          0 : }
     177                 :            : 
     178                 :          0 : void MeshDecorator::tag_get_vertex_data( TagHandle handle, size_t num_elems, const VertexHandle* node_array,
     179                 :            :                                          void* tag_data, MsqError& err )
     180                 :            : {
     181                 :          0 :     get_mesh()->tag_get_vertex_data( handle, num_elems, node_array, tag_data, err );
     182                 :          0 : }
     183                 :            : 
     184                 :            : //**************** Memory Management ****************
     185                 :            : 
     186                 :          0 : void MeshDecorator::release_entity_handles( const EntityHandle* handle_array, size_t num_handles, MsqError& err )
     187                 :            : {
     188                 :          0 :     get_mesh()->release_entity_handles( handle_array, num_handles, err );
     189                 :          0 : }
     190                 :            : 
     191                 :          0 : void MeshDecorator::release()
     192                 :            : {
     193                 :          0 :     get_mesh()->release();
     194                 :          0 : }
     195                 :            : 
     196 [ +  - ][ +  - ]:         16 : }  // namespace MBMesquite

Generated by: LCOV version 1.11