pretend_melt.cc File Reference
#include <fenv.h>
#include "generic.h"
#include "unsteady_heat.h"
#include "meshes/triangle_mesh.h"
#include "unsteady_heat_flux_pseudo_melt_elements.h"

Classes

class  UnsteadyHeatProblem< ELEMENT >
 UnsteadyHeat problem. More...
 

Namespaces

 ProblemParameters
 Namespace for exact solution and problem parameters.
 

Functions

void ProblemParameters::flux (const double &time, const Vector< double > &x, double &flux)
 Get flux applied along boundary x=0. More...
 
int main (int argc, char *argv[])
 Driver code for unsteady heat equation. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code for unsteady heat equation.

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

541 {
542 
543  // Store command line arguments
544  CommandLineArgs::setup(argc,argv);
545 
546  // Define possible command line arguments and parse the ones that
547  // were actually specified
548 
549  // Suppress adaptation
551 
552  // Melt everywhere?
553  CommandLineArgs::specify_command_line_flag("--melt_everywhere");
554 
555  // Suppress melting?
556  CommandLineArgs::specify_command_line_flag("--disable_melting");
557 
558  // Validation
560 
561  // Parse command line
563 
564  // Doc what has actually been specified on the command line
566 
567  // Build problem
570 
571  // Setup labels for output
572  DocInfo doc_info;
573 
574  // Output directory
575  doc_info.set_directory("RESLT");
576 
577  // Output number
578  doc_info.number()=0;
579 
580  // Choose simulation interval and timestep
581  double t_max=0.5;
582  double dt=0.01;
583 
584  // Initialise timestep -- also sets the weights for all timesteppers
585  // in the problem.
586  problem.initialise_dt(dt);
587 
588  // Set impulsive IC
589  problem.assign_initial_values_impulsive(dt);
590 
591  //Output initial condition
592  problem.doc_solution(doc_info);
593 
594  //Increment counter for solutions
595  doc_info.number()++;
596 
597  unsigned max_adapt=1;
598  bool first=false;
600  {
601  max_adapt=0;
602  }
603 
604  // Find number of steps
605  unsigned nstep = unsigned(t_max/dt);
606 
607  // Validation?
609  {
610  nstep=5;
611  }
612 
613  // Timestepping loop
614  for (unsigned istep=0;istep<nstep;istep++)
615  {
616  cout << " Timestep " << istep << std::endl;
617 
618  // Take timestep
619  problem.unsteady_newton_solve(dt,max_adapt,first);
620 
621  //Output solution
622  problem.doc_solution(doc_info);
623 
624  //Increment counter for solutions
625  doc_info.number()++;
626  }
627 
628 
629 }; // end of main
UnsteadyHeat problem.
Definition: pretend_melt.cc:80
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
UnsteadyHeat upgraded to become projectable.
Definition: unsteady_heat_elements.h:699
Definition: Tunsteady_heat_elements.h:62
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
bool command_line_flag_has_been_set(const std::string &flag)
Definition: oomph_utilities.cc:501
void specify_command_line_flag(const std::string &command_line_flag, const std::string &doc)
Specify possible argument-free command line flag.
Definition: oomph_utilities.cc:451
void parse_and_assign(int argc, char *argv[], const bool &throw_on_unrecognised_args)
Definition: oomph_utilities.cc:760
void doc_specified_flags()
Document specified command line flags.
Definition: oomph_utilities.cc:610
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::CommandLineArgs::command_line_flag_has_been_set(), oomph::CommandLineArgs::doc_specified_flags(), oomph::DocInfo::number(), oomph::CommandLineArgs::parse_and_assign(), problem, oomph::DocInfo::set_directory(), Flag_definition::setup(), and oomph::CommandLineArgs::specify_command_line_flag().