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

Classes

class  ElasticAnnulusProblem< ELASTICITY_ELEMENT >
 Annular disk. More...
 

Namespaces

 Global_Parameters
 Namespace for global parameters.
 

Macros

#define ADAPTIVE
 

Functions

void Global_Parameters::compute_dependent_parameters ()
 Function to compute dependent parameters. More...
 
void Global_Parameters::Hankel_first (const unsigned &n, const double &x, Vector< std::complex< double > > &h, Vector< std::complex< double > > &hp)
 
void Global_Parameters::exact_u (const Vector< double > &x, Vector< double > &u)
 Exact solution as a Vector: {u_x_real, u_y_real, u_x_imag, u_y_imag}. More...
 
int main (int argc, char **argv)
 Driver for annular disk loaded by pressure. More...
 

Variables

double Global_Parameters::Element_area = 0.01
 helper to set target mesh element size More...
 
double Global_Parameters::T_start = 0.0
 helpers to time the code More...
 
double Global_Parameters::T_end = 0.0
 
unsigned Global_Parameters::N_pml_multiplier = 1
 PML width in elements for the right layer. More...
 
double Global_Parameters::L_pml_multiplier = 1.0
 
unsigned Global_Parameters::N_x_right_pml = 8
 PML width in elements for the right layer. More...
 
unsigned Global_Parameters::N_y_top_pml = 8
 PML width in elements for the top layer. More...
 
unsigned Global_Parameters::N_x_left_pml = 8
 PML width in elements for the left layer. More...
 
unsigned Global_Parameters::N_y_bottom_pml = 8
 PML width in elements for the left layer. More...
 
double Global_Parameters::Width_x_right_pml = 2.0
 
double Global_Parameters::Width_y_top_pml = 2.0
 
double Global_Parameters::Width_x_left_pml = 2.0
 
double Global_Parameters::Width_y_bottom_pml = 2.0
 
double Global_Parameters::H_annulus =0.5
 Thickness of annulus. More...
 

Macro Definition Documentation

◆ ADAPTIVE

#define ADAPTIVE

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Driver for annular disk loaded by pressure.

Number of elements for each layer

Thickness of each layer

Target element size

Target element size

Update dependent parameters

842 {
843 
844  // Start timing of the code
846 
847  // Store command line arguments
848  CommandLineArgs::setup(argc,argv);
849 
850  // Define possible command line arguments and parse the ones that
851  // were actually specified
852 
853  // Over-write PML layers element number in each dimension
856 
857  // Over-write PML layers physical length in each dimension
860 
861  // Output directory
863  "--dir", &Global_Parameters::Directory);
864 
865 
866 #ifdef ADAPTIVE
867 
868  // Max. number of adaptations
869  unsigned max_adapt=0;
870  CommandLineArgs::specify_command_line_flag("--max_adapt",&max_adapt);
871 
872 #endif
873 
874  // Validation run?
876 
877  // Parse command line
879 
880  // Doc what has actually been specified on the command line
882 
883  // Validation run?
885  {
886  oomph_info << "Using coarser resolution for self-test\n";
887 
893 
899 
902 
905  }
906 
909 
910  DocInfo doc_info;
911 
912  // Set output directory
914 
915  // Build elasticity tensor
918 
919 
920 #ifdef ADAPTIVE
921 
922  //Set up the problem
926  > problem;
927 
928 #else
929 
930  //Set up the problem
932  problem;
933 
934 #endif
935 
936 
937 #ifdef ADAPTIVE
938 
939  // Solve the problem with Newton's method, allowing
940  // up to max_adapt mesh adaptations after every solve.
941  problem.newton_solve(max_adapt);
942 #else
943 
944  // Solve the problem using Newton's method
945  problem.newton_solve();
946 #endif
947 
948  // End timing of the code
950 
951  // Doc solution
952  problem.doc_solution(doc_info);
953 
954 } //end of main
Annular disk.
Definition: time_harmonic_elasticity_driver.cc:245
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
Definition: pml_time_harmonic_elasticity_tensor.h:150
Time-harmonic linear elasticity upgraded to become projectable.
Definition: pml_time_harmonic_linear_elasticity_elements.h:714
Definition: Tpml_time_harmonic_linear_elasticity_elements.h:67
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
double Width_x_right_pml
Definition: time_harmonic_elasticity_driver.cc:83
double Width_y_top_pml
Definition: time_harmonic_elasticity_driver.cc:84
double Nu
Define Poisson's ratio Nu.
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:46
double Width_x_left_pml
Definition: time_harmonic_elasticity_driver.cc:85
string Directory
Output directory.
Definition: acoustic_fsi.cc:101
unsigned N_x_right_pml
PML width in elements for the right layer.
Definition: time_harmonic_elasticity_driver.cc:69
double T_end
Definition: time_harmonic_elasticity_driver.cc:62
double T_start
helpers to time the code
Definition: time_harmonic_elasticity_driver.cc:61
double Width_y_bottom_pml
Definition: time_harmonic_elasticity_driver.cc:86
unsigned N_y_bottom_pml
PML width in elements for the left layer.
Definition: time_harmonic_elasticity_driver.cc:78
double L_pml_multiplier
Definition: time_harmonic_elasticity_driver.cc:66
unsigned N_pml_multiplier
PML width in elements for the right layer.
Definition: time_harmonic_elasticity_driver.cc:65
void compute_dependent_parameters()
Function to compute dependent parameters.
Definition: time_harmonic_elasticity_driver.cc:89
unsigned N_x_left_pml
PML width in elements for the left layer.
Definition: time_harmonic_elasticity_driver.cc:75
unsigned N_y_top_pml
PML width in elements for the top layer.
Definition: time_harmonic_elasticity_driver.cc:72
Vector< TimeHarmonicIsotropicElasticityTensor * > E_pt
The elasticity tensors for the two regions.
Definition: unstructured_acoustic_fsi.cc:135
double Element_area
helper to set target mesh element size
Definition: time_harmonic_elasticity_driver.cc:58
double Omega_sq
Square of the frequency of the time dependence.
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:56
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
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
double timer
Definition: oomph_metis_from_parmetis_3.1.1/struct.h:210
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::CommandLineArgs::command_line_flag_has_been_set(), Global_Parameters::compute_dependent_parameters(), Global_Parameters::Directory, oomph::CommandLineArgs::doc_specified_flags(), Global_Parameters::E_pt, Global_Parameters::Element_area, Global_Parameters::L_pml_multiplier, Global_Parameters::N_pml_multiplier, Global_Parameters::N_x_left_pml, Global_Parameters::N_x_right_pml, Global_Parameters::N_y_bottom_pml, Global_Parameters::N_y_top_pml, Global_Parameters::Nu, Global_Parameters::Omega_sq, oomph::oomph_info, oomph::CommandLineArgs::parse_and_assign(), problem, oomph::DocInfo::set_directory(), Flag_definition::setup(), oomph::CommandLineArgs::specify_command_line_flag(), Global_Parameters::T_end, Global_Parameters::T_start, Global_Parameters::Width_x_left_pml, Global_Parameters::Width_x_right_pml, Global_Parameters::Width_y_bottom_pml, and Global_Parameters::Width_y_top_pml.