refineable_t_junction.cc File Reference
#include "generic.h"
#include "young_laplace.h"
#include "meshes/rectangular_quadmesh.h"

Classes

class  RefineableYoungLaplaceProblem< ELEMENT >
 

Namespaces

 GlobalParameters
 Global parameters.
 

Functions

void GlobalParameters::spine_base_function (const Vector< double > &x, Vector< double > &spine_B, Vector< Vector< double > > &dspine_B)
 
void GlobalParameters::spine_function (const Vector< double > &x, Vector< double > &spine, Vector< Vector< double > > &dspine)
 
int main ()
 Drive code. More...
 

Function Documentation

◆ main()

int main ( )

Drive code.

544 {
545 
546  // Create label for output
547  DocInfo doc_info;
548 
549  // Trace file
550  ofstream trace_file;
551 
552  // Set output directory
553  doc_info.set_directory("RESLT");
554 
555  // Open a trace file
556  char filename[100];
557  sprintf(filename,"%s/trace.dat",doc_info.directory().c_str());
558  trace_file.open(filename);
559 
560  // Tecplot header for trace file: kappa and height value
561  trace_file << "VARIABLES=\"<GREEK>k</GREEK>\",\"h\"" << std::endl;
562  trace_file << "ZONE" << std::endl;
563 
564 
565  //Set up the problem
566  //------------------
567 
568  // Create the problem with 2D nine-node elements from the
569  // RefineableQYoungLaplaceElement family.
571 
572  // Perform one uniform refinement
573  problem.refine_uniformly();
574 
575  //Output the solution
576  problem.doc_solution(doc_info,trace_file);
577 
578  //Increment counter for solutions
579  doc_info.number()++;
580 
581  // Parameter incrementation
582  //-------------------------
583  double increment=0.1;
584 
585  // Loop over steps
586  unsigned nstep=2; // 10;
587  for (unsigned istep=0;istep<nstep;istep++)
588  {
590 
591  // Solve the problem
592  unsigned max_adapt=1;
593  problem.newton_solve(max_adapt);
594 
595  //Output the solution
596  problem.doc_solution(doc_info,trace_file);
597 
598  //Increment counter for solutions
599  doc_info.number()++;
600  }
601 
602  // Close output file
603  trace_file.close();
604 
605 } //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
double Controlled_height
Height control value.
Definition: barrel.cc:51
string filename
Definition: MergeRestartFiles.py:39
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References GlobalParameters::Controlled_height, oomph::DocInfo::directory(), MergeRestartFiles::filename, oomph::DocInfo::number(), problem, and oomph::DocInfo::set_directory().