Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
smoab::detail::internal::SubsetArray Struct Reference

#include <LinearCellConnectivity.h>

+ Collaboration diagram for smoab::detail::internal::SubsetArray:

Public Types

typedef std::vector
< EntityHandle >
::const_iterator 
const_iterator
typedef std::vector
< EntityHandle >::iterator 
iterator

Public Member Functions

 SubsetArray (EntityHandle *realConn, int numCells, int currentVertsPerCell, int newVertsPerCell)
const_iterator begin () const
iterator begin ()
const_iterator end () const
iterator end ()

Private Attributes

std::vector< EntityHandleArray

Detailed Description

Definition at line 19 of file LinearCellConnectivity.h.


Member Typedef Documentation


Constructor & Destructor Documentation

smoab::detail::internal::SubsetArray::SubsetArray ( EntityHandle realConn,
int  numCells,
int  currentVertsPerCell,
int  newVertsPerCell 
) [inline]

Definition at line 21 of file LinearCellConnectivity.h.

References Array, and size.

                                                                                                              : Array()
            {
                const int size = numCells * newVertsPerCell;
                this->Array.reserve( size );
                if( currentVertsPerCell == newVertsPerCell )
                {
                    std::copy( realConn, realConn + size, std::back_inserter( this->Array ) );
                }
                else
                {
                    //skip copy only the first N points which we want
                    //since moab stores linear points first per cell
                    EntityHandle* pos = realConn;
                    for( int i = 0; i < numCells; ++i )
                    {
                        std::copy( pos, pos + newVertsPerCell, std::back_inserter( this->Array ) );
                        pos += currentVertsPerCell;
                    }
                }
            }

Member Function Documentation

Definition at line 44 of file LinearCellConnectivity.h.

References Array.

            {
                return this->Array.begin();
            }

Definition at line 48 of file LinearCellConnectivity.h.

References Array.

            {
                return this->Array.begin();
            }

Definition at line 53 of file LinearCellConnectivity.h.

References Array.

            {
                return this->Array.end();
            }

Definition at line 57 of file LinearCellConnectivity.h.

References Array.

            {
                return this->Array.end();
            }

Member Data Documentation

Definition at line 63 of file LinearCellConnectivity.h.

Referenced by begin(), end(), and SubsetArray().

List of all members.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines