Driver code for 2D Poisson problem.
446 n_refine=atoi(argv[1]);
451 "Wrong number of input arguments. The options are: \n";
453 "No args: Default number of refinements\n";
455 "One arg: Required number of refinements\n";
467 for (
unsigned i=0;
i<2;
i++)
475 cout <<
"/////////////////////////////////////////////////////////"
477 cout <<
"Building problem with a coarse base mesh" << std::endl;
478 cout <<
"followed by uniform refinements." << std::endl;
479 cout <<
"/////////////////////////////////////////////////////////"
487 cout <<
"/////////////////////////////////////////////////////////"
489 cout <<
"Building problem with a fine base mesh" << std::endl;
490 cout <<
"/////////////////////////////////////////////////////////"
500 clock_t t_start = clock();
508 clock_t t_end = clock();
509 double total_time=
double(t_end-t_start)/CLOCKS_PER_SEC;
511 cout <<
"======================================================= " << std::endl;
512 cout <<
"Total time for Problem setup [sec]: " << total_time << std::endl;
513 cout <<
"======================================================= " << std::endl;
536 problem.set_problem_is_nonlinear();
539 for (
unsigned istep=0;istep<nstep;istep++)
543 clock_t t_start = clock();
545 if (
problem.is_problem_nonlinear())
547 cout << std::endl << std::endl;
548 cout <<
"============================ " << std::endl;
549 cout <<
"Solving as nonlinear problem " << std::endl;
550 cout <<
"============================ " << std::endl;
551 cout << std::endl << std::endl;
555 cout << std::endl << std::endl;
556 cout <<
"============================ " << std::endl;
557 cout <<
"Solving as linear problem " << std::endl;
558 cout <<
"============================ " << std::endl;
559 cout << std::endl << std::endl;
566 clock_t t_end = clock();
567 double total_time=
double(t_end-t_start)/CLOCKS_PER_SEC;
568 cout <<
"======================================================= "
570 cout <<
"Total time for Newton solve [sec]: " << total_time << std::endl;
571 cout <<
"======================================================= "
575 problem.doc_solution(doc_info);
581 problem.set_problem_is_linear();
586 cout << std::endl << std::endl;
587 cout <<
"Execution is paused while problem is in core" << std::endl;
588 pause(
"Have a look at the memory usage now");
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: optimisation/use_coarse_base_meshes/two_d_poisson_adapt.cc:149
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
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
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
void pause(std::string message)
Pause and display message.
Definition: oomph_utilities.cc:1265
#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