ElasticAnnulusProblem< ELASTICITY_ELEMENT > Class Template Reference

Annular disk. More...

+ Inheritance diagram for ElasticAnnulusProblem< ELASTICITY_ELEMENT >:

Public Member Functions

 ElasticAnnulusProblem ()
 Constructor: More...
 
 ~ElasticAnnulusProblem ()
 Destructor (empty) More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
void create_pml_meshes ()
 Create PML meshes. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of traction elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of traction elements. More...
 
void doc_solution (DocInfo &doc_info)
 Doc the solution. More...
 
 ElasticAnnulusProblem ()
 Constructor: More...
 
 ~ElasticAnnulusProblem ()
 Destructor (empty) More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
void create_pml_meshes ()
 Create PML meshes. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of traction elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of traction elements. More...
 
void doc_solution (DocInfo &doc_info)
 Doc the solution. More...
 
- Public Member Functions inherited from oomph::Problem
virtual void debug_hook_fct (const unsigned &i)
 
void set_analytic_dparameter (double *const &parameter_pt)
 
void unset_analytic_dparameter (double *const &parameter_pt)
 
bool is_dparameter_calculated_analytically (double *const &parameter_pt)
 
void set_analytic_hessian_products ()
 
void unset_analytic_hessian_products ()
 
bool are_hessian_products_calculated_analytically ()
 
void set_pinned_values_to_zero ()
 
bool distributed () const
 
OomphCommunicatorcommunicator_pt ()
 access function to the oomph-lib communicator More...
 
const OomphCommunicatorcommunicator_pt () const
 access function to the oomph-lib communicator, const version More...
 
 Problem ()
 
 Problem (const Problem &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const Problem &)=delete
 Broken assignment operator. More...
 
virtual ~Problem ()
 Virtual destructor to clean up memory. More...
 
Mesh *& mesh_pt ()
 Return a pointer to the global mesh. More...
 
Mesh *const & mesh_pt () const
 Return a pointer to the global mesh (const version) More...
 
Mesh *& mesh_pt (const unsigned &imesh)
 
Mesh *const & mesh_pt (const unsigned &imesh) const
 Return a pointer to the i-th submesh (const version) More...
 
unsigned nsub_mesh () const
 Return number of submeshes. More...
 
unsigned add_sub_mesh (Mesh *const &mesh_pt)
 
void flush_sub_meshes ()
 
void build_global_mesh ()
 
void rebuild_global_mesh ()
 
LinearSolver *& linear_solver_pt ()
 Return a pointer to the linear solver object. More...
 
LinearSolver *const & linear_solver_pt () const
 Return a pointer to the linear solver object (const version) More...
 
LinearSolver *& mass_matrix_solver_for_explicit_timestepper_pt ()
 
LinearSolvermass_matrix_solver_for_explicit_timestepper_pt () const
 
EigenSolver *& eigen_solver_pt ()
 Return a pointer to the eigen solver object. More...
 
EigenSolver *const & eigen_solver_pt () const
 Return a pointer to the eigen solver object (const version) More...
 
Time *& time_pt ()
 Return a pointer to the global time object. More...
 
Timetime_pt () const
 Return a pointer to the global time object (const version). More...
 
doubletime ()
 Return the current value of continuous time. More...
 
double time () const
 Return the current value of continuous time (const version) More...
 
TimeStepper *& time_stepper_pt ()
 
const TimeSteppertime_stepper_pt () const
 
TimeStepper *& time_stepper_pt (const unsigned &i)
 Return a pointer to the i-th timestepper. More...
 
ExplicitTimeStepper *& explicit_time_stepper_pt ()
 Return a pointer to the explicit timestepper. More...
 
unsigned long set_timestepper_for_all_data (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data=false)
 
virtual void shift_time_values ()
 Shift all values along to prepare for next timestep. More...
 
AssemblyHandler *& assembly_handler_pt ()
 Return a pointer to the assembly handler object. More...
 
AssemblyHandler *const & assembly_handler_pt () const
 Return a pointer to the assembly handler object (const version) More...
 
doubleminimum_dt ()
 Access function to min timestep in adaptive timestepping. More...
 
doublemaximum_dt ()
 Access function to max timestep in adaptive timestepping. More...
 
unsignedmax_newton_iterations ()
 Access function to max Newton iterations before giving up. More...
 
void problem_is_nonlinear (const bool &prob_lin)
 Access function to Problem_is_nonlinear. More...
 
doublemax_residuals ()
 
booltime_adaptive_newton_crash_on_solve_fail ()
 Access function for Time_adaptive_newton_crash_on_solve_fail. More...
 
doublenewton_solver_tolerance ()
 
void add_time_stepper_pt (TimeStepper *const &time_stepper_pt)
 
void set_explicit_time_stepper_pt (ExplicitTimeStepper *const &explicit_time_stepper_pt)
 
void initialise_dt (const double &dt)
 
void initialise_dt (const Vector< double > &dt)
 
Data *& global_data_pt (const unsigned &i)
 Return a pointer to the the i-th global data object. More...
 
void add_global_data (Data *const &global_data_pt)
 
void flush_global_data ()
 
LinearAlgebraDistribution *const & dof_distribution_pt () const
 Return the pointer to the dof distribution (read-only) More...
 
unsigned long ndof () const
 Return the number of dofs. More...
 
unsigned ntime_stepper () const
 Return the number of time steppers. More...
 
unsigned nglobal_data () const
 Return the number of global data values. More...
 
unsigned self_test ()
 Self-test: Check meshes and global data. Return 0 for OK. More...
 
void enable_store_local_dof_pt_in_elements ()
 
void disable_store_local_dof_pt_in_elements ()
 
unsigned long assign_eqn_numbers (const bool &assign_local_eqn_numbers=true)
 
void describe_dofs (std::ostream &out= *(oomph_info.stream_pt())) const
 
void enable_discontinuous_formulation ()
 
void disable_discontinuous_formulation ()
 
void get_dofs (DoubleVector &dofs) const
 
void get_dofs (const unsigned &t, DoubleVector &dofs) const
 Return vector of the t'th history value of all dofs. More...
 
void set_dofs (const DoubleVector &dofs)
 Set the values of the dofs. More...
 
void set_dofs (const unsigned &t, DoubleVector &dofs)
 Set the history values of the dofs. More...
 
void set_dofs (const unsigned &t, Vector< double * > &dof_pt)
 
void add_to_dofs (const double &lambda, const DoubleVector &increment_dofs)
 Add lambda x incremenet_dofs[l] to the l-th dof. More...
 
doubleglobal_dof_pt (const unsigned &i)
 
doubledof (const unsigned &i)
 i-th dof in the problem More...
 
double dof (const unsigned &i) const
 i-th dof in the problem (const version) More...
 
double *& dof_pt (const unsigned &i)
 Pointer to i-th dof in the problem. More...
 
