PrescribedBoundaryDisplacementProblem< ELEMENT > Class Template Reference
+ Inheritance diagram for PrescribedBoundaryDisplacementProblem< ELEMENT >:

Public Member Functions

 PrescribedBoundaryDisplacementProblem ()
 Constructor: More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
ElasticRefineableRectangularQuadMesh< ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of Lagrange multiplier elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of Lagrange multiplier elements. More...
 
void actions_before_distribute ()
 Actions before distribute: Wipe the mesh of Lagrange multiplier elements. More...
 
void actions_after_distribute ()
 Actions after distribute: Rebuild the mesh of Lagrange multiplier elements. More...
 
void build_mesh ()
 
void doc_solution ()
 Doc the solution. More...
 
 PrescribedBoundaryDisplacementProblem ()
 Constructor: More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
ElasticRefineableRectangularQuadMesh< ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of Lagrange multiplier elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of Lagrange multiplier elements. More...
 
void actions_before_distribute ()
 Actions before distribute: Wipe the mesh of Lagrange multiplier elements. More...
 
void actions_after_distribute ()
 Actions after distribute: Rebuild the mesh of Lagrange multiplier elements. More...
 
void build_mesh ()
 
void doc_solution ()
 Doc the solution. More...
 
 PrescribedBoundaryDisplacementProblem ()
 Constructor: More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
void actions_before_distribute ()
 Before distribute: Flush face submesh. More...
 
void actions_after_distribute ()
 After distribute: Rebuild face element submesh. More...
 
RefineableElasticCubicMesh< ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of Lagrange multiplier elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of Lagrange multiplier elements. More...
 
void doc_solution ()
 Doc the solution. More...
 
 PrescribedBoundaryDisplacementProblem ()
 Constructor: More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
ElasticRefineableRectangularQuadMesh< ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of Lagrange multiplier elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of Lagrange multiplier elements. More...
 
void doc_solution ()
 Doc the solution. More...
 
 PrescribedBoundaryDisplacementProblem ()
 Constructor: More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update boundary position directly. More...
 
ElasticRefineableRectangularQuadMesh< ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
void actions_after_adapt ()
 Actions after adapt: Pin the redundant solid pressures (if any) More...
 
void doc_solution ()
 Doc the solution. More...
 
 PrescribedBoundaryDisplacementProblem (const unsigned &nel_1d)
 Constructor: Pass in number of elements along axes. More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
ElasticRefineableRectangularQuadMesh< ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of Lagrange multiplier elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of Lagrange multiplier elements. More...
 
void doc_solution ()
 Doc the solution. More...
 
 PrescribedBoundaryDisplacementProblem ()
 Constructor: More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
RefineableElasticCubicMesh< ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of Lagrange multiplier elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of Lagrange multiplier elements. More...
 
void doc_solution ()
 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 create_lagrange_multiplier_elements ()
 Create elements that impose the prescribed boundary displacement. More...
 
void delete_lagrange_multiplier_elements ()
 
void create_lagrange_multiplier_elements ()
 
void delete_lagrange_multiplier_elements ()
 
void create_lagrange_multiplier_elements ()
 
void delete_lagrange_multiplier_elements ()
 
void create_lagrange_multiplier_elements ()
 
void delete_lagrange_multiplier_elements ()
 
void create_lagrange_multiplier_elements ()
 
void delete_lagrange_multiplier_elements ()
 
void create_lagrange_multiplier_elements ()
 
void delete_lagrange_multiplier_elements ()
 

Private Attributes

ElasticRefineableRectangularQuadMesh< ELEMENT > * Solid_mesh_pt
 Pointer to solid mesh. More...
 
SolidMeshLagrange_multiplier_mesh_pt
 Pointers to meshes of Lagrange multiplier elements. More...
 
DocInfo Doc_info
 DocInfo object for output. More...
 
RefineableElasticCubicMesh< 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 ELEMENT>
class PrescribedBoundaryDisplacementProblem< ELEMENT >

