mesh_from_geompack_poisson.cc File Reference
#include "generic.h"
#include "poisson.h"
#include "meshes/geompack_mesh.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...
 

Variables

double TanhSolnForPoisson::Beta
 Parameter for angle of step. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Demonstrate how to solve Poisson problem.

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

Label for output

284 {
285 // Store command line arguments
286  CommandLineArgs::setup(argc,argv);
287 
288  // Check number of command line arguments: Need exactly two.
289  if (argc!=3)
290  {
291  std::string error_message =
292  "Wrong number of command line arguments.\n";
293  error_message +=
294  "Must specify the following file names \n";
295  error_message +=
296  "filename.mh2 then filename.cs2\n";
297 
298  throw OomphLibError(error_message,
301  }
302 
303  // Convert arguments to strings that specify the input file names
304  string mesh_file_name(argv[1]);
305  string curve_file_name(argv[2]);
306 
307  //Set up the problem
310  mesh_file_name,curve_file_name);
311 
313  DocInfo doc_info;
314 
315  // Output directory
316  doc_info.set_directory("RESLT");
317 
318  // Solve the problem
319  problem.newton_solve();
320 
321  //Output solution
322  problem.doc_solution(doc_info);
323 
324 }
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
Definition: oomph_definitions.h:222
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 TanhSolnForPoisson::get_source(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, problem, oomph::DocInfo::set_directory(), Flag_definition::setup(), and oomph::Global_string_for_annotation::string().