20 #pragma warning( disable : 4786 )
36 if( MB_SUCCESS != result ) return result
42 const int preferred_start_id,
44 std::vector< double* >& arrays,
52 actual_start_handle = 0;
59 actual_start_handle, seq, sequence_size );
64 seq->
end_handle() - actual_start_handle + 1 < (
unsigned)num_nodes )
69 error =
static_cast< VertexSequence*
>( seq )->get_coordinate_arrays( arrays[0], arrays[1], arrays[2] );
70 for(
unsigned i = 0; i < arrays.size(); ++i )
71 if( arrays[i] ) arrays[i] += ( actual_start_handle - seq->
start_handle() );
77 const int verts_per_element,
78 const EntityType mdb_type,
79 const int preferred_start_id,
87 if( num_elements < 1 )
89 actual_start_handle = 0;
100 actual_start_handle, seq, sequence_size );
104 seq->
end_handle() - actual_start_handle + 1 < (
unsigned)num_elements )
108 array =
static_cast< ElementSequence*
>( seq )->get_connectivity_array();
109 if( !array )
return MB_FAILURE;
117 const unsigned* flags,
140 const int number_elements,
141 const int number_vertices_per_element,
151 for(
int i = 0; i < number_elements; i++ )
155 j += number_vertices_per_element;
171 if(
MB_SUCCESS != tmp_result ) result = tmp_result;
184 related_ents.
merge( tmp_ents );
189 related_ents.
merge( partition );
192 Range tmp_ents3, last_related;
198 while( related_ents.
size() != last_related.
size() )
200 last_related = related_ents;
203 if( related_ents.
find( *rit ) != related_ents.
end() )
continue;
210 if( !tmp_ents2.
empty() ) related_ents.
insert( *rit );
215 last_related.
clear();
216 while( related_ents.
size() != last_related.
size() )
218 last_related = related_ents;
219 std::pair< Range::const_iterator, Range::const_iterator > it_pair = last_related.
equal_range(
MBENTITYSET );
226 related_ents.
merge( tmp_ents );
231 last_related.
clear();
232 while( related_ents.
size() != last_related.
size() )
234 last_related = related_ents;
235 std::pair< Range::const_iterator, Range::const_iterator > it_pair = last_related.
equal_range(
MBENTITYSET );
242 related_ents.
merge( tmp_ents );
260 std::vector< EntityHandle > tmp_connect;
263 int numv = 0, num_connect = 0;
272 std::fill( bound_verts, bound_verts + nverts, 0 );
273 for(
int index = 0; index < nindex; index++ )
275 result =
mMB->
get_connectivity( bound_ents[index], connect, num_connect,
false, &tmp_connect );
280 for(
int c = 0; c < num_connect; c++ )
282 if( !bound_verts[indices[c]] )
284 bound_verts[indices[c]] = ( sense[index] > 0 ) ? connect[c] : connect[num_connect - c - 1];
320 std::vector< int > data;
323 data.resize( i->second + 1 - i->first );
324 for( std::vector< int >::iterator j = data.begin(); j != data.end(); ++j )
327 tmp_range.
insert( i->first, i->second );
340 std::vector< int > data;
346 size_t size = next - i;
353 int id = start + ( i - ents );
355 for( std::vector< int >::iterator j = data.begin(); j != data.end(); ++j )
375 rval =
mMB->
tag_set_data( gather_set_tag, &gather_set, 1, &gather_val );
388 void* vals[] = { &gather_val };
395 gather_set = gather_sets[0];