Problem class for deformation of elastic block by prescribed boundary motion.

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// Problem class for deformation of elastic block by prescribed boundary motion.

Problem class for deformation of elastic DOF type by prescribed boundary motion.

Constructor & Destructor Documentation

◆ PrescribedBoundaryDisplacementProblem() [1/7]

Constructor:

228 {
229  // Create the mesh
230  build_mesh();
231 
232  // Setup equation numbering scheme
233  cout << "Number of dofs: " << assign_eqn_numbers() << std::endl;
234 
235  // Set output directory
236  Doc_info.set_directory("RESLT");
237 
238 } //end of constructor
void build_mesh()
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:247
DocInfo Doc_info
DocInfo object for output.
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:218
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Definition: problem.cc:1989

References GlobalParameters::Doc_info, and oomph::DocInfo::set_directory().

◆ PrescribedBoundaryDisplacementProblem() [2/7]

Constructor:

◆ PrescribedBoundaryDisplacementProblem() [3/7]

Constructor:

◆ PrescribedBoundaryDisplacementProblem() [4/7]

Constructor:

◆ PrescribedBoundaryDisplacementProblem() [5/7]

Constructor:

◆ PrescribedBoundaryDisplacementProblem() [6/7]

template<class ELEMENT >
PrescribedBoundaryDisplacementProblem< ELEMENT >::PrescribedBoundaryDisplacementProblem ( const unsigned nel_1d)

Constructor: Pass in number of elements along axes.

