Driver for RefineableDrivenCavity test problem.
383 MPI_Helpers::init(argc,argv);
390 std::ofstream output_stream;
392 sprintf(
filename,
"OUTPUT.%i",MPI_Helpers::communicator_pt()->my_rank());
395 OomphLibWarning::set_stream_pt(&output_stream);
396 OomphLibError::set_stream_pt(&output_stream);
414 bool report_stats=
true;
420 problem.distribute(report_stats);
425 unsigned n_element=
problem.mesh_pt()->nelement();
428 for (
unsigned e=0;
e<n_element;
e++)
430 unsigned target_part=0;
431 if ( (
e<
unsigned(0.25*
double(n_element))) ||
432 ( (
e>
unsigned(0.5*
double(n_element))) &&
433 (
e<
unsigned(0.75*
double(n_element))) ) )
437 element_partition[
e]=target_part;
439 problem.distribute(element_partition,report_stats);
442 problem.set_default_partition_in_load_balance();
446 problem.doc_solution(
"Initial mesh");
452 problem.doc_solution(
"First adapted solution");
455 problem.prune_halo_elements_and_nodes(report_stats);
458 problem.doc_solution(
"After first prune");
464 problem.doc_solution(
"Second adapted solution after pruning");
467 problem.load_balance(report_stats);
470 problem.doc_solution(
"After load balancing");
473 problem.prune_halo_elements_and_nodes(report_stats);
476 problem.doc_solution(
"After second pruning");
482 problem.doc_solution(
"Third adapted solution after pruning");
488 problem.doc_solution(
"After uniform refinement");
491 problem.prune_halo_elements_and_nodes(report_stats);
494 problem.doc_solution(
"After third pruning");
500 problem.doc_solution(
"Fourth adapted solution after pruning");
503 problem.load_balance(report_stats);
506 problem.doc_solution(
"After load balancing");
512 problem.doc_solution(
"Fifth adapted solution after load balancing");
515 std::cout <<
"done\n";
519 MPI_Helpers::finalize();
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Definition: demo_drivers/mpi/distribution/adaptive_driven_cavity/adaptive_driven_cavity.cc:59
std::ostream *& stream_pt()
Access function for the stream pointer.
Definition: oomph_definitions.h:464
OutputModifier *& output_modifier_pt()
Access function for the output modifier pointer.
Definition: oomph_definitions.h:476
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
string filename
Definition: MergeRestartFiles.py:39
bool command_line_flag_has_been_set(const std::string &flag)
Definition: oomph_utilities.cc:501
void specify_command_line_flag(const std::string &command_line_flag, const std::string &doc)
Specify possible argument-free command line flag.
Definition: oomph_utilities.cc:451
void parse_and_assign(int argc, char *argv[], const bool &throw_on_unrecognised_args)
Definition: oomph_utilities.cc:760
void doc_specified_flags()
Document specified command line flags.
Definition: oomph_utilities.cc:610
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
OutputModifier default_output_modifier
Single global instatiation of the default output modifier.
Definition: oomph_definitions.cc:325
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213