Driver code for hp-adaptive solution to the 2D Poisson problem.
343 MPI_Helpers::init(argc,argv);
372 const unsigned n_element=
problem.mesh_pt()->nelement();
376 bool report_stats=
true;
377 out_element_partition=
problem.distribute(report_stats);
380 std::ofstream output_file;
382 sprintf(
filename,
"out_hp_adaptive_poisson_partition.dat");
384 for (
unsigned e=0;
e<n_element;
e++)
386 output_file << out_element_partition[
e] << std::endl;
390 problem.check_halo_schemes(doc_info);
403 std::ifstream input_file;
407 const unsigned n_element=
problem.mesh_pt()->nelement();
409 sprintf(
filename,
"hp_adaptive_poisson_partition.dat");
412 for (
unsigned e=0;
e<n_element;
e++)
414 getline(input_file,input_string,
'\n');
415 element_partition[
e]=atoi(input_string.c_str());
419 bool report_stats=
true;
420 problem.distribute(element_partition,mesh_doc_info,report_stats);
429 cout <<
"\n\n\nProblem self-test ";
432 cout <<
"passed: Problem can be solved." << std::endl;
448 for (
unsigned p=0;
p<0;
p++)
450 cout <<
"p-refining:" << endl;
453 for (
unsigned h=0; h<0; h++)
455 cout <<
"h-refining:" << endl;
463 problem.doc_solution(doc_info);
468 problem.doc_solution(doc_info);
473 problem.doc_solution(doc_info);
478 problem.doc_solution(doc_info);
483 problem.doc_solution(doc_info);
488 problem.doc_solution(doc_info);
493 problem.doc_solution(doc_info);
498 problem.doc_solution(doc_info);
503 problem.doc_solution(doc_info);
508 for (
unsigned n=0;
n<
problem.mesh_pt()->nnode();
n++)
510 if (
problem.mesh_pt()->node_pt(
n)->is_hanging()) hang_no++;
512 cout << hang_no <<
" hanging nodes in mesh." << endl;
516 problem.doc_solution(doc_info);
522 MPI_Helpers::finalize();
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: mpi/distribution/hp_adaptive_poisson/two_d_poisson_hp_adapt.cc:127
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
Definition: oomph_definitions.h:222
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
double TanPhi
Parameter for angle Phi of "step".
Definition: HypreSolver_test.cc:51
void get_source(const Vector< double > &x, double &source)
Source function to make it an exact solution.
Definition: extrude_with_macro_element_representation.cc:224
double Alpha
Parameter for steepness of step.
Definition: extrude_with_macro_element_representation.cc:185
int Argc
Number of arguments + 1.
Definition: oomph_utilities.cc:407
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213