360 {
361 
362  // Create the mesh
363 
364  // # of elements in x-direction
365  unsigned n_x=nel_1d;
366 
367  // # of elements in y-direction
368  unsigned n_y=nel_1d;
369 
370  // Domain length in x-direction
371  double l_x=1.0;
372 
373  // Domain length in y-direction
374  double l_y=1.0;
375 
376  //Now create the mesh
378  n_x,n_y,l_x,l_y);
379 
380  // Set error estimator
381  solid_mesh_pt()->spatial_error_estimator_pt()=new Z2ErrorEstimator;
382 
383  //Assign the physical properties to the elements before any refinement
384  //Loop over the elements in the main mesh
385  unsigned n_element =solid_mesh_pt()->nelement();
386  for(unsigned i=0;i<n_element;i++)
387  {
388  //Cast to a solid element
389  ELEMENT *el_pt = dynamic_cast<ELEMENT*>(solid_mesh_pt()->element_pt(i));
390 
391  // Set the constitutive law
392  el_pt->constitutive_law_pt()=&Global_Physical_Variables::Constitutive_law;
393  }
394 
395  // Refine the mesh uniformly
396  solid_mesh_pt()->refine_uniformly();
397 
398  // Construct the mesh of elements that enforce prescribed boundary motion
399  // by Lagrange multipliers
402 
403  // Solid mesh is first sub-mesh
405 
406  // Add Lagrange multiplier sub-mesh
408 
409  // Build combined "global" mesh
411 
412  // Pin nodal positions on all boundaries apart from the top one (2)
413  for (unsigned b=0;b<4;b++)
414  {
415  if (b!=2)
416  {
417  unsigned n_side = solid_mesh_pt()->nboundary_node(b);
418 
419  //Loop over the nodes
420  for(unsigned i=0;i<n_side;i++)
421  {
422  solid_mesh_pt()->boundary_node_pt(b,i)->pin_position(0);
423  solid_mesh_pt()->boundary_node_pt(b,i)->pin_position(1);
424  }
425  }
426  }
427 
428  // Pin the redundant solid pressures (if any)
430  solid_mesh_pt()->element_pt());
431 
432  // Setup equation numbering scheme
433  cout << "Number of dofs: " << assign_eqn_numbers() << std::endl;
434 
435  // Set output directory
436  Doc_info.set_directory("RESLT");
437 
438  // Create the linear solver
439  IterativeLinearSolver* solver_pt=0;
440 
441  // If we have trilinos, use it
442 #ifdef OOMPH_HAS_TRILINOS
443 
444  // Create solver
445  solver_pt = new TrilinosAztecOOSolver;
446 
447  // Use GMRES
448  dynamic_cast<TrilinosAztecOOSolver*>(solver_pt)->solver_type()
449  = TrilinosAztecOOSolver::GMRES;
450 
451 #else
452 
453  // Use oomph-lib's own GMRES
454  solver_pt = new GMRES<CRDoubleMatrix>;
455 
456 #endif
457 
458  // Set solver
459  linear_solver_pt() = solver_pt;
460 
461  // Create the preconditioner
463 
464  // Set solid and lagrange multiplier meshes
467 
468  // Set the preconditioner
469  solver_pt->preconditioner_pt() = prec_pt;
470 
471  // Use upper block triangular preconditioner for elastic block?
473  ("--block_upper_for_elastic_block"))
474  {
475  prec_pt->elastic_preconditioner_type()=
476  PseudoElasticPreconditioner::Block_upper_triangular_preconditioner;
477  }
478 
479 #ifdef OOMPH_HAS_HYPRE
480 
481  // Use Hypre as subsidiary preconditioner (inexact solver) for
482  // linear (sub-)systems to be solved in the elastic block?
484  ("--hypre_for_elastic_blocks"))
485  {
487  (Pseudo_Elastic_Preconditioner_Subsidiary_Operator_Helper::
488  get_elastic_preconditioner_hypre);
489  }
490 
491 #endif
492 
493 
494 #ifdef OOMPH_HAS_TRILINOS
495 
496  // Use Trilinos CG as subsidiary preconditioner (inexact solver) for
497  // linear (sub-)systems to be solved in the Lagrange multiplier block?
499  ("--trilinos_cg_for_lagrange_multiplier_blocks"))
500  {
502  (Pseudo_Elastic_Preconditioner_Subsidiary_Operator_Helper::
503  get_lagrange_multiplier_preconditioner);
504  }
505 
506 #endif
507 
508  // Use diagonal scaling as subsidiary preconditioner (inexact solver) for
509  // linear (sub-)systems to be solved in the elastic block?
511  ("--diagonal_scaling_for_elastic_blocks"))
512  {
515  }
516 
517 } //end of constructor
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Scalar * b
Definition: benchVecAdd.cpp:17
ElasticRefineableRectangularQuadMesh< ELEMENT > * Solid_mesh_pt
Pointer to solid mesh.
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:212
SolidMesh * Lagrange_multiplier_mesh_pt
Pointers to meshes of Lagrange multiplier elements.
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:215
ElasticRefineableRectangularQuadMesh< ELEMENT > *& solid_mesh_pt()
Access function for the solid mesh.
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:173
void create_lagrange_multiplier_elements()
Create elements that impose the prescribed boundary displacement.
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:368
Definition: rectangular_quadmesh.template.h:573
The GMRES method.
Definition: iterative_linear_solver.h:1227
Definition: iterative_linear_solver.h:54
Preconditioner *& preconditioner_pt()
Access function to preconditioner.
Definition: iterative_linear_solver.h:95
Definition: solid_elements.h:58
unsigned add_sub_mesh(Mesh *const &mesh_pt)
Definition: problem.h:1330
LinearSolver *& linear_solver_pt()
Return a pointer to the linear solver object.
Definition: problem.h:1466
void build_global_mesh()
Definition: problem.cc:1493
Definition: pseudo_elastic_preconditioner.h:100
Elastic_preconditioner_type & elastic_preconditioner_type()
Definition: pseudo_elastic_preconditioner.h:229
void set_lagrange_multiplier_mesh(Mesh *mesh_pt)
Definition: pseudo_elastic_preconditioner.h:185
void set_lagrange_multiplier_subsidiary_preconditioner(SubsidiaryPreconditionerFctPt prec_fn)
Definition: pseudo_elastic_preconditioner.h:206
void set_elastic_subsidiary_preconditioner(SubsidiaryPreconditionerFctPt prec_fn)
Definition: pseudo_elastic_preconditioner.h:216
void set_elastic_mesh(Mesh *mesh_pt)
Definition: pseudo_elastic_preconditioner.h:178
Definition: mesh.h:2562
Definition: trilinos_solver.h:267
Definition: error_estimator.h:266
Preconditioner * get_diagonal_preconditioner()
Definition: prescribed_displ_lagr_mult_precond.cc:174
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(), GlobalParameters::Doc_info, oomph::PseudoElasticPreconditioner::elastic_preconditioner_type(), DiagonalPreconditionerHelper::get_diagonal_preconditioner(), i, oomph::IterativeLinearSolver::preconditioner_pt(), oomph::DocInfo::set_directory(), oomph::PseudoElasticPreconditioner::set_elastic_mesh(), oomph::PseudoElasticPreconditioner::set_elastic_subsidiary_preconditioner(), oomph::PseudoElasticPreconditioner::set_lagrange_multiplier_mesh(), and oomph::PseudoElasticPreconditioner::set_lagrange_multiplier_subsidiary_preconditioner().

