scattering.cc File Reference
#include <fenv.h>
#include "math.h"
#include <complex>
#include "generic.h"
#include "helmholtz.h"
#include "meshes/annular_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)
 

Variables

unsigned GlobalParameters::N_fourier =10
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

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

710 {
711 
712  // Store command line arguments
713  CommandLineArgs::setup(argc,argv);
714 
715  // Define case to be run
716  unsigned i_case=0;
718 
719  // Parse command line
721 
722  // Doc what has actually been specified on the command line
724 
725  // Now set flags accordingly
726  switch(i_case)
727  {
728  case 0:
730  break;
731 
732  case 1:
735  break;
736 
737  case 2:
740  break;
741 
742  case 3:
745  break;
746  }
747 
748 
749  //Set up the problem
750  //------------------
751 
752 #ifdef ADAPTIVE
753 
754  //Set up the problem with 2D nine-node elements from the
755  //QHelmholtzElement family.
757  problem;
758 
759 #else
760 
761  //Set up the problem with 2D nine-node elements from the
762  //QHelmholtzElement family.
764  problem;
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=1;
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 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().