doubledof_pt (const unsigned &i) const
 Pointer to i-th dof in the problem (const version) More...
 
virtual void get_inverse_mass_matrix_times_residuals (DoubleVector &Mres)
 
virtual void get_dvaluesdt (DoubleVector &f)
 
virtual void get_residuals (DoubleVector &residuals)
 Get the total residuals Vector for the problem. More...
 
virtual void get_jacobian (DoubleVector &residuals, DenseDoubleMatrix &jacobian)
 
virtual void get_jacobian (DoubleVector &residuals, CRDoubleMatrix &jacobian)
 
virtual void get_jacobian (DoubleVector &residuals, CCDoubleMatrix &jacobian)
 
virtual void get_jacobian (DoubleVector &residuals, SumOfMatrices &jacobian)
 
void get_fd_jacobian (DoubleVector &residuals, DenseMatrix< double > &jacobian)
 Get the full Jacobian by finite differencing. More...
 
void get_derivative_wrt_global_parameter (double *const &parameter_pt, DoubleVector &result)
 
void get_hessian_vector_products (DoubleVectorWithHaloEntries const &Y, Vector< DoubleVectorWithHaloEntries > const &C, Vector< DoubleVectorWithHaloEntries > &product)
 
void solve_eigenproblem (const unsigned &n_eval, Vector< std::complex< double >> &eigenvalue, Vector< DoubleVector > &eigenvector, const bool &steady=true)
 Solve the eigenproblem. More...
 
void solve_eigenproblem (const unsigned &n_eval, Vector< std::complex< double >> &eigenvalue, const bool &steady=true)
 
virtual void get_eigenproblem_matrices (CRDoubleMatrix &mass_matrix, CRDoubleMatrix &main_matrix, const double &shift=0.0)
 
void assign_eigenvector_to_dofs (DoubleVector &eigenvector)
 Assign the eigenvector passed to the function to the dofs. More...
 
void add_eigenvector_to_dofs (const double &epsilon, const DoubleVector &eigenvector)
 
void store_current_dof_values ()
 Store the current values of the degrees of freedom. More...
 
void restore_dof_values ()
 Restore the stored values of the degrees of freedom. More...
 
void enable_jacobian_reuse ()
 
void disable_jacobian_reuse ()
 Disable recycling of Jacobian in Newton iteration. More...
 
bool jacobian_reuse_is_enabled ()
 Is recycling of Jacobian in Newton iteration enabled? More...
 
booluse_predictor_values_as_initial_guess ()
 
void newton_solve ()
 Use Newton method to solve the problem. More...
 
void enable_globally_convergent_newton_method ()
 enable globally convergent Newton method More...
 
void disable_globally_convergent_newton_method ()
 disable globally convergent Newton method More...
 
void newton_solve (unsigned const &max_adapt)
 
void steady_newton_solve (unsigned const &max_adapt=0)
 
void copy (Problem *orig_problem_pt)
 
virtual Problemmake_copy ()
 
virtual void read (std::ifstream &restart_file, bool &unsteady_restart)
 
virtual void read (std::ifstream &restart_file)
 
virtual void dump (std::ofstream &dump_file) const
 
void dump (const std::string &dump_file_name) const
 
void delete_all_external_storage ()
 
virtual void symmetrise_eigenfunction_for_adaptive_pitchfork_tracking ()
 
doublebifurcation_parameter_pt () const
 
void get_bifurcation_eigenfunction (Vector< DoubleVector > &eigenfunction)
 
void activate_fold_tracking (double *const &parameter_pt, const bool &block_solve=true)
 
void activate_bifurcation_tracking (double *const &parameter_pt, const DoubleVector &eigenvector, const bool &block_solve=true)
 
void activate_bifurcation_tracking (double *const &parameter_pt, const DoubleVector &eigenvector, const DoubleVector &normalisation, const bool &block_solve=true)
 
void activate_pitchfork_tracking (double *const &parameter_pt, const DoubleVector &symmetry_vector, const bool &block_solve=true)
 
void activate_hopf_tracking (double *const &parameter_pt, const bool &block_solve=true)
 
void activate_hopf_tracking (double *const &parameter_pt, const double &omega, const DoubleVector &null_real, const DoubleVector &null_imag, const bool &block_solve=true)
 
void deactivate_bifurcation_tracking ()
 
void reset_assembly_handler_to_default ()
 Reset the system to the standard non-augemented state. More...
 
double arc_length_step_solve (double *const &parameter_pt, const double &ds, const unsigned &max_adapt=0)
 
double arc_length_step_solve (Data *const &data_pt, const unsigned &data_index, const double &ds, const unsigned &max_adapt=0)
 
void reset_arc_length_parameters ()
 
intsign_of_jacobian ()
 
void explicit_timestep (const double &dt, const bool &shift_values=true)
 Take an explicit timestep of size dt. More...
 
void unsteady_newton_solve (const double &dt)
 
void unsteady_newton_solve (const double &dt, const bool &shift_values)
 
void unsteady_newton_solve (const double &dt, const unsigned &max_adapt, const bool &first, const bool &shift=true)
 
double doubly_adaptive_unsteady_newton_solve (const double &dt, const double &epsilon, const unsigned &max_adapt, const bool &first, const bool &shift=true)
 
double doubly_adaptive_unsteady_newton_solve (const double &dt, const double &epsilon, const unsigned &max_adapt, const unsigned &suppress_resolve_after_spatial_adapt_flag, const bool &first, const bool &shift=true)
 
double adaptive_unsteady_newton_solve (const double &dt_desired, const double &epsilon)
 
double adaptive_unsteady_newton_solve (const double &dt_desired, const double &epsilon, const bool &shift_values)
 
void assign_initial_values_impulsive ()
 
void assign_initial_values_impulsive (const double &dt)
 
void calculate_predictions ()
 Calculate predictions. More...
 
void enable_mass_matrix_reuse ()
 
void disable_mass_matrix_reuse ()
 
bool mass_matrix_reuse_is_enabled ()
 Return whether the mass matrix is being reused. More...
 
void refine_uniformly (const Vector< unsigned > &nrefine_for_mesh)
 
void refine_uniformly (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 
void refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh)
 
void refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 
void refine_uniformly (DocInfo &doc_info)
 
void refine_uniformly_and_prune (DocInfo &doc_info)
 
void refine_uniformly ()
 
void refine_uniformly (const unsigned &i_mesh, DocInfo &doc_info)
 Do uniform refinement for submesh i_mesh with documentation. More...
 
void refine_uniformly (const unsigned &i_mesh)
 Do uniform refinement for submesh i_mesh without documentation. More...
 
void p_refine_uniformly (const Vector< unsigned > &nrefine_for_mesh)
 
void p_refine_uniformly (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 
void p_refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh)
 
void p_refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 
void p_refine_uniformly (DocInfo &doc_info)
 