◆ PrescribedBoundaryDisplacementProblem() [7/7]

Constructor:

Member Function Documentation

◆ actions_after_adapt() [1/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_adapt
virtual

Actions after adapt: Rebuild the mesh of Lagrange multiplier elements.

Actions after adapt: Rebuild the mesh of elements that impose the prescribed boundary displacements

Reimplemented from oomph::Problem.

346 {
347  // Create the elements that impose the displacement constraint
348  // and attach them to the bulk elements that are
349  // adjacent to boundary 2
351 
352  // Rebuild the Problem's global mesh from its various sub-meshes
354 
355  // Pin the redundant solid pressures (if any)
357  solid_mesh_pt()->element_pt());
358 
359 }// end of actions_after_adapt
void rebuild_global_mesh()
Definition: problem.cc:1533

◆ actions_after_adapt() [2/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_adapt ( )
virtual

Actions after adapt: Rebuild the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_after_adapt() [3/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_adapt ( )
virtual

Actions after adapt: Rebuild the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_after_adapt() [4/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_adapt ( )
virtual

Actions after adapt: Rebuild the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_after_adapt() [5/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_adapt ( )
inlinevirtual

Actions after adapt: Pin the redundant solid pressures (if any)

Reimplemented from oomph::Problem.

174  {
176  solid_mesh_pt()->element_pt());
177  }

◆ actions_after_adapt() [6/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_adapt ( )
virtual

Actions after adapt: Rebuild the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_after_adapt() [7/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_adapt ( )
virtual

Actions after adapt: Rebuild the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_after_distribute() [1/3]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_distribute
inline

Actions after distribute: Rebuild the mesh of Lagrange multiplier elements.

Actions after distribute: Rebuild the mesh of elements that impose the prescribed boundary displacements

190  {
192  }
void actions_after_adapt()
Actions after adapt: Rebuild the mesh of Lagrange multiplier elements.
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:345

◆ actions_after_distribute() [2/3]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_distribute ( )
inline

Actions after distribute: Rebuild the mesh of Lagrange multiplier elements.

194  {
196  }

◆ actions_after_distribute() [3/3]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_distribute ( )

After distribute: Rebuild face element submesh.

◆ actions_after_newton_solve() [1/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

167 {}

◆ actions_after_newton_solve() [2/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

171 {}

◆ actions_after_newton_solve() [3/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

254 {}

◆ actions_after_newton_solve() [4/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

167 {}

◆ actions_after_newton_solve() [5/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

140 {}

◆ actions_after_newton_solve() [6/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

314 {}

◆ actions_after_newton_solve() [7/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

309 {}

◆ actions_before_adapt() [1/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_adapt
virtual

Actions before adapt: Wipe the mesh of Lagrange multiplier elements.

Actions before adapt: Wipe the mesh of elements that impose the prescribed boundary displacements

Reimplemented from oomph::Problem.

329 {
330  // Kill the elements and wipe surface mesh
332 
333  // Rebuild the Problem's global mesh from its various sub-meshes
335 
336 }// end of actions_before_adapt
void delete_lagrange_multiplier_elements()
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:442

◆ actions_before_adapt() [2/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_adapt ( )
virtual

Actions before adapt: Wipe the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_before_adapt() [3/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_adapt ( )
virtual

Actions before adapt: Wipe the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_before_adapt() [4/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_adapt ( )
virtual

Actions before adapt: Wipe the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_before_adapt() [5/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_adapt ( )
virtual

Actions before adapt: Wipe the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_before_adapt() [6/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_adapt ( )
virtual

Actions before adapt: Wipe the mesh of Lagrange multiplier elements.

Reimplemented from oomph::Problem.

◆ actions_before_distribute() [1/3]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_distribute
inline

Actions before distribute: Wipe the mesh of Lagrange multiplier elements.

Actions before distribute: Wipe the mesh of elements that impose the prescribed boundary displacements

184  {
186  }
void actions_before_adapt()
Actions before adapt: Wipe the mesh of Lagrange multiplier elements.
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:328

◆ actions_before_distribute() [2/3]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_distribute ( )
inline

Actions before distribute: Wipe the mesh of Lagrange multiplier elements.

188  {
190  }

◆ actions_before_distribute() [3/3]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_distribute ( )

Before distribute: Flush face submesh.

◆ actions_before_newton_solve() [1/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

170 {}

◆ actions_before_newton_solve() [2/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

174 {}

◆ actions_before_newton_solve() [3/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

257 {}

◆ actions_before_newton_solve() [4/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

170 {}

◆ actions_before_newton_solve() [5/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update boundary position directly.

Reimplemented from oomph::Problem.

144  {
145 
146  // Loop over all nodes on top boundary (boundary 2)
147  unsigned b=2;
148  unsigned n_nod = solid_mesh_pt()->nboundary_node(b);
149  for(unsigned i=0;i<n_nod;i++)
150  {
151  Node* nod_pt= solid_mesh_pt()->boundary_node_pt(b,i);
152 
153  // Get boundary coordinate associated with boundary 2
154  Vector<double> zeta(1);
156 
157  // Get prescribed position from GeomObject
158  Vector<double> r(2);
160 
161  // Update position
162  nod_pt->x(0)=r[0];
163  nod_pt->x(1)=r[1];
164  }
165 
166  } // end actions_before_newton_solve
void position(const Vector< double > &zeta, Vector< double > &r) const
Position vector at Lagrangian coordinate zeta.
Definition: heated_linear_solid_contact_with_gravity.cc:2022
Definition: nodes.h:906
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
virtual void get_coordinates_on_boundary(const unsigned &b, const unsigned &k, Vector< double > &boundary_zeta)
Definition: nodes.cc:2379
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
WarpedLine Boundary_geom_object(0.0)
GeomObject specifying the shape of the boundary: Initially it's flat.
r
Definition: UniformPSDSelfTest.py:20

References b, Global_Physical_Variables::Boundary_geom_object, oomph::Node::get_coordinates_on_boundary(), i, WarpedLine::position(), UniformPSDSelfTest::r, oomph::Node::x(), and Eigen::zeta().

◆ actions_before_newton_solve() [6/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

317 {}

◆ actions_before_newton_solve() [7/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

312 {}

◆ build_mesh() [1/2]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::build_mesh

Helper function to build mesh (needed during load balancing and also used by constructor)

Helper function to build mesh. Required during load balancing and also called from problem constructor.

248 {
249 
250  // Create the mesh
251 
252  // # of elements in x-direction
253  unsigned n_x=5;
254 
255  // # of elements in y-direction
256  unsigned n_y=5;
257 
258  // Domain length in x-direction
259  double l_x=1.0;
260 
261  // Domain length in y-direction
262  double l_y=1.0;
263 
264  //Now create the mesh
266  n_x,n_y,l_x,l_y);
267 
268  // Set error estimator
269  solid_mesh_pt()->spatial_error_estimator_pt()=new Z2ErrorEstimator;
270 
271  //Assign the physical properties to the elements before any refinement
272  //Loop over the elements in the main mesh
273  unsigned n_element =solid_mesh_pt()->nelement();
274  for(unsigned i=0;i<n_element;i++)
275  {
276  //Cast to a solid element
277  ELEMENT *el_pt = dynamic_cast<ELEMENT*>(solid_mesh_pt()->element_pt(i));
278 
279  // Set the constitutive law
280  el_pt->constitutive_law_pt()=&Global_Physical_Variables::Constitutive_law;
281  }
282 
283  // Refine the mesh uniformly
284  solid_mesh_pt()->refine_uniformly();
285 
286  // Construct the mesh of elements that enforce prescribed boundary motion
287  // by Lagrange multipliers
290 
291  // Solid mesh is first sub-mesh
293 
294  // Add Lagrange multiplier sub-mesh
296 
297  // Build combined "global" mesh
299 
300  // Pin nodal positions on all boundaries apart from the top one (2)
301  for (unsigned b=0;b<4;b++)
302  {
303  if (b!=2)
304  {
305  unsigned n_side = solid_mesh_pt()->nboundary_node(b);
306 
307  //Loop over the nodes
308  for(unsigned i=0;i<n_side;i++)
309  {
310  solid_mesh_pt()->boundary_node_pt(b,i)->pin_position(0);
311  solid_mesh_pt()->boundary_node_pt(b,i)->pin_position(1);
312  }
313  }
314  }
315 
316  // Pin the redundant solid pressures (if any)
318  solid_mesh_pt()->element_pt());
319 
320 } //end of build mesh function

References b, and i.

◆ build_mesh() [2/2]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::build_mesh ( )

Helper function to build mesh (needed during load balancing and also used by constructor)

◆ create_lagrange_multiplier_elements() [1/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::create_lagrange_multiplier_elements
private

Create elements that impose the prescribed boundary displacement.

Create elements that enforce prescribed boundary motion by Lagrange multiplilers

369 {
370  // Lagrange multiplier elements are located on boundary 2:
371  unsigned b=2;
372 
373  // How many bulk elements are adjacent to boundary b?
374  unsigned n_element = solid_mesh_pt()->nboundary_element(b);
375 
376  // Loop over the bulk elements adjacent to boundary b?
377  for(unsigned e=0;e<n_element;e++)
378  {
379  // Get pointer to the bulk element that is adjacent to boundary b
380  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
381  solid_mesh_pt()->boundary_element_pt(b,e));
382 
383  //Find the index of the face of element e along boundary b
384  int face_index = solid_mesh_pt()->face_index_at_boundary(b,e);
385 
386  // Create new element and add to mesh
389  bulk_elem_pt,face_index));
390  }
391 
392 
393  // Loop over the elements in the Lagrange multiplier element mesh
394  // for elements on the top boundary (boundary 2)
396  for(unsigned i=0;i<n_element;i++)
397  {
398  //Cast to a Lagrange multiplier element
402 
403  // Set the GeomObject that defines the boundary shape and
404  // specify which bulk boundary we are attached to (needed to extract
405  // the boundary coordinate from the bulk nodes)
408 
409  // Loop over the nodes
410  unsigned nnod=el_pt->nnode();
411  for (unsigned j=0;j<nnod;j++)
412  {
413  Node* nod_pt = el_pt->node_pt(j);
414 
415  // Is the node also on boundary 1 or 3?
416  if ((nod_pt->is_on_boundary(1))||(nod_pt->is_on_boundary(3)))
417  {
418  // How many nodal values were used by the "bulk" element
419  // that originally created this node?
420  unsigned n_bulk_value=el_pt->nbulk_value(j);
421 
422  // The remaining ones are Lagrange multipliers and we pin them.
423  unsigned nval=nod_pt->nvalue();
424  for (unsigned j=n_bulk_value;j<nval;j++)
425  {
426  nod_pt->pin(j);
427  }
428  }
429  }
430  }
431 
432 } // end of create_lagrange_multiplier_elements
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
unsigned & nbulk_value(const unsigned &n)
Definition: elements.h:4845
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
Definition: solid_traction_elements.h:1107
void set_boundary_shape_geom_object_pt(GeomObject *boundary_shape_geom_object_pt, const unsigned &boundary_number_in_bulk_mesh)
Definition: solid_traction_elements.h:1209
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
void add_element_pt(GeneralisedElement *const &element_pt)
Add a (pointer to) an element to the mesh.
Definition: mesh.h:617
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
virtual bool is_on_boundary() const
Definition: nodes.h:1373
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References b, Global_Physical_Variables::Boundary_geom_object, e(), i, oomph::Node::is_on_boundary(), j, oomph::FaceElement::nbulk_value(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Data::nvalue(), oomph::Data::pin(), and oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::set_boundary_shape_geom_object_pt().

◆ create_lagrange_multiplier_elements() [2/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::create_lagrange_multiplier_elements ( )
private

Create elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ create_lagrange_multiplier_elements() [3/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::create_lagrange_multiplier_elements ( )
private

Create elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ create_lagrange_multiplier_elements() [4/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::create_lagrange_multiplier_elements ( )
private

Create elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ create_lagrange_multiplier_elements() [5/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::create_lagrange_multiplier_elements ( )
private

Create elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ create_lagrange_multiplier_elements() [6/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::create_lagrange_multiplier_elements ( )
private

Create elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ delete_lagrange_multiplier_elements() [1/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::delete_lagrange_multiplier_elements
private

Delete elements that enforce prescribed boundary motion by Lagrange multiplilers

Delete elements that impose the prescribed boundary displacement and wipe the associated mesh

443 {
444  // How many surface elements are in the surface mesh
445  unsigned n_element = Lagrange_multiplier_mesh_pt->nelement();
446 
447  // Loop over the surface elements
448  for(unsigned e=0;e<n_element;e++)
449  {
450  // Kill surface element
452  }
453 
454  // Wipe the mesh
456 
457 } // end of delete_lagrange_multiplier_elements
void flush_element_and_node_storage()
Definition: mesh.h:407

References e().

◆ delete_lagrange_multiplier_elements() [2/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::delete_lagrange_multiplier_elements ( )
private

Delete elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ delete_lagrange_multiplier_elements() [3/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::delete_lagrange_multiplier_elements ( )
private

Delete elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ delete_lagrange_multiplier_elements() [4/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::delete_lagrange_multiplier_elements ( )
private

Delete elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ delete_lagrange_multiplier_elements() [5/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::delete_lagrange_multiplier_elements ( )
private

Delete elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ delete_lagrange_multiplier_elements() [6/6]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::delete_lagrange_multiplier_elements ( )
private

Delete elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ doc_solution() [1/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::doc_solution

Doc the solution.

466 {
467 
468  ofstream some_file;
469  char filename[100];
470 
471  // Number of plot points
472  unsigned n_plot = 5;
473 
474  oomph_info << "Outputting for step: " << Doc_info.number() << "\n";
475 
476  // Output shape of deformed body
477  //------------------------------
478  sprintf(filename,"%s/soln%i_on_proc%i.dat",Doc_info.directory().c_str(),
479  Doc_info.number(),this->communicator_pt()->my_rank());
480  some_file.open(filename);
481  solid_mesh_pt()->output(some_file,n_plot);
482  some_file.close();
483 
484  // Output Lagrange multipliers
485  //----------------------------
486  sprintf(filename,"%s/lagr%i_on_proc%i.dat",Doc_info.directory().c_str(),
487  Doc_info.number(),this->communicator_pt()->my_rank());
488  some_file.open(filename);
489 
490  // This makes sure the elements are ordered in same way every time
491  // the code is run -- necessary for validation tests.
492  std::vector<FiniteElement*> el_pt;
493  unsigned nelem=Lagrange_multiplier_mesh_pt->nelement();
494  for (unsigned e=0;e<nelem;e++)
495  {
497  }
498  std::sort(el_pt.begin(),el_pt.end(),FiniteElementComp());
499  for (unsigned e=0;e<nelem;e++)
500  {
501  el_pt[e]->output(some_file);
502  }
503  some_file.close();
504 
505  // Increment label for output files
506  Doc_info.number()++;
507 
508 } //end doc
Definition: heated_linear_solid_contact_with_gravity.cc:1970
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
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
string filename
Definition: MergeRestartFiles.py:39
OomphInfo oomph_info
Definition: oomph_definitions.cc:319

References oomph::DocInfo::directory(), GlobalParameters::Doc_info, e(), MergeRestartFiles::filename, oomph::DocInfo::number(), and oomph::oomph_info.

◆ doc_solution() [2/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::doc_solution ( )

Doc the solution.

◆ doc_solution() [3/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::doc_solution ( )

Doc the solution.

◆ doc_solution() [4/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::doc_solution ( )

Doc the solution.

◆ doc_solution() [5/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::doc_solution ( )

Doc the solution.

◆ doc_solution() [6/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::doc_solution ( )

Doc the solution.

◆ doc_solution() [7/7]

template<class ELEMENT >
void PrescribedBoundaryDisplacementProblem< ELEMENT >::doc_solution ( )

Doc the solution.

◆ solid_mesh_pt() [1/7]

template<class ELEMENT >
ElasticRefineableRectangularQuadMesh<ELEMENT>*& PrescribedBoundaryDisplacementProblem< ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

174  {return Solid_mesh_pt;}

◆ solid_mesh_pt() [2/7]

template<class ELEMENT >
ElasticRefineableRectangularQuadMesh<ELEMENT>*& PrescribedBoundaryDisplacementProblem< ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

178  {return Solid_mesh_pt;}

◆ solid_mesh_pt() [3/7]

template<class ELEMENT >
RefineableElasticCubicMesh<ELEMENT>*& PrescribedBoundaryDisplacementProblem< ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

267  {return Solid_mesh_pt;}

◆ solid_mesh_pt() [4/7]

template<class ELEMENT >
ElasticRefineableRectangularQuadMesh<ELEMENT>*& PrescribedBoundaryDisplacementProblem< ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

174  {return Solid_mesh_pt;}

◆ solid_mesh_pt() [5/7]

template<class ELEMENT >
ElasticRefineableRectangularQuadMesh<ELEMENT>*& PrescribedBoundaryDisplacementProblem< ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

170  {return Solid_mesh_pt;}

◆ solid_mesh_pt() [6/7]

template<class ELEMENT >
ElasticRefineableRectangularQuadMesh<ELEMENT>*& PrescribedBoundaryDisplacementProblem< ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

321  {return Solid_mesh_pt;}

◆ solid_mesh_pt() [7/7]

template<class ELEMENT >
RefineableElasticCubicMesh<ELEMENT>*& PrescribedBoundaryDisplacementProblem< ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

324  {return Solid_mesh_pt;}

Member Data Documentation

◆ Doc_info

template<class ELEMENT >
DocInfo PrescribedBoundaryDisplacementProblem< ELEMENT >::Doc_info
private

DocInfo object for output.

◆ Lagrange_multiplier_mesh_pt

template<class ELEMENT >
SolidMesh * PrescribedBoundaryDisplacementProblem< ELEMENT >::Lagrange_multiplier_mesh_pt
private

Pointers to meshes of Lagrange multiplier elements.

◆ Solid_mesh_pt [1/2]

template<class ELEMENT >
RefineableElasticCubicMesh< ELEMENT > * PrescribedBoundaryDisplacementProblem< ELEMENT >::Solid_mesh_pt
private

Pointer to solid mesh.

◆ Solid_mesh_pt [2/2]

template<class ELEMENT >
RefineableElasticCubicMesh<ELEMENT>* PrescribedBoundaryDisplacementProblem< ELEMENT >::Solid_mesh_pt
private

Pointer to solid mesh.


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