locate_zeta_tester_tetgen.cc File Reference
#include "generic.h"
#include "poisson.h"
#include "meshes/tetgen_mesh.h"
#include "locate_zeta_tester.h"

Classes

class  PoissonProblem< ELEMENT >
 Micky mouse Poisson problem. 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_exact_u (const Vector< double > &x, double &u)
 Exact solution as a scalar. More...
 
void TanhSolnForPoisson::get_source (const Vector< double > &x, double &source)
 Source function to make it an exact solution. More...
 
int main (int argc, char *argv[])
 Demonstrate how to solve Poisson problem. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Demonstrate how to solve Poisson problem.

434 {
435 
436 // Store command line arguments
437  CommandLineArgs::setup(argc,argv);
438 
439  // Check number of command line arguments: Need exactly three.
440  if (argc!=4)
441  {
442  std::string error_message =
443  "Wrong number of command line arguments.\n";
444  error_message +=
445  "Must specify the following file names \n";
446  error_message +=
447  "filename.node then filename.ele then filename.face\n";
448 
449  throw OomphLibError(error_message,
452  }
453 
454  // Convert arguments to strings that specify the input file names
455  string node_file_name(argv[1]);
456  string element_file_name(argv[2]);
457  string face_file_name(argv[3]);
458 
459 
460  // Label for output
461  DocInfo doc_info;
462 
463  // Output directory
464  doc_info.set_directory("RESLT");
465 
466  // Number of output points per edge
467  unsigned nplot=2;
468 
469  // Do the problem with quadratic elements
470  //---------------------------------------
471 
474  node_file_name,element_file_name,face_file_name);
475 
476  // Solve the problem
477  problem.newton_solve();
478 
479  //Output solution with 2 points per edge
480  nplot=2;
481  problem.doc_solution(nplot,doc_info);
482 
483  //Increment counter for solutions
484  doc_info.number()++;
485 
486  //Output solution with 5 points per edge
487  nplot=5;
488  problem.doc_solution(nplot,doc_info);
489 
490  //Increment counter for solutions
491  doc_info.number()++;
492 
493 
494  // Check it out!
495  check_locate_zeta(problem.mesh_pt());
496 
497 
498 }
Micky mouse Poisson problem.
Definition: HypreSolver_test.cc:81
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 check_locate_zeta(Mesh *mesh_pt)
Definition: locate_zeta_tester.h:28
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
void get_source(const Vector< double > &x, double &source)
Source function to make it an exact solution.
Definition: extrude_with_macro_element_representation.cc:224
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 check_locate_zeta(), TanhSolnForPoisson::get_source(), oomph::DocInfo::number(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, problem, oomph::DocInfo::set_directory(), Flag_definition::setup(), and oomph::Global_string_for_annotation::string().