void p_refine_uniformly_and_prune (DocInfo &doc_info)
 
void p_refine_uniformly ()
 
void p_refine_uniformly (const unsigned &i_mesh, DocInfo &doc_info)
 Do uniform p-refinement for submesh i_mesh with documentation. More...
 
void p_refine_uniformly (const unsigned &i_mesh)
 Do uniform p-refinement for submesh i_mesh without documentation. More...
 
void refine_selected_elements (const Vector< unsigned > &elements_to_be_refined)
 
void refine_selected_elements (const Vector< RefineableElement * > &elements_to_be_refined_pt)
 
void refine_selected_elements (const unsigned &i_mesh, const Vector< unsigned > &elements_to_be_refined)
 
void refine_selected_elements (const unsigned &i_mesh, const Vector< RefineableElement * > &elements_to_be_refined_pt)
 
void refine_selected_elements (const Vector< Vector< unsigned >> &elements_to_be_refined)
 
void refine_selected_elements (const Vector< Vector< RefineableElement * >> &elements_to_be_refined_pt)
 
void p_refine_selected_elements (const Vector< unsigned > &elements_to_be_refined)
 
void p_refine_selected_elements (const Vector< PRefineableElement * > &elements_to_be_refined_pt)
 
void p_refine_selected_elements (const unsigned &i_mesh, const Vector< unsigned > &elements_to_be_refined)
 
void p_refine_selected_elements (const unsigned &i_mesh, const Vector< PRefineableElement * > &elements_to_be_refined_pt)
 
void p_refine_selected_elements (const Vector< Vector< unsigned >> &elements_to_be_refined)
 
void p_refine_selected_elements (const Vector< Vector< PRefineableElement * >> &elements_to_be_refined_pt)
 
unsigned unrefine_uniformly ()
 
unsigned unrefine_uniformly (const unsigned &i_mesh)
 
void p_unrefine_uniformly (DocInfo &doc_info)
 
void p_unrefine_uniformly (const unsigned &i_mesh, DocInfo &doc_info)
 Do uniform p-unrefinement for submesh i_mesh without documentation. More...
 
void adapt (unsigned &n_refined, unsigned &n_unrefined)
 
void adapt ()
 
void p_adapt (unsigned &n_refined, unsigned &n_unrefined)
 
void p_adapt ()
 
void adapt_based_on_error_estimates (unsigned &n_refined, unsigned &n_unrefined, Vector< Vector< double >> &elemental_error)
 
void adapt_based_on_error_estimates (Vector< Vector< double >> &elemental_error)
 
void get_all_error_estimates (Vector< Vector< double >> &elemental_error)
 
void doc_errors (DocInfo &doc_info)
 Get max and min error for all elements in submeshes. More...
 
void doc_errors ()
 Get max and min error for all elements in submeshes. More...
 
void enable_info_in_newton_solve ()
 
void disable_info_in_newton_solve ()
 Disable the output of information when in the newton solver. More...
 
- Public Member Functions inherited from oomph::ExplicitTimeSteppableObject
 ExplicitTimeSteppableObject ()
 Empty constructor. More...
 
 ExplicitTimeSteppableObject (const ExplicitTimeSteppableObject &)=delete
 Broken copy constructor. More...
 
void operator= (const ExplicitTimeSteppableObject &)=delete
 Broken assignment operator. More...
 
virtual ~ExplicitTimeSteppableObject ()
 Empty destructor. More...
 
virtual void actions_before_explicit_stage ()
 
virtual void actions_after_explicit_stage ()
 

Private Member Functions

void complete_problem_setup ()
 Helper function to complete problem setup. More...
 
void complete_problem_setup ()
 Helper function to complete problem setup. More...
 

Private Attributes

RefineableTriangleMesh< ELASTICITY_ELEMENT > * Solid_mesh_pt
 Pointer to refineable solid mesh. More...
 
MeshPML_right_mesh_pt
 Pointer to the right PML mesh. More...
 
MeshPML_top_mesh_pt
 Pointer to the top PML mesh. More...
 
MeshPML_left_mesh_pt
 Pointer to the left PML mesh. More...
 
MeshPML_bottom_mesh_pt
 Pointer to the bottom PML mesh. More...
 
MeshPML_top_right_mesh_pt
 Pointer to the top right corner PML mesh. More...
 
MeshPML_top_left_mesh_pt
 Pointer to the top left corner PML mesh. More...
 
MeshPML_bottom_right_mesh_pt
 Pointer to the bottom right corner PML mesh. More...
 
MeshPML_bottom_left_mesh_pt
 Pointer to the bottom left corner PML mesh. More...
 
DocInfo Doc_info
 DocInfo object for output. More...
 
unsigned Upper_inner_boundary_id
 Boundary ID of upper inner boundary. More...
 
unsigned Upper_outer_boundary_id
 Boundary ID of upper outer boundary. More...
 
unsigned Lower_inner_boundary_id
 Boundary ID of lower inner boundary. More...
 
unsigned Lower_outer_boundary_id
 Boundary ID of lower outer boundary. More...
 
RectangularQuadMesh< ELASTICITY_ELEMENT > * Solid_mesh_pt
 Pointer to solid mesh. More...
 

Additional Inherited Members

- Public Types inherited from oomph::Problem
typedef void(* SpatialErrorEstimatorFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error)
 Function pointer for spatial error estimator. More...
 
typedef void(* SpatialErrorEstimatorWithDocFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error, DocInfo &doc_info)
 Function pointer for spatial error estimator with doc. More...
 
- Public Attributes inherited from oomph::Problem
bool Shut_up_in_newton_solve
 
- Static Public Attributes inherited from oomph::Problem
static bool Suppress_warning_about_actions_before_read_unstructured_meshes
 
- Protected Types inherited from oomph::Problem
enum  Assembly_method {
  Perform_assembly_using_vectors_of_pairs , Perform_assembly_using_two_vectors , Perform_assembly_using_maps , Perform_assembly_using_lists ,
  Perform_assembly_using_two_arrays
}
 Enumerated flags to determine which sparse assembly method is used. More...
 
- Protected Member Functions inherited from oomph::Problem
unsigned setup_element_count_per_dof ()
 
virtual void sparse_assemble_row_or_column_compressed (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag)
 
virtual void actions_before_newton_convergence_check ()
 
virtual void actions_before_newton_step ()
 
virtual void actions_after_newton_step ()
 
virtual void actions_before_implicit_timestep ()
 
virtual void actions_after_implicit_timestep ()
 
virtual void actions_after_implicit_timestep_and_error_estimation ()
 
virtual void actions_before_explicit_timestep ()
 Actions that should be performed before each explicit time step. More...
 
virtual void actions_after_explicit_timestep ()
 Actions that should be performed after each explicit time step. More...
 
virtual void actions_before_read_unstructured_meshes ()
 
virtual void actions_after_read_unstructured_meshes ()
 
