spherical_cap_in_cylinder.cc File Reference

Classes

class  RefineableYoungLaplaceProblem< ELEMENT >
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code for 2D RefineableYoungLaplace problem. Input arguments: none (for validation) or number of steps.

289 {
290 
291  // Store command line arguments
292  CommandLineArgs::setup(argc,argv);
293 
294  // No command line args: Running with limited number of steps
295  if (CommandLineArgs::Argc==1)
296  {
297  std::cout
298  << "Running with limited number of steps for validation"
299  << std::endl;
300 
301  // Number of steps
303  }
304  else
305  {
306  // Number of steps
307  GlobalParameters::Nsteps=atoi(argv[1]);
308  }
309  // Create label for output
310  //------------------------
311  DocInfo doc_info;
312 
313  // Set outputs
314  //------------
315 
316  // Trace file
317  ofstream trace_file;
318 
319 // Set output directory
320  doc_info.set_directory("RESLT_adapt_pinned_spherical_cap_in_cylinder");
321 
322 //Open a trace file
323  char filename[100];
324  sprintf(filename,"%s/trace.dat",doc_info.directory().c_str());
325  trace_file.open(filename);
326 
327  trace_file
328  << "VARIABLES=\"<GREEK>k</GREEK>\",\"<GREEK>k</GREEK>_{exact}\",\"h\""
329  << std::endl;
330  trace_file << "ZONE" << std::endl;
331 
332 
333  // Set case
335 
336  // Run with spines
338 
339 
340  //Set up the problem
341  //------------------
342 
343  // Create the problem with 2D nine-node elements from the
344  // RefineableQYoungLaplaceElement family.
346 
347  //Output the solution
348  problem.doc_solution(doc_info,trace_file);
349 
350  //Increment counter for solutions
351  doc_info.number()++;
352 
353  // Parameter incrementation
354  //-------------------------
355 
356  // Loop over steps
357  for (unsigned istep=0;istep<GlobalParameters::Nsteps;istep++)
358  {
359  // Solve the problem
360  unsigned max_adapt=1;
361  problem.newton_solve(max_adapt);
362 
363  //Output the solution
364  problem.doc_solution(doc_info,trace_file);
365 
366  //Increment counter for solutions
367  doc_info.number()++;
368 
369  // Increase the parameters
370  problem.increment_parameters();
371  }
372 
373  // Close output file
374  trace_file.close();
375 
376 
377 
378 
379 
380 
381 
382 } //end of main
Definition: refineable_t_junction.cc:139
Definition: oomph_utilities.h:499
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
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
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
bool Use_spines
Use spines (true) or not (false)
Definition: common_young_laplace_stuff.h:40
unsigned Nsteps
Number of steps.
Definition: common_young_laplace_stuff.h:79
@ Spherical_cap_in_cylinder_pinned
Definition: common_young_laplace_stuff.h:46
int Case
What case are we considering: Choose one from the enumeration Cases.
Definition: common_young_laplace_stuff.h:53
string filename
Definition: MergeRestartFiles.py:39
int Argc
Number of arguments + 1.
Definition: oomph_utilities.cc:407
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::CommandLineArgs::Argc, GlobalParameters::Case, oomph::DocInfo::directory(), MergeRestartFiles::filename, GlobalParameters::Nsteps, oomph::DocInfo::number(), problem, oomph::DocInfo::set_directory(), Flag_definition::setup(), GlobalParameters::Spherical_cap_in_cylinder_pinned, and GlobalParameters::Use_spines.