two_d_adv_diff_adapt.cc File Reference

Classes

class  RefineableAdvectionDiffusionProblem< ELEMENT >
 

Namespaces

 TanhSolnForAdvectionDiffusion
 

Functions

void TanhSolnForAdvectionDiffusion::get_exact_u (const Vector< double > &x, Vector< double > &u)
 Exact solution as a Vector. More...
 
void TanhSolnForAdvectionDiffusion::get_exact_u (const Vector< double > &x, double &u)
 Exact solution as a scalar. More...
 
void TanhSolnForAdvectionDiffusion::source_function (const Vector< double > &x_vect, double &source)
 Source function required to make the solution above an exact solution. More...
 
void TanhSolnForAdvectionDiffusion::wind_function (const Vector< double > &x, Vector< double > &wind)
 Wind. More...
 
int main ()
 Driver code for 2D AdvectionDiffusion problem. More...
 

Variables

double TanhSolnForAdvectionDiffusion::Peclet =200.0
 Peclet number. More...
 
double TanhSolnForAdvectionDiffusion::Alpha =10.0
 Parameter for steepness of step. More...
 
double TanhSolnForAdvectionDiffusion::TanPhi =1.0
 Parameter for angle of step. More...
 

Function Documentation

◆ main()

int main ( )

Driver code for 2D AdvectionDiffusion problem.

323 {
324 
325  //Set up the problem
326  //------------------
327 
328  // Create the problem with 2D nine-node refineable elements from the
329  // RefineableQuadAdvectionDiffusionElement family. Pass pointer to
330  // source and wind function.
334 
335  // Check if we're ready to go:
336  //----------------------------
337  cout << "\n\n\nProblem self-test ";
338  if (problem.self_test()==0)
339  {
340  cout << "passed: Problem can be solved." << std::endl;
341  }
342  else
343  {
344  throw OomphLibError("Self test failed",
347  }
348 
349  // Set the orientation of the "step" to 45 degrees
351 
352  // Choose a large value for the steepness of the "step"
354 
355  // Solve the problem, performing up to 4 adptive refinements
356  problem.newton_solve(4);
357 
358  //Output the solution
359  problem.doc_solution();
360 
361 } // end of main
Definition: two_d_adv_diff_adapt.cc:103
Definition: oomph_definitions.h:222
Definition: refineable_advection_diffusion_elements.h:355
double TanPhi
Parameter for angle of step.
Definition: two_d_adv_diff_adapt.cc:56
double Alpha
Parameter for steepness of step.
Definition: two_d_adv_diff_adapt.cc:53
void source_function(const Vector< double > &x_vect, double &source)
Source function required to make the solution above an exact solution.
Definition: two_d_adv_diff_adapt.cc:71
void wind_function(const Vector< double > &x, Vector< double > &wind)
Wind.
Definition: two_d_adv_diff_adapt.cc:84
#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 TanhSolnForAdvectionDiffusion::Alpha, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, problem, TanhSolnForAdvectionDiffusion::source_function(), TanhSolnForAdvectionDiffusion::TanPhi, and TanhSolnForAdvectionDiffusion::wind_function().