virtual void actions_after_change_in_global_parameter (double *const &parameter_pt)
 
virtual void actions_after_change_in_bifurcation_parameter ()
 
virtual void actions_after_parameter_increase (double *const &parameter_pt)
 
doubledof_derivative (const unsigned &i)
 
doubledof_current (const unsigned &i)
 
virtual void set_initial_condition ()
 
virtual double global_temporal_error_norm ()
 
unsigned newton_solve_continuation (double *const &parameter_pt)
 
unsigned newton_solve_continuation (double *const &parameter_pt, DoubleVector &z)
 
void calculate_continuation_derivatives (double *const &parameter_pt)
 
void calculate_continuation_derivatives (const DoubleVector &z)
 
void calculate_continuation_derivatives_fd (double *const &parameter_pt)
 
bool does_pointer_correspond_to_problem_data (double *const &parameter_pt)
 
void set_consistent_pinned_values_for_continuation ()
 
- Protected Attributes inherited from oomph::Problem
Vector< Problem * > Copy_of_problem_pt
 
std::map< double *, boolCalculate_dparameter_analytic
 
bool Calculate_hessian_products_analytic
 
LinearAlgebraDistributionDof_distribution_pt
 
Vector< double * > Dof_pt
 Vector of pointers to dofs. More...
 
DoubleVectorWithHaloEntries Element_count_per_dof
 
double Relaxation_factor
 
double Newton_solver_tolerance
 
unsigned Max_newton_iterations
 Maximum number of Newton iterations. More...
 
unsigned Nnewton_iter_taken
 
Vector< doubleMax_res
 Maximum residuals at start and after each newton iteration. More...
 
double Max_residuals
 
bool Time_adaptive_newton_crash_on_solve_fail
 
bool Jacobian_reuse_is_enabled
 Is re-use of Jacobian in Newton iteration enabled? Default: false. More...
 
bool Jacobian_has_been_computed
 
bool Problem_is_nonlinear
 
bool Pause_at_end_of_sparse_assembly
 
bool Doc_time_in_distribute
 
unsigned Sparse_assembly_method
 
unsigned Sparse_assemble_with_arrays_initial_allocation
 
unsigned Sparse_assemble_with_arrays_allocation_increment
 
Vector< Vector< unsigned > > Sparse_assemble_with_arrays_previous_allocation
 
double Numerical_zero_for_sparse_assembly
 
double FD_step_used_in_get_hessian_vector_products
 
bool Mass_matrix_reuse_is_enabled
 
bool Mass_matrix_has_been_computed
 
bool Discontinuous_element_formulation
 
double Minimum_dt
 Minimum desired dt: if dt falls below this value, exit. More...
 
double Maximum_dt
 Maximum desired dt. More...
 
double DTSF_max_increase
 
double DTSF_min_decrease
 
double Minimum_dt_but_still_proceed
 
bool Scale_arc_length
 Boolean to control whether arc-length should be scaled. More...
 
double Desired_proportion_of_arc_length
 Proportion of the arc-length to taken by the parameter. More...
 
double Theta_squared
 
int Sign_of_jacobian
 Storage for the sign of the global Jacobian. More...
 
double Continuation_direction
 
double Parameter_derivative
 Storage for the derivative of the global parameter wrt arc-length. More...
 
double Parameter_current
 Storage for the present value of the global parameter. More...
 
bool Use_continuation_timestepper
 Boolean to control original or new storage of dof stuff. More...
 
unsigned Dof_derivative_offset
 
unsigned Dof_current_offset
 
Vector< doubleDof_derivative
 Storage for the derivative of the problem variables wrt arc-length. More...
 
Vector< doubleDof_current
 Storage for the present values of the variables. More...
 
double Ds_current
 Storage for the current step value. More...
 
unsigned Desired_newton_iterations_ds
 
double Minimum_ds
 Minimum desired value of arc-length. More...
 
bool Bifurcation_detection
 Boolean to control bifurcation detection via determinant of Jacobian. More...
 
bool Bisect_to_find_bifurcation
 Boolean to control wheter bisection is used to located bifurcation. More...
 
bool First_jacobian_sign_change
 Boolean to indicate whether a sign change has occured in the Jacobian. More...
 
bool Arc_length_step_taken
 Boolean to indicate whether an arc-length step has been taken. More...
 
bool Use_finite_differences_for_continuation_derivatives
 
OomphCommunicatorCommunicator_pt
 The communicator for this problem. More...
 
bool Always_take_one_newton_step
 
double Timestep_reduction_factor_after_nonconvergence
 
bool Keep_temporal_error_below_tolerance
 
- Static Protected Attributes inherited from oomph::Problem
static ContinuationStorageScheme Continuation_time_stepper
 Storage for the single static continuation timestorage object. More...
 

Detailed Description

template<class ELASTICITY_ELEMENT>
class ElasticAnnulusProblem< ELASTICITY_ELEMENT >

Annular disk.

Constructor & Destructor Documentation

◆ ElasticAnnulusProblem() [1/2]

template<class ELASTICITY_ELEMENT >
ElasticAnnulusProblem< ELASTICITY_ELEMENT >::ElasticAnnulusProblem

Constructor:

Number of elements in x direction in the bulk mesh

Number of elements in y direction in the bulk mesh

Start and end spatial coordinates of the bulk mesh in x direction

Start and end spatial coordinates of the bulk mesh in y direction

