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

Classes

class  ScatteringProblem< ELEMENT >
 Problem class to compute scattering of planar wave from unit disk. More...
 

Namespaces

 GlobalParameters
 Global parameters.
 

Functions

std::complex< doubleGlobalParameters::I (0.0, 1.0)
 Imaginary unit. More...
 
void GlobalParameters::get_exact_u (const Vector< double > &x, Vector< double > &u)
 Exact solution as a Vector. More...
 
void GlobalParameters::prescribed_incoming_flux (const Vector< double > &x, complex< double > &flux)
 
int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

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

811 {
812  // Store command line arguments
813  CommandLineArgs::setup(argc,argv);
814 
815  // Define case to be run
816  unsigned i_case=0;
818 
819  // Parse command line
821 
822  // Doc what has actually been specified on the command line
824 
825  // Now set flags accordingly
826  switch(i_case)
827  {
828  case 0:
830  break;
831 
832  case 1:
835  break;
836 
837  case 2:
840  break;
841 
842  case 3:
845  break;
846  }
847 
848 
849  //Set up the problem
850  //------------------
851 
852 #ifdef ADAPTIVE
853 
854  //Set up the problem with 2D nine-node elements from the
855  //QHelmholtzElement family.
857  problem;
858 
859 #else
860 
861  // Set up the problem with 2D six-node elements from the
862  // THelmholtzElement family.
864 
865 
866 #endif
867 
868  // Create label for output
869  //------------------------
870  DocInfo doc_info;
871 
872  // Set output directory
873  doc_info.set_directory("RESLT");
874 
875 
876 #ifdef ADAPTIVE
877 
878  // Max. number of adaptations
879  unsigned max_adapt=1;
880 
881  // Solve the problem with Newton's method, allowing
882  // up to max_adapt mesh adaptations after every solve.
883  problem.newton_solve(max_adapt);
884 
885 #else
886 
887  // Solve the problem with Newton's method
888  problem.newton_solve();
889 
890 #endif
891 
892  //Output solution
893  problem.doc_solution(doc_info);
894 
895 } //end of main
Problem class to compute scattering of planar wave from unit disk.
Definition: scattering.cc:223
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
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().