two_d_linear_wave.cc File Reference
#include "generic.h"
#include "linear_wave.h"
#include "meshes/rectangular_quadmesh.h"

Classes

class  LinearWaveProblem< ELEMENT, TIMESTEPPER >
 LinearWave problem in rectanglular domain. More...
 

Namespaces

 TanhSolnForLinearWave
 

Functions

double TanhSolnForLinearWave::exact_u (const double &time, const Vector< double > &x)
 Exact solution. More...
 
double TanhSolnForLinearWave::exact_dudt (const double &time, const Vector< double > &x)
 1st time-deriv of exact solution More...
 
double TanhSolnForLinearWave::exact_d2udt2 (const double &time, const Vector< double > &x)
 2nd time-deriv of exact solution More...
 
void TanhSolnForLinearWave::get_exact_u (const double &time, const Vector< double > &x, Vector< double > &u)
 Exact solution as a vector. More...
 
void TanhSolnForLinearWave::get_source (const double &time, 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 LinearWave problem. More...
 

Variables

double TanhSolnForLinearWave::Alpha
 Parameter for steepness of step. More...
 
double TanhSolnForLinearWave::Phi
 Orientation of step wave. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Demonstrate how to solve LinearWave problem.

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

554 {
555 
556  // Store command line arguments: If a command line argument is specied
557  // we regard this as validation run.
558  CommandLineArgs::setup(argc,argv);
559 
560  // Number of elements in x direction
561  unsigned n_x=10;
562 
563  // Number of elements in y direction
564  unsigned n_y=20;
565 
566  // Impulsive start?
567  bool impulsive_start;
568 
569  // Run with impulsive start
570  // ------------------------
571  {
572  impulsive_start=true;
573 
574  // Build problem
576  problem(n_x,n_y,impulsive_start,&TanhSolnForLinearWave::get_source);
577 
578  // Run it
579  problem.unsteady_run();
580  }
581 
582  // Run with "smooth" start
583  // -----------------------
584  {
585  impulsive_start=false;
586 
587  // Build problem
589  problem(n_x,n_y,impulsive_start,&TanhSolnForLinearWave::get_source);
590 
591  // Run it
592  problem.unsteady_run();
593  }
594 
595 
596 }; // end of main
LinearWave problem in rectanglular domain.
Definition: two_d_linear_wave.cc:109
Definition: timesteppers.h:912
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 double &time, const Vector< double > &x, double &source)
Source function to make it an exact solution.
Definition: two_d_linear_wave.cc:91
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References TanhSolnForLinearWave::get_source(), problem, and Flag_definition::setup().