337 {
338 
339  // Solid mesh
340  //-----------
341 
342  // Create circle representing inner boundary
343  double a=0.2;
344  double x_c=0.0;
345  double y_c=0.0;
346  Circle* inner_circle_pt=new Circle(x_c,y_c,a);
347 
348  // Outer boundary
349  //---------------
350  TriangleMeshClosedCurve* outer_boundary_pt=0;
351 
352  unsigned n_segments = 16;
353  Vector<TriangleMeshCurveSection*> outer_boundary_line_pt(4);
354 
355  // Each polyline only has three vertices, provide storage for their
356  // coordinates
357  Vector<Vector<double> > vertex_coord(2);
358  for(unsigned i=0;i<2;i++)
359  {
360  vertex_coord[i].resize(2);
361  }
362 
363  // First polyline
364  vertex_coord[0][0]=-2.0;
365  vertex_coord[0][1]=-2.0;
366  vertex_coord[1][0]=-2.0;
367  vertex_coord[1][1]=2.0;
368 
369  // Build the 1st boundary polyline
370  unsigned boundary_id=2;
371  outer_boundary_line_pt[0] = new TriangleMeshPolyLine(vertex_coord,
372  boundary_id);
373 
374  // Second boundary polyline
375  vertex_coord[0][0]=-2.0;
376  vertex_coord[0][1]=2.0;
377  vertex_coord[1][0]=2.0;
378  vertex_coord[1][1]=2.0;
379 
380  // Build the 2nd boundary polyline
381  boundary_id=3;
382  outer_boundary_line_pt[1] = new TriangleMeshPolyLine(vertex_coord,
383  boundary_id);
384 
385  // Third boundary polyline
386  vertex_coord[0][0]=2.0;
387  vertex_coord[0][1]=2.0;
388  vertex_coord[1][0]=2.0;
389  vertex_coord[1][1]=-2.0;
390 
391  // Build the 3rd boundary polyline
392  boundary_id=4;
393  outer_boundary_line_pt[2] = new TriangleMeshPolyLine(vertex_coord,
394  boundary_id);
395 
396  // Fourth boundary polyline
397  vertex_coord[0][0]=2.0;
398  vertex_coord[0][1]=-2.0;
399  vertex_coord[1][0]=-2.0;
400  vertex_coord[1][1]=-2.0;
401 
402  // Build the 4th boundary polyline
403  boundary_id=5;
404  outer_boundary_line_pt[3] = new TriangleMeshPolyLine(vertex_coord,
405  boundary_id);
406 
407  // Create the triangle mesh polygon for outer boundary
408  outer_boundary_pt = new TriangleMeshPolygon(outer_boundary_line_pt);
409 
410  // Inner circular boundary
411  //------------------------
412  Vector<TriangleMeshCurveSection*> inner_boundary_line_pt(2);
413 
414  // The intrinsic coordinates for the beginning and end of the curve
415  double s_start = 0.0;
416  double s_end = MathematicalConstants::Pi;
417  boundary_id = 0;
418  inner_boundary_line_pt[0]=
419  new TriangleMeshCurviLine(inner_circle_pt,
420  s_start,
421  s_end,
422  n_segments,
423  boundary_id);
424 
425  // The intrinsic coordinates for the beginning and end of the curve
426  s_start = MathematicalConstants::Pi;
427  s_end = 2.0*MathematicalConstants::Pi;
428  boundary_id = 1;
429  inner_boundary_line_pt[1]=
430  new TriangleMeshCurviLine(inner_circle_pt,
431  s_start,
432  s_end,
433  n_segments,
434  boundary_id);
435 
436 
437  // Combine to hole
438  //----------------
440  Vector<double> hole_coords(2);
441  hole_coords[0]=0.0;
442  hole_coords[1]=0.0;
443  hole_pt[0]=new TriangleMeshClosedCurve(inner_boundary_line_pt,
444  hole_coords);
445 
446 
447  // Use the TriangleMeshParameters object for helping on the manage
448  // of the TriangleMesh parameters. The only parameter that needs to take
449  // is the outer boundary.
450  TriangleMeshParameters triangle_mesh_parameters(outer_boundary_pt);
451 
452  // Specify the closed curve using the TriangleMeshParameters object
453  triangle_mesh_parameters.internal_closed_curve_pt() = hole_pt;
454 
455  // Target element size in bulk mesh
456  triangle_mesh_parameters.element_area() = Global_Parameters::Element_area;
457 
458 
459 
460 #ifdef ADAPTIVE
461 
462  // Build the mesh
463  Solid_mesh_pt=new
464  RefineableTriangleMesh<ELASTICITY_ELEMENT>(triangle_mesh_parameters);
465 
466  // Set error estimator
468 
469  // Choose error tolerances to force some uniform refinement
472 
473 #else
474 
475  // Build the mesh
476  Solid_mesh_pt=new
477  TriangleMesh<ELASTICITY_ELEMENT>(triangle_mesh_parameters);
478 
479 #endif
480 
481  // Create the main triangular mesh
483 
484  // Create PML meshes and add them to the global mesh
486 
487  // Build the entire mesh from its submeshes
489 
490  // Let's have a look where the boundaries are
491  this->mesh_pt()->output("global_mesh.dat");
492  this->mesh_pt()->output_boundaries("global_mesh_boundary.dat");
493 
494  // Complete problem setup
496 
497  //Assign equation numbers
498  cout << assign_eqn_numbers() << std::endl;
499 
500  // Set output directory
502 
503 } //end_of_constructor
int i
Definition: BiCGSTAB_step_by_step.cpp:9
void complete_problem_setup()
Helper function to complete problem setup.
Definition: time_harmonic_elasticity_driver.cc:512
void create_pml_meshes()
Create PML meshes.
Definition: time_harmonic_elasticity_driver.cc:752
RefineableTriangleMesh< ELASTICITY_ELEMENT > * Solid_mesh_pt
Pointer to refineable solid mesh.
Definition: time_harmonic_elasticity_driver.cc:281
DocInfo Doc_info
DocInfo object for output.
Definition: time_harmonic_elasticity_driver.cc:315
Definition: geom_objects.h:873
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
void output(std::ostream &outfile)
Output for all elements.
Definition: mesh.cc:2027
void output_boundaries(std::ostream &outfile)
Output the nodes on the boundaries (into separate tecplot zones)
Definition: mesh.cc:1064
unsigned add_sub_mesh(Mesh *const &mesh_pt)
Definition: problem.h:1330
void build_global_mesh()
Definition: problem.cc:1493
Mesh *& mesh_pt()
Return a pointer to the global mesh.
Definition: problem.h:1280
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Definition: problem.cc:1989
double & min_permitted_error()
Definition: refineable_mesh.h:156
double & max_permitted_error()
Definition: refineable_mesh.h:163
ErrorEstimator *& spatial_error_estimator_pt()
Access to spatial error estimator.
Definition: refineable_mesh.h:143
Base class defining a closed curve for the Triangle mesh generation.
Definition: unstructured_two_d_mesh_geometry_base.h:1339
Definition: unstructured_two_d_mesh_geometry_base.h:662
Definition: triangle_mesh.template.h:94
Class defining a polyline for use in Triangle Mesh generation.
Definition: unstructured_two_d_mesh_geometry_base.h:868
Class defining a closed polygon for the Triangle mesh generation.
Definition: unstructured_two_d_mesh_geometry_base.h:1451
Definition: oomph-lib/src/generic/Vector.h:58
Definition: error_estimator.h:266
const Scalar * a
Definition: level2_cplx_impl.h:32
double Pi
Definition: two_d_biharmonic.cc:235
string Directory
Output directory.
Definition: acoustic_fsi.cc:101
double Element_area
helper to set target mesh element size
Definition: time_harmonic_elasticity_driver.cc:58

References a, Global_Parameters::Directory, GlobalParameters::Doc_info, Global_Parameters::Element_area, oomph::TriangleMeshParameters::element_area(), i, oomph::TriangleMeshParameters::internal_closed_curve_pt(), BiharmonicTestFunctions2::Pi, and oomph::DocInfo::set_directory().

◆ ~ElasticAnnulusProblem() [1/2]

template<class ELASTICITY_ELEMENT >
ElasticAnnulusProblem< ELASTICITY_ELEMENT >::~ElasticAnnulusProblem ( )
inline

