Back to index

salome-med  6.5.0
Public Member Functions | Private Attributes
SauvUtilities::NodeContainer Class Reference

More...

#include <SauvMedConvertor.hxx>

Collaboration diagram for SauvUtilities::NodeContainer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NodegetNode (const TID nID)
bool empty () const
size_t size () const
int numberNodes ()
 Assign new IDs to nodes by skipping not used nodes and return their number.

Private Attributes

std::vector< std::vector< Node > > _nodes

Detailed Description

Definition at line 200 of file SauvMedConvertor.hxx.


Member Function Documentation

bool SauvUtilities::NodeContainer::empty ( ) const [inline]

Definition at line 220 of file SauvMedConvertor.hxx.

{ return _nodes.empty(); }

Here is the caller graph for this function:

Definition at line 204 of file SauvMedConvertor.hxx.

    {
      const size_t chunkSize = 1000;
      const size_t chunkID = (nID-1) / chunkSize;
      const size_t pos     = (nID-1) % chunkSize;
      if ( _nodes.size() < chunkID+1 )
      {
        std::vector< std::vector< Node > > newNodes(chunkID+1);
        for ( size_t i = 0; i < _nodes.size(); ++i )
          newNodes[i].swap( _nodes[i] );
        for ( size_t i = _nodes.size(); i < newNodes.size(); ++i )
          newNodes[i].resize( chunkSize );
        _nodes.swap( newNodes );
      }
      return & _nodes[chunkID][pos];
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Assign new IDs to nodes by skipping not used nodes and return their number.

Definition at line 1724 of file SauvMedConvertor.cxx.

{
  int id = 1;
  for ( size_t i = 0; i < _nodes.size(); ++i )
    for ( size_t j = 0; j < _nodes[i].size(); ++j )
      if ( _nodes[i][j].isUsed() )
        _nodes[i][j]._number = id++;
  return id-1;
}

Here is the caller graph for this function:

size_t SauvUtilities::NodeContainer::size ( ) const [inline]

Definition at line 221 of file SauvMedConvertor.hxx.

{ return empty() ? 0 : _nodes.size() * _nodes[0].size(); }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

std::vector< std::vector< Node > > SauvUtilities::NodeContainer::_nodes [private]

Definition at line 202 of file SauvMedConvertor.hxx.


The documentation for this class was generated from the following files: