extrude_triangle_generated_mesh.cc File Reference

Classes

class  MovingBlockProblem< ELEMENT >
 Moving block problem. More...
 

Namespaces

 GlobalParameters
 Global parameters.
 

Functions

int main (int argc, char *argv[])
 

Variables

double GlobalParameters::Re =100.0
 Reynolds number. More...
 
double GlobalParameters::L_z =3.0
 Length of the mesh in the z-direction. More...
 
unsigned GlobalParameters::N_z =5
 Number of elements in the z-direction. More...
 
DocInfo GlobalParameters::Doc_info
 Helper for documenting. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// Driver for MovingBlock test problem – test drive with two different types of element.

370 {
371 #ifdef OOMPH_HAS_MPI
372  // Initialise MPI
373  MPI_Helpers::init(argc,argv);
374 
375  // Switch off output modifier
377 
378  // Switch off oomph_info output for all processors but rank 0
379  if (MPI_Helpers::communicator_pt()->my_rank()!=0)
380  {
382  OomphLibWarning::set_stream_pt(&oomph_nullstream);
383  OomphLibError::set_stream_pt(&oomph_nullstream);
384  }
385  else
386  {
387  oomph_info << "\n=====================================================\n"
388  << "Number of processors: "
389  << MPI_Helpers::communicator_pt()->nproc()
390  << "\n=====================================================\n"
391  << std::endl;
392  }
393 #endif
394 
395  // Record the start time
396  double start_t=TimingHelpers::timer();
397 
398  // Set output directory
400 
401  // Step number
403 
404  // Typedef the ELEMENT and MESH type
405  typedef RefineableQTaylorHoodElement<2> ELEMENT;
406 
407  // Build the problem with QCrouzeixRaviartElements
409 
410  // Tell the user
411  oomph_info << "Using RefineableQTaylorHoodElement<2>" << std::endl;
412 
413  // Solve the problem
414  problem.newton_solve();
415 
416  // Output the solution
417  problem.doc_solution();
418 
419  // Solve the problem
420  problem.adapt();
421 
422  // Solve the problem
423  problem.newton_solve();
424 
425  // Output the solution
426  problem.doc_solution();
427 
428  // Record the end time and compute the mesh setup time
429  oomph_info << "Simulation complete.\n\nTime taken for simulation [sec]: "
430  << TimingHelpers::timer()-start_t << std::endl;
431 
432 #ifdef OOMPH_HAS_MPI
433  // Initialise MPI
434  MPI_Helpers::finalize();
435 #endif
436 } // end_of_main
Moving block problem.
Definition: extrude_triangle_generated_mesh.cc:69
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
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
DocInfo Doc_info
Helper for documenting.
Definition: extrude_triangle_generated_mesh.cc:57
Nullstream oomph_nullstream
Single (global) instantiation of the Nullstream.
Definition: oomph_definitions.cc:313
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
double timer
Definition: oomph_metis_from_parmetis_3.1.1/struct.h:210
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::MPI_Helpers::communicator_pt(), oomph::default_output_modifier, GlobalParameters::Doc_info, oomph::MPI_Helpers::finalize(), oomph::MPI_Helpers::init(), oomph::OomphCommunicator::nproc(), oomph::DocInfo::number(), oomph::oomph_info, oomph::oomph_nullstream, oomph::OomphInfo::output_modifier_pt(), problem, oomph::DocInfo::set_directory(), oomph::OomphLibError::set_stream_pt(), oomph::OomphLibWarning::set_stream_pt(), oomph::OomphInfo::stream_pt(), and oomph::TimingHelpers::timer().