mesh_from_xfig_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.

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

238 {
239 
240 // Store command line arguments
241  CommandLineArgs::setup(argc,argv);
242 
243 
244  // Check number of command line arguments: Need exactly two.
245  if (argc!=4)
246  {
247  std::string error_message =
248  "Wrong number of command line arguments.\n";
249  error_message +=
250  "Must specify the following file names \n";
251  error_message +=
252  "filename.node then filename.ele then filename.poly\n";
253 
254  throw OomphLibError(error_message,
257  }
258 
259 
260  // Convert arguments to strings that specify the input file names
261  string node_file_name(argv[1]);
262  string element_file_name(argv[2]);
263  string poly_file_name(argv[3]);
264 
265 
266  // Set up doc info
267  // ---------------
268 
269  // Label for output
270  DocInfo doc_info;
271 
272  // Set output directory
273  doc_info.set_directory("RESLT");
274 
275  // Step number
276  doc_info.number()=0;
277 
278 
279 // Doing QTaylorHoodElements
280  {
281  // Build the problem with TTaylorHoodElements
283  element_file_name,
284  poly_file_name);
285  // Output boundaries
286  problem.mesh_pt()->output_boundaries("RESLT/boundaries.dat");
287 
288  // Outpt the solution
289  problem.doc_solution(doc_info);
290 
291  // Step number
292  doc_info.number()++;
293 
294  // Solve the problem
295  problem.newton_solve();
296 
297  // Outpt the solution
298  problem.doc_solution(doc_info);
299 
300  // Step number
301  doc_info.number()++;
302 
303  } // end of QTaylorHoodElements
304 
305 
306 } // 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().