mesh_from_inline_triangle.cc File Reference
#include <fenv.h>
#include "generic.h"
#include "poisson.h"
#include "meshes/triangle_mesh.h"

Classes

class  UnstructuredPoissonProblem< ELEMENT >
 Class definition. More...
 

Namespaces

 TanhSolnForPoisson
 Namespace for exact solution for Poisson equation with "sharp step".
 

Functions

void TanhSolnForPoisson::get_exact_u (const Vector< double > &x, Vector< double > &u)
 Exact solution as a Vector. More...
 
void TanhSolnForPoisson::get_source (const Vector< double > &x, double &source)
 Source function to make it an exact solution. More...
 
void TanhSolnForPoisson::zero (const Vector< double > &x, Vector< double > &u)
 
int main (int argc, char **argv)
 Driver code for demo of inline triangle mesh generation. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Driver code for demo of inline triangle mesh generation.

596 {
597  // Store command line arguments
598  CommandLineArgs::setup(argc,argv);
599 
600  // Define possible command line arguments and parse the ones that
601  // were actually specified
602 
603  // Validation?
605 
606  // Parse command line
608 
609  // Doc what has actually been specified on the command line
611 
612  // Create problem
614  problem;
615 
616 // // Solve, adapt and doc manually
617 // unsigned nadapt=4;
618 // for (unsigned i=0;i<nadapt;i++)
619 // {
620 // problem.newton_solve();
621 // std::stringstream comment_stream;
622 // comment_stream << "Solution after " << i << " manual adaptations";
623 // problem.doc_solution(comment_stream.str());
624 // if (i!=(nadapt-1)) problem.adapt();
625 // }
626 
627 
628  // Doc the initial mesh
629  //=====================
630  std::stringstream comment_stream;
631  comment_stream << "Initial mesh ";
632  problem.doc_solution(comment_stream.str());
633 
634 
635  // Loop over orientation of step
636  //==============================
637  unsigned nstep=5;
639  {
640  nstep=2;
641  }
642  for (unsigned i=0;i<nstep;i++)
643  {
644  // Solve with spatial adaptation
645  //==============================
646  unsigned max_adapt=3;
648  {
649  max_adapt=1;
650  }
651  problem.newton_solve(max_adapt);
652 
653  // Doc the solution
654  //=================
655  std::stringstream comment_stream;
656  comment_stream << "Solution for tan(phi) = " << TanhSolnForPoisson::TanPhi;
657  problem.doc_solution(comment_stream.str());
658 
659  // Rotate orientation of solution
661  }
662 
663 } //End of main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Class definition.
Definition: mesh_from_inline_triangle.cc:91
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
double TanPhi
Parameter for angle Phi of "step".
Definition: HypreSolver_test.cc:51
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(), i, oomph::CommandLineArgs::parse_and_assign(), problem, Flag_definition::setup(), oomph::CommandLineArgs::specify_command_line_flag(), and TanhSolnForPoisson::TanPhi.