Destructor (empty)

253 {}

◆ ElasticAnnulusProblem() [2/2]

template<class ELASTICITY_ELEMENT >
ElasticAnnulusProblem< ELASTICITY_ELEMENT >::ElasticAnnulusProblem ( )

Constructor:

◆ ~ElasticAnnulusProblem() [2/2]

template<class ELASTICITY_ELEMENT >
ElasticAnnulusProblem< ELASTICITY_ELEMENT >::~ElasticAnnulusProblem ( )
inline

Destructor (empty)

150 {}

Member Function Documentation

◆ actions_after_adapt() [1/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::actions_after_adapt
virtual

Actions after adapt: Rebuild the mesh of traction elements.

Actions after adapt: complete problem setup.

Reimplemented from oomph::Problem.

612 {
613 
614  // Build PML meshes and add them to the global mesh
616 
617  // Build the entire mesh from its submeshes
619 
620  // Complete problem setup
622 
623 }// end of actions_after_adapt
void rebuild_global_mesh()
Definition: problem.cc:1533

◆ actions_after_adapt() [2/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::actions_after_adapt ( )
virtual

Actions after adapt: Rebuild the mesh of traction elements.

Reimplemented from oomph::Problem.

◆ actions_after_newton_solve() [1/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

256 {}

◆ actions_after_newton_solve() [2/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

153 {}

◆ actions_before_adapt() [1/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::actions_before_adapt
virtual

Actions before adapt: Wipe the mesh of traction elements.

Actions before adapt: empty.

Reimplemented from oomph::Problem.

572 {
573  // Before adapting the added PML meshes must be removed
574  // as they are not refineable and are to be rebuilt from the
575  // newly refined triangular mesh
576  delete PML_right_mesh_pt;
578  delete PML_top_mesh_pt;
579  PML_top_mesh_pt=0;
580  delete PML_left_mesh_pt;
582  delete PML_bottom_mesh_pt;
584  delete PML_top_right_mesh_pt;
586  delete PML_top_left_mesh_pt;
592 
593  // Rebuild the Problem's global mesh from its various sub-meshes
594  // but first flush all its submeshes
596 
597  // Then add the triangular mesh back
599 
600  // Rebuild the global mesh such that it now stores
601  // the triangular mesh only
603 }// end of actions_before_adapt
Mesh * PML_bottom_right_mesh_pt
Pointer to the bottom right corner PML mesh.
Definition: time_harmonic_elasticity_driver.cc:309
Mesh * PML_top_mesh_pt
Pointer to the top PML mesh.
Definition: time_harmonic_elasticity_driver.cc:294
Mesh * PML_bottom_mesh_pt
Pointer to the bottom PML mesh.
Definition: time_harmonic_elasticity_driver.cc:300
Mesh * PML_bottom_left_mesh_pt
Pointer to the bottom left corner PML mesh.
Definition: time_harmonic_elasticity_driver.cc:312
Mesh * PML_left_mesh_pt
Pointer to the left PML mesh.
Definition: time_harmonic_elasticity_driver.cc:297
Mesh * PML_top_right_mesh_pt
Pointer to the top right corner PML mesh.
Definition: time_harmonic_elasticity_driver.cc:303
Mesh * PML_top_left_mesh_pt
Pointer to the top left corner PML mesh.
Definition: time_harmonic_elasticity_driver.cc:306
Mesh * PML_right_mesh_pt
Pointer to the right PML mesh.
Definition: time_harmonic_elasticity_driver.cc:291
void flush_sub_meshes()
Definition: problem.h:1339

◆ actions_before_adapt() [2/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::actions_before_adapt ( )
virtual

Actions before adapt: Wipe the mesh of traction elements.

Reimplemented from oomph::Problem.

◆ actions_before_newton_solve() [1/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

259 {}

◆ actions_before_newton_solve() [2/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

156 {}

◆ complete_problem_setup() [1/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::complete_problem_setup
private

Helper function to complete problem setup.

Complete problem setup.

Upcast from PMLElement to time harmonic linear elasticity bulk element

Boundaries with id 0 and 1 represent the interior boundary and these are the only ones that need to be processed, hence the loop below only considers nodes on these two boundaries.

513 {
514 
515 #ifdef ADAPTIVE
516 
517  // Min element size allowed during adaptation
519  {
520  Solid_mesh_pt->min_element_size()=1.0e-5;
521  }
522 
523 #endif
524 
525  //Assign the physical properties to the elements
526  //----------------------------------------------
527  unsigned nel=this->mesh_pt()->nelement();
528  for (unsigned e=0;e<nel;e++)
529  {
534  (mesh_pt()->element_pt(e));
535 
536  // Set the constitutive law
538 
539  // Square of non-dim frequency
541  } // end_of_assignment
542 
546  for(unsigned b=0;b<2;b++)
547  {
548  unsigned n_node = Solid_mesh_pt->nboundary_node(b);
549  for (unsigned n=0;n<n_node;n++)
550  {
552  Vector<double> x_node(2);
553  x_node[0]=nod_pt->x(0);
554  x_node[1]=nod_pt->x(1);
555  Vector<double> u_exact(4);
556  Global_Parameters::exact_u(x_node,u_exact);
557 
558  for (unsigned k=0;k<4;k++)
559  {
560  nod_pt->pin(k);
561  nod_pt->set_value(k,u_exact[k]);
562  }
563  }
564  }
565 } // end_of_complete_setup
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Scalar * b
Definition: benchVecAdd.cpp:17
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
unsigned long nboundary_node(const unsigned &ibound) const
Return number of nodes on a particular boundary.
Definition: mesh.h:833
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
Node *& boundary_node_pt(const unsigned &b, const unsigned &n)
Return pointer to node n on boundary b.
Definition: mesh.h:493
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
Definition: nodes.h:906
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
double *& omega_sq_pt()
Access function for square of non-dim frequency.
Definition: pml_time_harmonic_linear_elasticity_elements.h:206
PMLTimeHarmonicIsotropicElasticityTensor *& elasticity_tensor_pt()
Return the pointer to the elasticity_tensor.
Definition: pml_time_harmonic_linear_elasticity_elements.h:179
Definition: pml_time_harmonic_linear_elasticity_elements.h:448
double & min_element_size()
Min element size allowed during adaptation.
Definition: triangle_mesh.template.h:2483
char char char int int * k
Definition: level2_impl.h:374
void 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}.
Definition: time_harmonic_elasticity_driver.cc:152
Vector< TimeHarmonicIsotropicElasticityTensor * > E_pt
The elasticity tensors for the two regions.
Definition: unstructured_acoustic_fsi.cc:135
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

References b, oomph::CommandLineArgs::command_line_flag_has_been_set(), e(), Global_Parameters::E_pt, oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::elasticity_tensor_pt(), Global_Parameters::exact_u(), k, n, Global_Parameters::Omega_sq, oomph::PMLTimeHarmonicLinearElasticityEquationsBase< DIM >::omega_sq_pt(), oomph::Data::pin(), oomph::Data::set_value(), and oomph::Node::x().

◆ complete_problem_setup() [2/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::complete_problem_setup ( )
private

Helper function to complete problem setup.

◆ create_pml_meshes() [1/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::create_pml_meshes

Create PML meshes.

Create PML meshes and add them to the problem's sub-meshes.

753 {
754 
755  // Bulk mesh left boundary id
756  unsigned int left_boundary_id = 2;
757 
758  // Bulk mesh top boundary id
759  unsigned int top_boundary_id = 3;
760 
761  // Bulk mesh right boundary id
762  unsigned int right_boundary_id = 4;
763 
764  // Bulk mesh bottom boundary id
765  unsigned int bottom_boundary_id = 5;
766 
767  // Build the PML meshes based on the new adapted triangular mesh
771  (Solid_mesh_pt, right_boundary_id,
774 
775  PML_top_mesh_pt =
778  (Solid_mesh_pt, top_boundary_id,
781 
785  (Solid_mesh_pt, left_boundary_id,
788 
792  (Solid_mesh_pt, bottom_boundary_id,
795 
796  // Add submeshes to the global mesh
801 
802 // Rebuild corner PML meshes
803 
808  Solid_mesh_pt, right_boundary_id);
809 
814  Solid_mesh_pt, right_boundary_id);
815 
820  Solid_mesh_pt, left_boundary_id);
821 
826  Solid_mesh_pt, left_boundary_id);
827 
828  // Add submeshes to the global mesh
833 
834 } // end of create_pml_meshes
Definition: pml_meshes.h:48
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 Width_x_left_pml
Definition: time_harmonic_elasticity_driver.cc:85
unsigned N_x_right_pml
PML width in elements for the right layer.
Definition: time_harmonic_elasticity_driver.cc:69
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
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
Mesh * create_bottom_right_pml_mesh(Mesh *pml_right_mesh_pt, Mesh *pml_bottom_mesh_pt, Mesh *bulk_mesh_pt, const unsigned &right_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: pml_meshes.h:2103
Mesh * create_top_right_pml_mesh(Mesh *pml_right_mesh_pt, Mesh *pml_top_mesh_pt, Mesh *bulk_mesh_pt, const unsigned &right_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: pml_meshes.h:1968
Mesh * create_top_pml_mesh(Mesh *bulk_mesh_pt, const unsigned &top_boundary_id, const unsigned &n_y_top_pml, const double &width_y_top_pml, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: pml_meshes.h:1646
Mesh * create_top_left_pml_mesh(Mesh *pml_left_mesh_pt, Mesh *pml_top_mesh_pt, Mesh *bulk_mesh_pt, const unsigned &left_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: pml_meshes.h:2234
Mesh * create_bottom_left_pml_mesh(Mesh *pml_left_mesh_pt, Mesh *pml_bottom_mesh_pt, Mesh *bulk_mesh_pt, const unsigned &left_boundary_id, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: pml_meshes.h:2367
Mesh * create_bottom_pml_mesh(Mesh *bulk_mesh_pt, const unsigned &bottom_boundary_id, const unsigned &n_y_bottom_pml, const double &width_y_bottom_pml, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: pml_meshes.h:1860
Mesh * create_left_pml_mesh(Mesh *bulk_mesh_pt, const unsigned &left_boundary_id, const unsigned &n_x_left_pml, const double &width_x_left_pml, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: pml_meshes.h:1752
Mesh * create_right_pml_mesh(Mesh *bulk_mesh_pt, const unsigned &right_boundary_id, const unsigned &n_x_right_pml, const double &width_x_right_pml, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: pml_meshes.h:1539

References oomph::TwoDimensionalPMLHelper::create_bottom_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_bottom_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_bottom_right_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_right_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_left_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_pml_mesh(), oomph::TwoDimensionalPMLHelper::create_top_right_pml_mesh(), 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::Width_x_left_pml, Global_Parameters::Width_x_right_pml, Global_Parameters::Width_y_bottom_pml, and Global_Parameters::Width_y_top_pml.

◆ create_pml_meshes() [2/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::create_pml_meshes ( )

Create PML meshes.

◆ doc_solution() [1/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::doc_solution ( DocInfo doc_info)

Doc the solution.

630 {
631 
632  ofstream some_file;
633  char filename[100];
634 
635  // Number of plot points
636  unsigned n_plot=5;
637 
638  // Output displacement field
639  //--------------------------
640  sprintf(filename,"%s/soln_bulk%i.dat",Doc_info.directory().c_str(),
641  Doc_info.number());
642  some_file.open(filename);
643  Solid_mesh_pt->output(some_file,n_plot);
644  some_file.close();
645 
646  sprintf(filename,"%s/soln_pml_right%i.dat",Doc_info.directory().c_str(),
647  Doc_info.number());
648  some_file.open(filename);
649  PML_right_mesh_pt->output(some_file,n_plot);
650  some_file.close();
651 
652  sprintf(filename,"%s/soln_pml_top%i.dat",Doc_info.directory().c_str(),
653  Doc_info.number());
654  some_file.open(filename);
655  PML_top_mesh_pt->output(some_file,n_plot);
656  some_file.close();
657 
658  sprintf(filename,"%s/soln_pml_left%i.dat",Doc_info.directory().c_str(),
659  Doc_info.number());
660  some_file.open(filename);
661  PML_left_mesh_pt->output(some_file,n_plot);
662  some_file.close();
663 
664  sprintf(filename,"%s/soln_pml_bottom%i.dat",Doc_info.directory().c_str(),
665  Doc_info.number());
666  some_file.open(filename);
667  PML_bottom_mesh_pt->output(some_file,n_plot);
668  some_file.close();
669 
670  sprintf(filename,"%s/soln_pml_top_right%i.dat",Doc_info.directory().c_str(),
671  Doc_info.number());
672  some_file.open(filename);
673  PML_top_right_mesh_pt->output(some_file,n_plot);
674  some_file.close();
675 
676  sprintf(filename,"%s/soln_pml_top_left%i.dat",Doc_info.directory().c_str(),
677  Doc_info.number());
678  some_file.open(filename);
679  PML_top_left_mesh_pt->output(some_file,n_plot);
680  some_file.close();
681 
682  sprintf(filename,"%s/soln_pml_bottom_right%i.dat",
683  Doc_info.directory().c_str(),
684  Doc_info.number());
685  some_file.open(filename);
686  PML_bottom_right_mesh_pt->output(some_file,n_plot);
687  some_file.close();
688 
689  sprintf(filename,"%s/soln_pml_bottom_left%i.dat",Doc_info.directory().c_str(),
690  Doc_info.number());
691  some_file.open(filename);
692  PML_bottom_left_mesh_pt->output(some_file,n_plot);
693  some_file.close();
694 
695  // Output exact solution
696  //----------------------
697  sprintf(filename,"%s/exact_soln%i.dat",Doc_info.directory().c_str(),
698  Doc_info.number());
699  some_file.open(filename);
701  some_file.close();
702 
703  // Doc error and return of the square of the L2 error
704  //---------------------------------------------------
705  double error,norm;
706  sprintf(filename,"%s/error_and_norm%i.dat",Doc_info.directory().c_str(),
707  Doc_info.number());
709  error,norm);
710  some_file.open(filename);
711  some_file << sqrt(error) << std::endl;
712  some_file << sqrt(norm) << std::endl;
713  some_file.close();
714 
715  // Doc L2 error and norm of solution
716  cout << "\nNorm of error : " << sqrt(error) << endl;
717  cout << "Norm of exact solution: " << sqrt(norm) << endl;
718 
719  // Output runtime (wall clock time) in s in a file
720  sprintf(filename,"%s/wall_clock_time%i.dat",Doc_info.directory().c_str(),
721  Doc_info.number());
722  some_file.open(filename);
723  some_file << Global_Parameters::T_end-Global_Parameters::T_start << std::endl;
724  some_file.close();
725 
726  // Output number of degrees of freedom in a file
727  sprintf(filename,"%s/ndof%i.dat",Doc_info.directory().c_str(),
728  Doc_info.number());
729  some_file.open(filename);
730  some_file << this->ndof() << std::endl;
731  some_file.close();
732 
733  // Output norm of solution (to allow validation of solution even
734  // if triangle generates a slightly different mesh)
735  sprintf(filename,"%s/elast_soln_norm%i.dat",Doc_info.directory().c_str(),
736  Doc_info.number());
737  some_file.open(filename);
738  double norm_soln=0.0;
739  this->mesh_pt()->compute_norm(norm_soln);
740  some_file << sqrt(norm_soln) << std::endl;
741  cout << "Norm of computed solution: " << sqrt(norm_soln) << endl;
742 
743  // Increment label for output files
744  Doc_info.number()++;
745 
746 } //end doc
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
virtual void compute_norm(double &norm)
Definition: mesh.h:1068
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt)
Output a given Vector function at f(n_plot) points in each element.
Definition: mesh.cc:2199
virtual void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Definition: mesh.h:1140
unsigned long ndof() const
Return the number of dofs.
Definition: problem.h:1674
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
string filename
Definition: MergeRestartFiles.py:39
int error
Definition: calibrate.py:297

References oomph::DocInfo::directory(), GlobalParameters::Doc_info, calibrate::error, Global_Parameters::exact_u(), MergeRestartFiles::filename, oomph::DocInfo::number(), sqrt(), Global_Parameters::T_end, and Global_Parameters::T_start.

◆ doc_solution() [2/2]

template<class ELASTICITY_ELEMENT >
void ElasticAnnulusProblem< ELASTICITY_ELEMENT >::doc_solution ( DocInfo doc_info)

Doc the solution.

Member Data Documentation

◆ Doc_info

template<class ELASTICITY_ELEMENT >
DocInfo ElasticAnnulusProblem< ELASTICITY_ELEMENT >::Doc_info
private

DocInfo object for output.

◆ Lower_inner_boundary_id

template<class ELASTICITY_ELEMENT >
unsigned ElasticAnnulusProblem< ELASTICITY_ELEMENT >::Lower_inner_boundary_id
private

Boundary ID of lower inner boundary.

◆ Lower_outer_boundary_id

template<class ELASTICITY_ELEMENT >
unsigned ElasticAnnulusProblem< ELASTICITY_ELEMENT >::Lower_outer_boundary_id
private

Boundary ID of lower outer boundary.

◆ PML_bottom_left_mesh_pt

template<class ELASTICITY_ELEMENT >
Mesh * ElasticAnnulusProblem< ELASTICITY_ELEMENT >::PML_bottom_left_mesh_pt
private

Pointer to the bottom left corner PML mesh.

◆ PML_bottom_mesh_pt

template<class ELASTICITY_ELEMENT >
Mesh * ElasticAnnulusProblem< ELASTICITY_ELEMENT >::PML_bottom_mesh_pt
private

Pointer to the bottom PML mesh.

◆ PML_bottom_right_mesh_pt

template<class ELASTICITY_ELEMENT >
Mesh * ElasticAnnulusProblem< ELASTICITY_ELEMENT >::PML_bottom_right_mesh_pt
private

Pointer to the bottom right corner PML mesh.

◆ PML_left_mesh_pt

template<class ELASTICITY_ELEMENT >
Mesh * ElasticAnnulusProblem< ELASTICITY_ELEMENT >::PML_left_mesh_pt
private

Pointer to the left PML mesh.

◆ PML_right_mesh_pt

template<class ELASTICITY_ELEMENT >
Mesh * ElasticAnnulusProblem< ELASTICITY_ELEMENT >::PML_right_mesh_pt
private

Pointer to the right PML mesh.

◆ PML_top_left_mesh_pt

template<class ELASTICITY_ELEMENT >
Mesh * ElasticAnnulusProblem< ELASTICITY_ELEMENT >::PML_top_left_mesh_pt
private

Pointer to the top left corner PML mesh.

◆ PML_top_mesh_pt

template<class ELASTICITY_ELEMENT >
Mesh * ElasticAnnulusProblem< ELASTICITY_ELEMENT >::PML_top_mesh_pt
private

Pointer to the top PML mesh.

◆ PML_top_right_mesh_pt

template<class ELASTICITY_ELEMENT >
Mesh * ElasticAnnulusProblem< ELASTICITY_ELEMENT >::PML_top_right_mesh_pt
private

Pointer to the top right corner PML mesh.

◆ Solid_mesh_pt [1/2]

template<class ELASTICITY_ELEMENT >
RefineableTriangleMesh<ELASTICITY_ELEMENT>* ElasticAnnulusProblem< ELASTICITY_ELEMENT >::Solid_mesh_pt
private

Pointer to refineable solid mesh.

◆ Solid_mesh_pt [2/2]

template<class ELASTICITY_ELEMENT >
RectangularQuadMesh<ELASTICITY_ELEMENT>* ElasticAnnulusProblem< ELASTICITY_ELEMENT >::Solid_mesh_pt
private

Pointer to solid mesh.

◆ Upper_inner_boundary_id

template<class ELASTICITY_ELEMENT >
unsigned ElasticAnnulusProblem< ELASTICITY_ELEMENT >::Upper_inner_boundary_id
private

Boundary ID of upper inner boundary.

◆ Upper_outer_boundary_id

template<class ELASTICITY_ELEMENT >
unsigned ElasticAnnulusProblem< ELASTICITY_ELEMENT >::Upper_outer_boundary_id
private

Boundary ID of upper outer boundary.


The documentation for this class was generated from the following files: