helmholtz_point_source.cc File Reference
#include <fenv.h>
#include "math.h"
#include <complex>
#include "generic.h"
#include "helmholtz.h"
#include "meshes/triangle_mesh.h"
#include "oomph_crbond_bessel.h"

Classes

class  oomph::HelmholtzPointSourceElement< ELEMENT >
 Class to impose point source to (wrapped) Helmholtz element. More...
 
class  oomph::FaceGeometry< HelmholtzPointSourceElement< ELEMENT > >
 
class  oomph::FaceGeometry< FaceGeometry< HelmholtzPointSourceElement< ELEMENT > > >
 
class  HelmholtzPointSourceProblem< ELEMENT >
 Problem class. More...
 

Namespaces

 GlobalParameters
 Global parameters.
 
 oomph
 DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
 

Functions

int main (int argc, char **argv)
 

Variables

double GlobalParameters::K_squared =10.0
 Square of the wavenumber. More...
 
bool GlobalParameters::DtN_BC =false
 
unsigned GlobalParameters::ABC_order =3
 Flag to choose wich order to use. More...
 
double GlobalParameters::Outer_radius =1.5
 Radius of outer boundary (must be a circle!) More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Solve 2D Helmholtz problem for scattering of a planar wave from a unit disk

708 {
709 
710  // Store command line arguments
711  CommandLineArgs::setup(argc,argv);
712 
713  // Define case to be run
714  unsigned i_case=0;
716 
717  // Parse command line
719 
720  // Doc what has actually been specified on the command line
722 
723  // Now set flags accordingly
724  switch(i_case)
725  {
726  case 0:
728  break;
729 
730  case 1:
733  break;
734 
735  case 2:
738  break;
739 
740  case 3:
743  break;
744  }
745 
746 
747  //Set up the problem
748  //------------------
749 
750 #ifdef ADAPTIVE
751 
752  //Set up the problem with 2D nine-node elements from the
753  //QHelmholtzElement family.
757  problem;
758 
759 #else
760 
761  // Set up the problem with 2D six-node elements from the
762  // THelmholtzElement family.
765 
766 
767 #endif
768 
769  // Create label for output
770  //------------------------
771  DocInfo doc_info;
772 
773  // Set output directory
774  doc_info.set_directory("RESLT");
775 
776 
777 #ifdef ADAPTIVE
778 
779  // Max. number of adaptations
780  unsigned max_adapt=5;
781 
782  // Solve the problem with Newton's method, allowing
783  // up to max_adapt mesh adaptations after every solve.
784  problem.newton_solve(max_adapt);
785 
786 #else
787 
788  // Solve the problem with Newton's method
789  problem.newton_solve();
790 
791 #endif
792 
793  //Output solution
794  problem.doc_solution(doc_info);
795 
796 } //end of main
Problem class.
Definition: helmholtz_point_source.cc:247
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
Class to impose point source to (wrapped) Helmholtz element.
Definition: helmholtz_point_source.cc:90
Helmholtz upgraded to become projectable.
Definition: helmholtz_elements.h:687
Definition: Thelmholtz_elements.h:62
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
unsigned ABC_order
Flag to choose wich order to use.
Definition: helmholtz_point_source.cc:68
bool DtN_BC
Definition: helmholtz_point_source.cc:64
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 GlobalParameters::ABC_order, oomph::CommandLineArgs::doc_specified_flags(), GlobalParameters::DtN_BC, oomph::CommandLineArgs::parse_and_assign(), problem, oomph::DocInfo::set_directory(), oomph::CommandLineArgs::setup(), and oomph::CommandLineArgs::specify_command_line_flag().