oscillating_sphere.cc File Reference
#include <complex>
#include <cmath>
#include "generic.h"
#include "pml_fourier_decomposed_helmholtz.h"
#include "meshes/triangle_mesh.h"
#include "oomph_crbond_bessel.h"

Classes

class  oomph::PMLHelmholtzPointSourceElement< ELEMENT >
 Class to impose point source to (wrapped) Helmholtz element. More...
 
class  oomph::FaceGeometry< PMLHelmholtzPointSourceElement< ELEMENT > >
 
class  oomph::FaceGeometry< FaceGeometry< PMLHelmholtzPointSourceElement< ELEMENT > > >
 
class  oomph::PMLLayerElement< PMLHelmholtzPointSourceElement< ELEMENT > >
 
class  oomph::PMLLayerElement< ProjectablePMLFourierDecomposedHelmholtzElement< PMLHelmholtzPointSourceElement< ELEMENT > > >
 
class  PMLFourierDecomposedHelmholtzProblem< ELEMENT >
 Problem class. More...
 

Namespaces

 ProblemParameters
 Namespace for exact solution and problem parameters.
 
 oomph
 DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
 

Functions

std::complex< doubleProblemParameters::I (0.0, 1.0)
 Imaginary unit. More...
 
void ProblemParameters::get_exact_u (const Vector< double > &x, Vector< double > &u)
 Exact solution as a Vector of size 2, containing real and imag parts. More...
 
void ProblemParameters::exact_minus_dudr (const Vector< double > &x, std::complex< double > &flux)
 
std::complex< doubleProblemParameters::Magnitude (100.0, 100.0)
 Point source magnitude (Complex) More...
 
int main (int argc, char **argv)
 Driver code for Pml Fourier decomposed Helmholtz problem. More...
 

Variables

string ProblemParameters::Directory ="RESLT"
 Output directory. More...
 
double ProblemParameters::PML_thickness =4.0
 Default physical PML thickness. More...
 
unsigned ProblemParameters::Nel_pml =15
 Default number of elements within PMLs. More...
 
double ProblemParameters::R_source = 2.0
 Radial position of point source. More...
 
double ProblemParameters::Z_source = 2.0
 Axial position of point source. More...
 
Vector< doubleProblemParameters::Coeff (N_terms, 1.0)
 Coefficients in the exact solution. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Driver code for Pml Fourier decomposed Helmholtz problem.

1185 {
1186  // Store command line arguments
1187  CommandLineArgs::setup(argc,argv);
1188 
1189  // Define possible command line arguments and parse the ones that
1190  // were actually specified
1191 
1192  // Fourier wavenumber
1193  CommandLineArgs::specify_command_line_flag("--Fourier_wavenumber",
1195 
1196  // Output directory
1199 
1200  // PML thickness
1203 
1204  // Number of elements within PMLs
1207 
1208  // Target Element size on first mesh generation
1211  // k squared (wavenumber squared)
1214 
1215  // Validation run?
1217 
1218 
1219  // Demonstrate across a range of omega (or k) values with good mesh for a
1220  // visual test of accuracy (put in by Jonathan Deakin)
1222 
1223  // Parse command line
1225 
1226  // Doc what has actually been specified on the command line
1228 
1229 
1230  // Create label for output
1231  DocInfo doc_info;
1232 
1233  // Set output directory
1235 
1236 #ifdef ADAPTIVE
1237 
1238  // Create the problem with 2D projectable six-node elements from the
1239  // TPMLFourierDecomposedHelmholtzElement family,
1240  // allowing for the imposition of a point source (via another
1241  // templated wrapper)
1246 
1247 #else
1248 
1249  // Create the problem with 2D six-node elements from the
1250  // TPMLFourierDecomposedHelmholtzElement family.
1253  problem;
1254 
1255 #endif
1256 
1257  // Step number
1259 
1260 #ifdef ADAPTIVE
1261 
1262  // Max. number of adaptations
1263  unsigned max_adapt=4;
1264 
1265  // Validation run?
1267  {
1268  max_adapt=1;
1269  }
1270 
1271  // Solve the problem, allowing
1272  // up to max_adapt mesh adaptations after every solve.
1273  problem.newton_solve(max_adapt);
1274 
1275 #else
1276 
1277 
1278 // Solve the problem with Newton's method
1279 problem.newton_solve();
1280 
1281 
1282 
1283 #endif
1284 
1285  //Output the solution
1286  problem.doc_solution(doc_info);
1287 
1288 
1289 } //end of main
Problem class.
Definition: oscillating_sphere.cc:430
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
Class to impose point source to (wrapped) Helmholtz element.
Definition: oscillating_sphere.cc:230
Fourier decomposed Helmholtz upgraded to become projectable.
Definition: pml_fourier_decomposed_helmholtz_elements.h:902
Definition: Tpml_fourier_decomposed_helmholtz_elements.h:65
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
string Directory
Output directory.
Definition: oscillating_sphere.cc:59
double K_squared
Square of the wavenumber.
Definition: sphere_scattering.cc:225
int N_fourier
Fourier wave number.
Definition: sphere_scattering.cc:228
double Element_area
Target area for initial mesh.
Definition: unstructured_two_d_curved.cc:474
double PML_thickness
Default physical PML thickness.
Definition: oscillating_sphere.cc:65
unsigned Nel_pml
Default number of elements within PMLs.
Definition: oscillating_sphere.cc:68
bool command_line_flag_has_been_set(const std::string &flag)
Definition: oomph_utilities.cc:501
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 oomph::CommandLineArgs::command_line_flag_has_been_set(), ProblemParameters::Directory, oomph::CommandLineArgs::doc_specified_flags(), ProblemParameters::Element_area, ProblemParameters::K_squared, ProblemParameters::N_fourier, ProblemParameters::Nel_pml, oomph::DocInfo::number(), oomph::CommandLineArgs::parse_and_assign(), ProblemParameters::PML_thickness, problem, oomph::DocInfo::set_directory(), oomph::CommandLineArgs::setup(), and oomph::CommandLineArgs::specify_command_line_flag().