@@ -38,8 +38,8 @@ namespace cutcells::cell{
38
38
std::cout << i << " : " ;
39
39
for (int j=0 ;j<cut_cell._connectivity [i].size ();j++)
40
40
{
41
- std::cout << cut_cell._connectivity [i][j];
42
- if (j<cut_cell._connectivity [i].size ()-1 )
41
+ std::cout << cut_cell._connectivity [i][j];
42
+ if (j<cut_cell._connectivity [i].size ()-1 )
43
43
std::cout << " , " ;
44
44
}
45
45
if (i<cut_cell._connectivity .size ()-1 )
@@ -50,11 +50,20 @@ namespace cutcells::cell{
50
50
std::cout << " cell types=[" ;
51
51
for (int i=0 ;i<cut_cell._types .size ();i++)
52
52
{
53
- std::cout << i << " : " << cell_type_to_str (cut_cell._types [i]);
53
+ std::cout << i << " : " << cell_type_to_str (cut_cell._types [i]);
54
54
if (i<cut_cell._types .size ()-1 )
55
55
std::cout << " , " ;
56
56
}
57
57
std::cout << " ]" << std::endl;
58
+
59
+ std::cout << " local parent entity=[" ;
60
+ for (int i=0 ;i<cut_cell._vertex_parent_entity .size ();i++)
61
+ {
62
+ std::cout << i << " : " << cut_cell._vertex_parent_entity [i];
63
+ if (i<cut_cell._vertex_parent_entity .size ()-1 )
64
+ std::cout << " , " ;
65
+ }
66
+ std::cout << " ]" << std::endl;
58
67
}
59
68
60
69
template <std::floating_point T>
@@ -201,7 +210,6 @@ namespace cutcells::cell{
201
210
cutcells::cell::CutCell<T> tmp_cut_cell;
202
211
cutcells::cell::cut<T>(cell_type, sub_vertex_coordinates, gdim, sub_ls_values, cut_type_str, tmp_cut_cell, triangulate);
203
212
sub_cut_cells.push_back (tmp_cut_cell);
204
- sub_cut_cells[sub_cut_cell_id]._parent_cell_index .push_back (-1 );
205
213
sub_cut_cell_id++;
206
214
break ;
207
215
}
@@ -211,7 +219,6 @@ namespace cutcells::cell{
211
219
{
212
220
cutcells::cell::CutCell<T> tmp_cut_cell = cutcells::cell::create_cut_cell<T>(cell_type, sub_vertex_coordinates, gdim);
213
221
sub_cut_cells.push_back (tmp_cut_cell);
214
- sub_cut_cells[sub_cut_cell_id]._parent_cell_index .push_back (-1 );
215
222
sub_cut_cell_id++;
216
223
}
217
224
break ;
@@ -222,7 +229,6 @@ namespace cutcells::cell{
222
229
{
223
230
cutcells::cell::CutCell<T> tmp_cut_cell = cutcells::cell::create_cut_cell<T>(cell_type, sub_vertex_coordinates, gdim);
224
231
sub_cut_cells.push_back (tmp_cut_cell);
225
- sub_cut_cells[sub_cut_cell_id]._parent_cell_index .push_back (-1 );
226
232
sub_cut_cell_id++;
227
233
}
228
234
break ;
@@ -259,11 +265,6 @@ namespace cutcells::cell{
259
265
merged_cut_cell._gdim =gdim;
260
266
merged_cut_cell._tdim =tdim;
261
267
262
- for (std::size_t i=0 ;i<cut_cell_vec[0 ]._parent_cell_index .size ();i++)
263
- {
264
- merged_cut_cell._parent_cell_index .push_back (cut_cell_vec[0 ]._parent_cell_index [i]);
265
- }
266
-
267
268
// Count the total number of cells in vector
268
269
int num_cells =0 ;
269
270
for (auto & cut_cell : cut_cell_vec)
@@ -286,12 +287,11 @@ namespace cutcells::cell{
286
287
continue ;
287
288
}
288
289
// check that current cut_cell has same dimensions and parent
289
- if ((cut_cell._gdim !=gdim)||(cut_cell._tdim !=tdim)||(cut_cell. _parent_cell_index [ 0 ]!=merged_cut_cell. _parent_cell_index [ 0 ]) )
290
+ if ((cut_cell._gdim !=gdim)||(cut_cell._tdim !=tdim))
290
291
{
291
292
std::cout << " gdim: (" << gdim << " , " << cut_cell._gdim << " )" << std::endl;
292
293
std::cout << " tdim: (" << tdim << " , " << cut_cell._tdim << " )" << std::endl;
293
- std::cout << " parent_cell: (" << merged_cut_cell._parent_cell_index [0 ] << " , " << cut_cell._parent_cell_index [0 ] << " )" << std::endl;
294
- throw std::runtime_error (" Error in merging cutcells have differing dimensions or parent cell" );
294
+ throw std::runtime_error (" Error in merging cutcells have differing dimensions" );
295
295
}
296
296
297
297
int num_cut_cell_vertices = cut_cell._vertex_coords .size ()/gdim;
@@ -374,7 +374,6 @@ namespace cutcells::cell{
374
374
template <std::floating_point T>
375
375
void recursive_cut (cutcells::cell::CutCell<T> &cut_cell,
376
376
std::span<const T> ls_vals_all,
377
- const int & parent_cell_index,
378
377
const std::string& cut_type_str,
379
378
bool triangulate)
380
379
{
@@ -414,7 +413,6 @@ namespace cutcells::cell{
414
413
if (cell_domain == cutcells::cell::domain::intersected)
415
414
{
416
415
cutcells::cell::cut<T>(cut_cell_type, vertex_coords, gdim, ls_vals, cut_type_str, cut_cells[cut_cell_id], triangulate);
417
- cut_cells[cut_cell_id]._parent_cell_index .push_back (parent_cell_index);
418
416
cut_cell_id++;
419
417
}
420
418
// cell is completely inside
@@ -424,7 +422,6 @@ namespace cutcells::cell{
424
422
if ((cut_type_str==" phi<0" ))
425
423
{
426
424
cut_cells[cut_cell_id] = create_cut_cell<T>(cut_cell_type, vertex_coords, gdim);
427
- cut_cells[cut_cell_id]._parent_cell_index .push_back (parent_cell_index);
428
425
cut_cell_id++;
429
426
}
430
427
else
@@ -439,7 +436,6 @@ namespace cutcells::cell{
439
436
if ((cut_type_str==" phi>0" ))
440
437
{
441
438
cut_cells[cut_cell_id] = create_cut_cell<T>(cut_cell_type, vertex_coords, gdim);
442
- cut_cells[cut_cell_id]._parent_cell_index .push_back (parent_cell_index);
443
439
cut_cell_id++;
444
440
}
445
441
else
@@ -490,12 +486,10 @@ namespace cutcells::cell{
490
486
491
487
template void recursive_cut (cutcells::cell::CutCell<double > &cut_cell,
492
488
std::span<const double > ls_vals_all,
493
- const int & parent_cell_index,
494
489
const std::string& cut_type_str,
495
490
bool triangulate);
496
491
template void recursive_cut (cutcells::cell::CutCell<float > &cut_cell,
497
492
std::span<const float > ls_vals_all,
498
- const int & parent_cell_index,
499
493
const std::string& cut_type_str,
500
494
bool triangulate);
501
495
// -----------------------------------------------------------------------------
0 commit comments