@@ -127,6 +127,10 @@ SET_SPATIAL_DOMAIN(initialize_grid_with_rabbit_mesh) {
127
127
return num_loaded > 0 ;
128
128
}
129
129
130
+ /**
131
+ * Sets the current domain as a domain described in the N-version benchmark
132
+ * (http://rsta.royalsocietypublishing.org/content/369/1954/4331)
133
+ */
130
134
SET_SPATIAL_DOMAIN (initialize_grid_with_benchmark_mesh ) {
131
135
132
136
real_cpu side_length ;
@@ -137,6 +141,15 @@ SET_SPATIAL_DOMAIN(initialize_grid_with_benchmark_mesh) {
137
141
real_cpu max_h = start_h ;
138
142
GET_PARAMETER_NUMERIC_VALUE_OR_USE_DEFAULT (real_cpu , max_h , config , "maximum_discretization" );
139
143
144
+ real_cpu side_length_x = 20000.0 ;
145
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , side_length_x , config , "side_length_x" );
146
+
147
+ real_cpu side_length_y = 7000.0 ;
148
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , side_length_y , config , "side_length_y" );
149
+
150
+ real_cpu side_length_z = 3000.0 ;
151
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , side_length_z , config , "side_length_z" );
152
+
140
153
log_info ("Loading N-Version benchmark mesh using dx %lf um, dy %lf um, dz %lf um\n" , start_h , start_h , start_h );
141
154
142
155
side_length = start_h ;
@@ -150,7 +163,7 @@ SET_SPATIAL_DOMAIN(initialize_grid_with_benchmark_mesh) {
150
163
int num_steps = get_num_refinement_steps_to_discretization (side_length , start_h );
151
164
152
165
refine_grid (the_grid , num_steps );
153
- set_benchmark_domain (the_grid );
166
+ set_benchmark_domain (the_grid , side_length_x , side_length_y , side_length_z );
154
167
155
168
log_info ("Cleaning grid\n" );
156
169
int i ;
@@ -401,5 +414,52 @@ SET_SPATIAL_DOMAIN(initialize_grid_with_square_mesh_and_source_sink_fibrotic_reg
401
414
402
415
set_plain_fibrosis_source_sink_region (the_grid , phi , seed , min_x , max_x , min_y , max_y , min_z , max_z , source_sink_min_x , source_sink_max_x , side_length );
403
416
417
+ return 1 ;
418
+ }
419
+
420
+ SET_SPATIAL_DOMAIN (initialize_grid_with_cuboid_and_sphere_fibrotic_mesh_with_conic_path ){
421
+ real_cpu side_length_x = 0.0 ;
422
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , side_length_x , config , "side_length_x" );
423
+
424
+ real_cpu side_length_y = 0.0 ;
425
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , side_length_y , config , "side_length_y" );
426
+
427
+ real_cpu side_length_z = 0.0 ;
428
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , side_length_z , config , "side_length_z" );
429
+
430
+ real_cpu start_dx = 0.0 ;
431
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , start_dx , config , "start_dx" );
432
+
433
+ real_cpu start_dy = 0.0 ;
434
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , start_dy , config , "start_dy" );
435
+
436
+ real_cpu start_dz = 0.0 ;
437
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , start_dz , config , "start_dz" );
438
+
439
+ real_cpu phi = 0.0 ;
440
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , phi , config , "phi" );
441
+
442
+ real_cpu plain_center = 0.0 ;
443
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , plain_center , config , "plain_center" );
444
+
445
+ real_cpu sphere_radius = 0.0 ;
446
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , sphere_radius , config , "sphere_radius" );
447
+
448
+ real_cpu border_zone_size = 0.0 ;
449
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , border_zone_size , config , "border_zone_size" );
450
+
451
+ real_cpu border_zone_radius = 0.0 ;
452
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , border_zone_radius , config , "border_zone_radius" );
453
+
454
+ real_cpu conic_slope = 0.0 ;
455
+ GET_PARAMETER_NUMERIC_VALUE_OR_REPORT_ERROR (real_cpu , conic_slope , config , "conic_slope" );
456
+
457
+ unsigned seed = 0 ;
458
+ GET_PARAMETER_NUMERIC_VALUE_OR_USE_DEFAULT (unsigned , seed , config , "seed" );
459
+
460
+ //set_square_mesh(config, the_grid);
461
+ set_cuboid_domain_mesh (the_grid , start_dx , start_dy , start_dz , side_length_x , side_length_y , side_length_z );
462
+ set_cuboid_sphere_fibrosis_with_conic_path (the_grid , phi , plain_center , sphere_radius , border_zone_size , border_zone_radius , seed , conic_slope );
463
+
404
464
return 1 ;
405
465
}
0 commit comments