mesh_from_triangle_navier_stokes.cc File Reference
#include "generic.h"
#include "navier_stokes.h"
#include "meshes/triangle_mesh.h"

Classes

class  FlowPastBoxProblem< ELEMENT >
 Flow past a box in a channel. More...
 

Namespaces

 Global_Physical_Variables
 Global variables.
 

Functions

int main (int argc, char *argv[])
 Driver for FlowPastBox test problem. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver for FlowPastBox test problem.

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////

340 {
341 
342 // Store command line arguments
343  CommandLineArgs::setup(argc,argv);
344 
345 
346  // Check number of command line arguments: Need exactly two.
347  if (argc!=4)
348  {
349  std::string error_message =
350  "Wrong number of command line arguments.\n";
351  error_message +=
352  "Must specify the following file names \n";
353  error_message +=
354  "filename.node then filename.ele then filename.poly\n";
355 
356  throw OomphLibError(error_message,
359  }
360 
361 
362  // Convert arguments to strings that specify the input file names
363  string node_file_name(argv[1]);
364  string element_file_name(argv[2]);
365  string poly_file_name(argv[3]);
366 
367 
368  // Set up doc info
369  // ---------------
370 
371  // Label for output
372  DocInfo doc_info;
373 
374  // Set output directory
375  doc_info.set_directory("RESLT");
376 
377  // Step number
378  doc_info.number()=0;
379 
380 #ifdef ADAPT
381  const unsigned max_adapt = 3;
382 #endif
383 
384 // Doing TTaylorHoodElements
385  {
386 #ifdef ADAPT
387  // Build the problem with TTaylorHoodElements
389  problem(node_file_name, element_file_name, poly_file_name);
390 #else
391  // Build the problem with TTaylorHoodElements
393  problem(node_file_name, element_file_name, poly_file_name);
394 #endif
395  // Output boundaries
396  problem.mesh_pt()->output_boundaries("RESLT/boundaries.dat");
397 
398  // Outpt the solution
399  problem.doc_solution(doc_info);
400 
401  // Step number
402  doc_info.number()++;
403 
404 #ifdef ADAPT
405  // Solve the problem
406  problem.newton_solve(max_adapt);
407 #else
408  // Solve the problem
409  problem.newton_solve();
410 #endif
411 
412  // Outpt the solution
413  problem.doc_solution(doc_info);
414 
415  // Step number
416  doc_info.number()++;
417 
418  } // end of QTaylorHoodElements
419 
420 
421 } // end_of_main
Flow past a box in a channel.
Definition: mesh_from_triangle_navier_stokes.cc:63
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
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

References oomph::DocInfo::number(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, problem, oomph::DocInfo::set_directory(), Flag_definition::setup(), and oomph::Global_string_for_annotation::string().