TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT > Class Template Reference

Problem class. More...

+ Inheritance diagram for TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >:

Public Member Functions

 TurekProblem (const double &length, const double &height)
 Constructor: Pass length and height of domain. More...
 
RefineableAlgebraicCylinderWithFlagMesh< FLUID_ELEMENT > * fluid_mesh_pt ()
 Access function for the fluid mesh. More...
 
ElasticRefineableRectangularQuadMesh< SOLID_ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
SolidMesh *& traction_mesh_pt (const unsigned &i)
 Access function for the i-th mesh of FSI traction elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Re-setup the fsi lookup scheme. More...
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_convergence_check ()
 
void actions_before_implicit_timestep ()
 Update the time-dependent influx. More...
 
 TurekProblem (const double &length, const double &height)
 Constructor: Pass length and height of domain. More...
 
RefineableAlgebraicCylinderWithFlagMesh< FLUID_ELEMENT > * fluid_mesh_pt ()
 Access function for the fluid mesh. More...
 
ElasticRefineableRectangularQuadMesh< SOLID_ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
SolidMesh *& traction_mesh_pt (const unsigned &i)
 Access function for the i-th mesh of FSI traction elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Re-setup the fsi lookup scheme. More...
 
void actions_before_distribute ()
 Actions before distribute: Remove traction elements. More...
 
void actions_after_distribute ()
 Actions after distribute: Re-setup FSI. More...
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_convergence_check ()
 
void actions_before_implicit_timestep ()
 Update the time-dependent influx. More...
 
 TurekProblem (const double &length, const double &height)
 Constructor: Pass length and height of domain. More...
 
 ~TurekProblem ()
 Destructor: clean up memory. More...
 
RefineableAlgebraicCylinderWithFlagMesh< FLUID_ELEMENT > * fluid_mesh_pt ()
 Access function for the fluid mesh. More...
 
ElasticRefineableRectangularQuadMesh< SOLID_ELEMENT > *& solid_mesh_pt ()
 Access function for the solid mesh. More...
 
SolidMesh *& traction_mesh_pt (const unsigned &i)
 Access function for the i-th mesh of FSI traction elements. More...
 
void generic_actions_after (const bool &called_from_adapt)
 Generic actions after. More...
 
void actions_after_adapt ()
 Actions after adapt: Re-setup the fsi lookup scheme. More...
 
void actions_before_distribute ()
 Actions before distribute: Remove traction elements. More...
 
void actions_after_distribute ()
 
void build_mesh ()
 Build the meshes for the problem. More...
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void actions_after_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_solve ()
 Update function (empty) More...
 
void actions_before_newton_convergence_check ()
 
void actions_before_implicit_timestep ()
 Update the time-dependent influx. 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
 
virtual void actions_before_adapt ()
 
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_fsi_traction_elements ()
 Create FSI traction elements. More...
 
void create_fsi_traction_elements ()
 Create FSI traction elements. More...
 
void delete_fsi_traction_elements ()
 Delete FSI traction elements. More...
 
void create_fsi_traction_elements ()
 Create FSI traction elements. More...
 
void delete_fsi_traction_elements ()
 Delete FSI traction elements. More...
 

Private Attributes

ElasticRefineableRectangularQuadMesh< SOLID_ELEMENT > * Solid_mesh_pt
 Pointer to solid mesh. More...
 
RefineableAlgebraicCylinderWithFlagMesh< FLUID_ELEMENT > * Fluid_mesh_pt
 Pointer to fluid mesh. More...
 
Vector< SolidMesh * > Traction_mesh_pt
 Vector of pointers to mesh of FSI traction elements. More...
 
SolidMeshCombined_traction_mesh_pt
 Combined mesh of traction elements – only used for documentation. More...
 
double Domain_height
 Overall height of domain. More...
 
double Domain_length
 Overall length of domain. More...
 
NodeSolid_control_node_pt
 Pointer to solid control node. More...
 
NodeFluid_control_node_pt
 Pointer to fluid control node. More...
 
double Fluid_control_x0
 Backed-up x coordinate of fluid control node. More...
 
double Fluid_control_x1
 Backed-up y coordinate of fluid control node. More...
 
bool I_have_the_fluid_control_node
 
Newmark< 2 > * Flag_time_stepper_pt
 The flag timestepper (consistent with BDF<2> for fluid) More...
 
Z2ErrorEstimatorSolid_error_estimator_pt
 Error estimator for the solid mesh. More...
 
BDF< 2 > * Fluid_time_stepper_pt
 The fluid timestepper. More...
 
CircleCylinder_pt
 Circle object as the central cylinder. More...
 
Z2ErrorEstimatorFluid_error_estimator_pt
 Error estimator for the fluid 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_step ()
 
virtual void actions_after_newton_step ()
 
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 FLUID_ELEMENT, class SOLID_ELEMENT>
class TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >

Problem class.

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

Constructor & Destructor Documentation

◆ TurekProblem() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem ( const double length,
const double height 
)

Constructor: Pass length and height of domain.

Left point on centreline of flag so that the top and bottom vertices merge with the cylinder.

449  Domain_length(length)
450 
451 {
452  // Increase max. number of iterations in Newton solver to
453  // accomodate possible poor initial guesses
455  Max_residuals=1.0e4;
456 
457  // Build solid mesh
458  //------------------
459 
460  // # of elements in x-direction
461  unsigned n_x=20;
462 
463  // # of elements in y-direction
464  unsigned n_y=2;
465 
466  // Domain length in y-direction
467  double l_y=Global_Parameters::H;
468 
469  // Create the flag timestepper (consistent with BDF<2> for fluid)
470  Newmark<2>* flag_time_stepper_pt=new Newmark<2>;
471  add_time_stepper_pt(flag_time_stepper_pt);
472 
475  Vector<double> origin(2);
476  origin[0]=Global_Parameters::Centre_x+
480  origin[1]=Global_Parameters::Centre_y-0.5*l_y;
481 
482  // Set length of flag so that endpoint actually stretches all the
483  // way to x=6:
484  double l_x=6.0-origin[0];
485 
486  //Now create the mesh
488  n_x,n_y,l_x,l_y,origin,flag_time_stepper_pt);
489 
490  // Set error estimator for the solid mesh
491  Z2ErrorEstimator* solid_error_estimator_pt=new Z2ErrorEstimator;
492  solid_mesh_pt()->spatial_error_estimator_pt()=solid_error_estimator_pt;
493 
494 
495  // Element that contains the control point
496  FiniteElement* el_pt=solid_mesh_pt()->finite_element_pt(n_x*n_y/2-1);
497 
498  // How many nodes does it have?
499  unsigned nnod=el_pt->nnode();
500 
501  // Get the control node
502  Solid_control_node_pt=el_pt->node_pt(nnod-1);
503 
504  std::cout << "Coordinates of solid control point "
505  << Solid_control_node_pt->x(0) << " "
506  << Solid_control_node_pt->x(1) << " " << std::endl;
507 
508  // Refine the mesh uniformly
510 
511  //Do not allow the solid mesh to be refined again
513 
514 
515  // Build mesh of solid traction elements that apply the fluid
516  //------------------------------------------------------------
517  // traction to the solid elements
518  //-------------------------------
519 
520  // Create storage for Meshes of FSI traction elements at the bottom
521  // top and left boundaries of the flag
522  Traction_mesh_pt.resize(3);
523 
524  // Now construct the traction element meshes
528 
529  // Build the FSI traction elements
531 
532  // Loop over traction elements, pass the FSI parameter and tell them
533  // the boundary number in the bulk solid mesh -- this is required so
534  // they can get access to the boundary coordinates!
535  for (unsigned bound=0;bound<3;bound++)
536  {
537  unsigned n_face_element = Traction_mesh_pt[bound]->nelement();
538  for(unsigned e=0;e<n_face_element;e++)
539  {
540  //Cast the element pointer and specify boundary number
543  (Traction_mesh_pt[bound]->element_pt(e));
544 
545  // Specify boundary number
546  elem_pt->set_boundary_number_in_bulk_mesh(bound);
547 
548  // Function that specifies the load ratios
549  elem_pt->q_pt() = &Global_Parameters::Q;
550 
551  }
552  } // build of FSISolidTractionElements is complete
553 
554 
555  // Turn the three meshes of FSI traction elements into compound
556  // geometric objects (one Lagrangian, two Eulerian coordinates)
557  // that determine the boundary of the fluid mesh
559  bottom_flag_pt=
560  new MeshAsGeomObject
561  (Traction_mesh_pt[0]);
562 
563  MeshAsGeomObject* tip_flag_pt=
564  new MeshAsGeomObject
565  (Traction_mesh_pt[1]);
566 
567  MeshAsGeomObject* top_flag_pt=
568  new MeshAsGeomObject
569  (Traction_mesh_pt[2]);
570 
571 
572  // Build fluid mesh
573  //-----------------
574 
575  //Create a new Circle object as the central cylinder
576  Circle* cylinder_pt = new Circle(Global_Parameters::Centre_x,
579 
580  // Allocate the fluid timestepper
581  BDF<2>* fluid_time_stepper_pt=new BDF<2>;
582  add_time_stepper_pt(fluid_time_stepper_pt);
583 
584  // Build fluid mesh
587  (cylinder_pt,
588  top_flag_pt,
589  bottom_flag_pt,
590  tip_flag_pt,
591  length, height,
596  fluid_time_stepper_pt);
597 
598 
599  // I happen to have found out by inspection that
600  // node 5 in the hand-coded fluid mesh is at the
601  // upstream tip of the cylinder
603 
604  // Set error estimator for the fluid mesh
605  Z2ErrorEstimator* fluid_error_estimator_pt=new Z2ErrorEstimator;
606  fluid_mesh_pt()->spatial_error_estimator_pt()=fluid_error_estimator_pt;
607 
608  // Refine uniformly
610 
611 
612  // Build combined global mesh
613  //---------------------------
614 
615  // Add Solid mesh the problem's collection of submeshes
617 
618  // Add traction sub-meshes
619  for (unsigned i=0;i<3;i++)
620  {
622  }
623 
624  // Add fluid mesh
626 
627  // Build combined "global" mesh
629 
630 
631 
632  // Apply solid boundary conditons
633  //-------------------------------
634 
635  //Solid mesh: Pin the left boundary (boundary 3) in both directions
636  unsigned n_side = mesh_pt()->nboundary_node(3);
637 
638  //Loop over the nodes
639  for(unsigned i=0;i<n_side;i++)
640  {
643  }
644 
645  // Pin the redundant solid pressures (if any)
647  solid_mesh_pt()->element_pt());
648 
649  // Apply fluid boundary conditions
650  //--------------------------------
651 
652  //Fluid mesh: Horizontal, traction-free outflow; pinned elsewhere
653  unsigned num_bound = fluid_mesh_pt()->nboundary();
654  for(unsigned ibound=0;ibound<num_bound;ibound++)
655  {
656  unsigned num_nod= fluid_mesh_pt()->nboundary_node(ibound);
657  for (unsigned inod=0;inod<num_nod;inod++)
658  {
659  // Parallel, axially traction free outflow at downstream end
660  if (ibound != 1)
661  {
662  fluid_mesh_pt()->boundary_node_pt(ibound,inod)->pin(0);
663  fluid_mesh_pt()->boundary_node_pt(ibound,inod)->pin(1);
664  }
665  else
666  {
667  fluid_mesh_pt()->boundary_node_pt(ibound,inod)->pin(1);
668  }
669  }
670  }//end_of_pin
671 
672  // Pin redundant pressure dofs in fluid mesh
675 
676 
677  // Apply boundary conditions for fluid
678  //-------------------------------------
679 
680  // Impose parabolic flow along boundary 3
681  // Current flow rate
682  double t=0.0;
683  double ampl=Global_Parameters::flux(t);
684  unsigned ibound=3;
685  unsigned num_nod= Fluid_mesh_pt->nboundary_node(ibound);
686  for (unsigned inod=0;inod<num_nod;inod++)
687  {
688  double ycoord = Fluid_mesh_pt->boundary_node_pt(ibound,inod)->x(1);
689  double uy = ampl*6.0*ycoord/Domain_height*(1.0-ycoord/Domain_height);
690  Fluid_mesh_pt->boundary_node_pt(ibound,inod)->set_value(0,uy);
691  Fluid_mesh_pt->boundary_node_pt(ibound,inod)->set_value(1,0.0);
692  }
693 
694 
695  // Complete build of solid elements
696  //---------------------------------
697 
698  //Pass problem parameters to solid elements
699  unsigned n_element =solid_mesh_pt()->nelement();
700  for(unsigned i=0;i<n_element;i++)
701  {
702  //Cast to a solid element
703  SOLID_ELEMENT *el_pt = dynamic_cast<SOLID_ELEMENT*>(
705 
706  // Set the constitutive law
707  el_pt->constitutive_law_pt() =
709 
710  //Set the body force
711  el_pt->body_force_fct_pt() = Global_Parameters::gravity;
712 
713  // Timescale ratio for solid
714  el_pt->lambda_sq_pt() = &Global_Parameters::Lambda_sq;
715  }
716 
717 
718 
719  // Complete build of fluid elements
720  //---------------------------------
721 
722  // Set physical parameters in the fluid mesh
723  unsigned nelem=fluid_mesh_pt()->nelement();
724  for (unsigned e=0;e<nelem;e++)
725  {
726  // Upcast from GeneralisedElement to the present element
727  FLUID_ELEMENT* el_pt = dynamic_cast<FLUID_ELEMENT*>
728  (fluid_mesh_pt()->element_pt(e));
729 
730  //Set the Reynolds number
731  el_pt->re_pt() = &Global_Parameters::Re;
732 
733  //Set the Womersley number
734  el_pt->re_st_pt() = &Global_Parameters::ReSt;
735 
736  }//end_of_loop
737 
738 
739 
740  // Setup FSI
741  //----------
742 
743  // Pass Strouhal number to the helper function that automatically applies
744  // the no-slip condition
746 
747  // The velocity of the fluid nodes on the wall (fluid mesh boundary 5,6,7)
748  // is set by the wall motion -- hence the no-slip condition must be
749  // re-applied whenever a node update is performed for these nodes.
750  // Such tasks may be performed automatically by the auxiliary node update
751  // function specified by a function pointer:
753  {
754  for(unsigned ibound=5;ibound<8;ibound++ )
755  {
756  unsigned num_nod= Fluid_mesh_pt->nboundary_node(ibound);
757  for (unsigned inod=0;inod<num_nod;inod++)
758  {
759  Fluid_mesh_pt->boundary_node_pt(ibound, inod)->
760  set_auxiliary_node_update_fct_pt(
762  }
763  } // done automatic application of no-slip
764 
765  // Work out which fluid dofs affect the residuals of the wall elements:
766  // We pass the boundary between the fluid and solid meshes and
767  // pointers to the meshes. The interaction boundary are boundaries 5,6,7
768  // of the 2D fluid mesh.
769  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
770  (this,5,Fluid_mesh_pt,Traction_mesh_pt[0]);
771 
772  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
773  (this,6,Fluid_mesh_pt,Traction_mesh_pt[2]);
774 
775  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
776  (this,7,Fluid_mesh_pt,Traction_mesh_pt[1]);
777  }
778 
779 
780  // Build solver/preconditioner
781  //----------------------------
782 
783  // Build iterative linear solver
784  GMRES<CRDoubleMatrix>* iterative_linear_solver_pt =
786 
787  // Set maximum number of iterations
788  iterative_linear_solver_pt->max_iter() = 100;
789 
790  // Set tolerance
791  iterative_linear_solver_pt->tolerance() = 1.0e-10;
792 
793  // Assign solver
794  linear_solver_pt()=iterative_linear_solver_pt;
795 
796  // Build preconditioner
797  FSIPreconditioner* prec_pt=new FSIPreconditioner(this);
798 
799  // Set Navier Stokes mesh:
801 
802  // Set solid mesh:
803  prec_pt->set_wall_mesh(solid_mesh_pt());
804 
805  // Retain fluid onto solid terms
807 
808  // Set preconditioner
809  iterative_linear_solver_pt->preconditioner_pt()= prec_pt;
810 
811  // By default, the LSC Preconditioner uses SuperLU as
812  // an exact preconditioner (i.e. a solver) for the
813  // momentum and Schur complement blocks.
814  // Can overwrite this by passing pointers to
815  // other preconditioners that perform the (approximate)
816  // solves of these blocks.
817 
818 #ifdef OOMPH_HAS_HYPRE
819 //Only use HYPRE if we don't have MPI enabled
820 #ifndef OOMPH_HAS_MPI
821 
822  // Create internal preconditioners used on Schur block
823  Preconditioner* P_matrix_preconditioner_pt = new HyprePreconditioner;
824 
825  HyprePreconditioner* P_hypre_solver_pt =
826  static_cast<HyprePreconditioner*>(P_matrix_preconditioner_pt);
827 
828  // Set defaults parameters for use as preconditioner on Poisson-type
829  // problem
831  set_defaults_for_2D_poisson_problem(P_hypre_solver_pt);
832 
833  // Use Hypre for the Schur complement block
835  set_p_preconditioner(P_matrix_preconditioner_pt);
836 
837  // Shut up
838  P_hypre_solver_pt->disable_doc_time();
839 
840 #endif
841 #endif
842 
843  // Assign equation numbers
844  cout << assign_eqn_numbers() << std::endl;
845 
846 
847 }//end_of_constructor
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
RefineableAlgebraicCylinderWithFlagMesh< FLUID_ELEMENT > * fluid_mesh_pt()
Access function for the fluid mesh.
Definition: interaction/turek_flag/turek_flag.cc:379
RefineableAlgebraicCylinderWithFlagMesh< FLUID_ELEMENT > * Fluid_mesh_pt
Pointer to fluid mesh.
Definition: interaction/turek_flag/turek_flag.cc:419
Node * Solid_control_node_pt
Pointer to solid control node.
Definition: interaction/turek_flag/turek_flag.cc:434
double Domain_height
Overall height of domain.
Definition: interaction/turek_flag/turek_flag.cc:428
ElasticRefineableRectangularQuadMesh< SOLID_ELEMENT > *& solid_mesh_pt()
Access function for the solid mesh.
Definition: interaction/turek_flag/turek_flag.cc:383
Vector< SolidMesh * > Traction_mesh_pt
Vector of pointers to mesh of FSI traction elements.
Definition: interaction/turek_flag/turek_flag.cc:422
SolidMesh *& traction_mesh_pt(const unsigned &i)
Access function for the i-th mesh of FSI traction elements.
Definition: interaction/turek_flag/turek_flag.cc:387
void create_fsi_traction_elements()
Create FSI traction elements.
Definition: interaction/turek_flag/turek_flag.cc:953
Node * Fluid_control_node_pt
Pointer to fluid control node.
Definition: interaction/turek_flag/turek_flag.cc:437
double Domain_length
Overall length of domain.
Definition: interaction/turek_flag/turek_flag.cc:431
AlgebraicNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global AlgebraicNode.
Definition: algebraic_elements.h:620
Definition: geom_objects.h:873
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
Definition: fsi_preconditioners.h:51
void set_navier_stokes_mesh(Mesh *mesh_pt, const bool &allow_multiple_element_type_in_navier_stokes_mesh=false)
Definition: fsi_preconditioners.h:164
void set_wall_mesh(Mesh *mesh_pt, const bool &allow_multiple_element_type_in_wall_mesh=false)
Definition: fsi_preconditioners.h:179
NavierStokesSchurComplementPreconditioner * navier_stokes_preconditioner_pt() const
Access function to the Navier Stokes preconditioner (inexact solver)
Definition: fsi_preconditioners.h:198
void use_block_triangular_version_with_fluid_on_solid()
Definition: fsi_preconditioners.h:147
Definition: solid_traction_elements.h:780
double *& q_pt()
Definition: fsi.h:248
void set_boundary_number_in_bulk_mesh(const unsigned &b)
Set function for the boundary number in bulk mesh.
Definition: elements.h:4482
Definition: elements.h:1313
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
The GMRES method.
Definition: iterative_linear_solver.h:1227
Definition: hypre_solver.h:826
void disable_doc_time()
Disable documentation of preconditioner timings.
Definition: hypre_solver.h:939
Preconditioner *& preconditioner_pt()
Access function to preconditioner.
Definition: iterative_linear_solver.h:95
double & tolerance()
Access to convergence tolerance.
Definition: iterative_linear_solver.h:107
unsigned & max_iter()
Access to max. number of iterations.
Definition: iterative_linear_solver.h:113
Definition: mesh_as_geometric_object.h:93
unsigned long nboundary_node(const unsigned &ibound) const
Return number of nodes on a particular boundary.
Definition: mesh.h:833
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
unsigned nboundary() const
Return number of boundaries.
Definition: mesh.h:827
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
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
Definition: solid_elements.h:58
Definition: preconditioner.h:54
void add_time_stepper_pt(TimeStepper *const &time_stepper_pt)
Definition: problem.cc:1545
unsigned add_sub_mesh(Mesh *const &mesh_pt)
Definition: problem.h:1330
unsigned Max_newton_iterations
Maximum number of Newton iterations.
Definition: problem.h:599
LinearSolver *& linear_solver_pt()
Return a pointer to the linear solver object.
Definition: problem.h:1466
void build_global_mesh()
Definition: problem.cc:1493
Mesh *& mesh_pt()
Return a pointer to the global mesh.
Definition: problem.h:1280
double Max_residuals
Definition: problem.h:610
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Definition: problem.cc:1989
void disable_adaptation()
Disable adaptation.
Definition: refineable_mesh.h:195
ErrorEstimator *& spatial_error_estimator_pt()
Access to spatial error estimator.
Definition: refineable_mesh.h:143
Definition: refineable_navier_stokes_elements.h:322
Definition: mesh.h:2562
SolidNode * boundary_node_pt(const unsigned &b, const unsigned &n)
Return n-th SolidNodes on b-th boundary.
Definition: mesh.h:2612
void pin_position(const unsigned &i)
Pin the nodal position.
Definition: nodes.h:1816
void refine_uniformly(DocInfo &doc_info)
Refine mesh uniformly and doc process.
Definition: refineable_mesh.cc:1772
Definition: error_estimator.h:266
#define FLUID_ELEMENT
double Centre_x
x position of centre of cylinder
Definition: interaction/turek_flag/turek_flag.cc:78
double Radius
Radius of cylinder.
Definition: interaction/turek_flag/turek_flag.cc:84
void gravity(const double &time, const Vector< double > &xi, Vector< double > &b)
Non-dimensional gravity as body force.
Definition: interaction/turek_flag/turek_flag.cc:109
double Lambda_sq
Timescale ratio (non-dim density) for solid.
Definition: interaction/pseudo_solid_collapsible_tube/pseudo_solid_collapsible_tube.cc:409
double flux(const double &t)
Flux: Pulsatile flow.
Definition: fsi_channel_with_leaflet_precond.cc:244
double Q
FSI parameter.
Definition: acoustic_fsi.cc:58
double ReSt
Womersley number: Product of Reynolds and Strouhal numbers.
Definition: fsi_channel_with_leaflet_precond.cc:225
double Re
reynolds number
Definition: adaptive_hopf.cc:54
bool Ignore_fluid_loading
Ignore fluid (default assignment for FSI1 test case)
Definition: interaction/turek_flag/turek_flag.cc:97
double H
wall thickness
Definition: interaction/pseudo_solid_collapsible_tube/pseudo_solid_collapsible_tube.cc:353
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
Definition: interaction/turek_flag/turek_flag.cc:87
double St
Strouhal number (default assignment for FSI1 test case)
Definition: interaction/turek_flag/turek_flag.cc:61
double Centre_y
y position of centre of cylinder
Definition: interaction/turek_flag/turek_flag.cc:81
double height(const double &x)
Height of domain.
Definition: simple_spine_channel.cc:429
double Strouhal_for_no_slip
Definition: fsi.cc:39
void apply_no_slip_on_moving_wall(Node *node_pt)
Definition: fsi.cc:48
void set_defaults_for_2D_poisson_problem(HyprePreconditioner *hypre_preconditioner_pt)
Definition: hypre_solver.cc:45
t
Definition: plotPSD.py:36

References oomph::Problem::add_sub_mesh(), oomph::Problem::add_time_stepper_pt(), oomph::FSI_functions::apply_no_slip_on_moving_wall(), oomph::Problem::assign_eqn_numbers(), oomph::Mesh::boundary_node_pt(), oomph::SolidMesh::boundary_node_pt(), oomph::Problem::build_global_mesh(), Global_Parameters::Centre_x, Global_Parameters::Centre_y, Global_Parameters::Constitutive_law_pt, TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_fsi_traction_elements(), oomph::RefineableMeshBase::disable_adaptation(), oomph::HyprePreconditioner::disable_doc_time(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Domain_height, e(), oomph::Mesh::element_pt(), oomph::Mesh::finite_element_pt(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Fluid_control_node_pt, FLUID_ELEMENT, TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::fluid_mesh_pt(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Fluid_mesh_pt, Global_Parameters::flux(), Global_Parameters::gravity(), Global_Parameters::H, Global_Physical_Variables::height(), i, Global_Parameters::Ignore_fluid_loading, Global_Parameters::Lambda_sq, oomph::Problem::linear_solver_pt(), oomph::IterativeLinearSolver::max_iter(), oomph::Problem::Max_newton_iterations, oomph::Problem::Max_residuals, oomph::Problem::mesh_pt(), oomph::FSIPreconditioner::navier_stokes_preconditioner_pt(), oomph::Mesh::nboundary(), oomph::Mesh::nboundary_node(), oomph::Mesh::nelement(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::AlgebraicMesh::node_pt(), oomph::Data::pin(), oomph::SolidNode::pin_position(), oomph::IterativeLinearSolver::preconditioner_pt(), Global_Parameters::Q, oomph::FSIWallElement::q_pt(), Global_Parameters::Radius, Global_Parameters::Re, oomph::TreeBasedRefineableMeshBase::refine_uniformly(), Global_Parameters::ReSt, oomph::FaceElement::set_boundary_number_in_bulk_mesh(), oomph::Hypre_default_settings::set_defaults_for_2D_poisson_problem(), oomph::FSIPreconditioner::set_navier_stokes_mesh(), oomph::Data::set_value(), oomph::FSIPreconditioner::set_wall_mesh(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Solid_control_node_pt, TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::solid_mesh_pt(), oomph::RefineableMeshBase::spatial_error_estimator_pt(), sqrt(), Global_Parameters::St, oomph::FSI_functions::Strouhal_for_no_slip, plotPSD::t, oomph::IterativeLinearSolver::tolerance(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::traction_mesh_pt(), TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Traction_mesh_pt, oomph::FSIPreconditioner::use_block_triangular_version_with_fluid_on_solid(), and oomph::Node::x().

◆ TurekProblem() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem ( const double length,
const double height 
)

Constructor: Pass length and height of domain.

◆ TurekProblem() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem ( const double length,
const double height 
)

Constructor: Pass length and height of domain.

◆ ~TurekProblem()

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::~TurekProblem ( )
inline

Destructor: clean up memory.

380  {
381  // Delete the old MeshAsGeomObjects
382  delete this->fluid_mesh_pt()->bottom_flag_pt();
383  delete this->fluid_mesh_pt()->top_flag_pt();
384  delete this->fluid_mesh_pt()->tip_flag_pt();
385 
386  // Kill traction meshes
387  for (unsigned b=0;b<3;b++)
388  {
389  delete this->Traction_mesh_pt[b];
390  }
391 
392  delete linear_solver_pt();
393  delete time_stepper_pt(0);
394  delete time_stepper_pt(1);
395  delete dynamic_cast<CylinderWithFlagDomain*>(this->fluid_mesh_pt()->
396  domain_pt())->cylinder_pt();
397  delete this->solid_mesh_pt()->spatial_error_estimator_pt();
398  delete this->solid_mesh_pt();
399  delete this->fluid_mesh_pt()->spatial_error_estimator_pt();
400  delete this->fluid_mesh_pt();
401 
403  }
Scalar * b
Definition: benchVecAdd.cpp:17
GeomObject * top_flag_pt() const
Definition: cylinder_with_flag_mesh.template.h:254
GeomObject * bottom_flag_pt() const
Definition: cylinder_with_flag_mesh.template.h:246
GeomObject * tip_flag_pt() const
Definition: cylinder_with_flag_mesh.template.h:261
Domain for cylinder with flag as in Turek benchmark.
Definition: cylinder_with_flag_domain.h:42
TimeStepper *& time_stepper_pt()
Definition: problem.h:1524

References b, and Global_Parameters::Constitutive_law_pt.

Member Function Documentation

◆ actions_after_adapt() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_adapt
virtual

Actions after adapt: Re-setup the fsi lookup scheme.

Actions after adapt: Re-setup traction elements and FSI.

Actions after adapt: Re-setup FSI.

Reimplemented from oomph::Problem.

896 {
897  // Unpin all pressure dofs
899  unpin_all_pressure_dofs(fluid_mesh_pt()->element_pt());
900 
901  // Pin redundant pressure dofs
904 
905  // Unpin all solid pressure dofs
908 
909  // Pin the redundant solid pressures (if any)
911  solid_mesh_pt()->element_pt());
912 
913 
914  // The velocity of the fluid nodes on the wall (fluid mesh boundary 5,6,7)
915  // is set by the wall motion -- hence the no-slip condition must be
916  // re-applied whenever a node update is performed for these nodes.
917  // Such tasks may be performed automatically by the auxiliary node update
918  // function specified by a function pointer:
920  {
921  for(unsigned ibound=5;ibound<8;ibound++ )
922  {
923  unsigned num_nod= Fluid_mesh_pt->nboundary_node(ibound);
924  for (unsigned inod=0;inod<num_nod;inod++)
925  {
926  Fluid_mesh_pt->boundary_node_pt(ibound, inod)->
927  set_auxiliary_node_update_fct_pt(
929  }
930  }
931 
932 
933  // Re-setup the fluid load information for fsi solid traction elements
934  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
935  (this,5,Fluid_mesh_pt,Traction_mesh_pt[0]);
936 
937  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
938  (this,6,Fluid_mesh_pt,Traction_mesh_pt[2]);
939 
940  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
941  (this,7,Fluid_mesh_pt,Traction_mesh_pt[1]);
942  }
943 
944 
945 }// end of actions_after_adapt

References oomph::FSI_functions::apply_no_slip_on_moving_wall(), and Global_Parameters::Ignore_fluid_loading.

◆ actions_after_adapt() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_adapt ( )
virtual

Actions after adapt: Re-setup the fsi lookup scheme.

Reimplemented from oomph::Problem.

◆ actions_after_adapt() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_adapt ( )
inlinevirtual

Actions after adapt: Re-setup the fsi lookup scheme.

Reimplemented from oomph::Problem.

422  {
423  bool called_from_adapt=true;
424  generic_actions_after(called_from_adapt);
425  }
void generic_actions_after(const bool &called_from_adapt)
Generic actions after.
Definition: turek_flag_load_balance.cc:981

◆ actions_after_distribute() [1/2]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_distribute

Actions after distribute: Re-setup FSI.

Actions after distribute: Add traction elements, re-setup the fsi lookup scheme

1090 {
1091  // The solid mesh has now been distributed, so it now has halo elements
1092  // on certain processors. The traction elements attached to these new
1093  // halo elements need to be halo themselves, so we need to delete the
1094  // old ones and re-attach new ones. Recall that FaceElements attached
1095  // to bulk halo elements become halos themselves.
1097 
1098  // (Re-)Build the FSI traction elements
1100 
1101  // Loop over traction elements, pass the FSI parameter and tell them
1102  // the boundary number in the bulk solid mesh -- this is required so
1103  // they can get access to the boundary coordinates!
1104  for (unsigned bound=0;bound<3;bound++)
1105  {
1106  unsigned n_face_element = Traction_mesh_pt[bound]->nelement();
1107  for(unsigned e=0;e<n_face_element;e++)
1108  {
1109  //Cast the element pointer and specify boundary number
1112  (Traction_mesh_pt[bound]->element_pt(e));
1113 
1114  // Specify boundary number
1115  elem_pt->set_boundary_number_in_bulk_mesh(bound);
1116 
1117  // Function that specifies the load ratios
1118  elem_pt->q_pt() = &Global_Parameters::Q;
1119 
1120  }
1121  } // build of FSISolidTractionElements is complete
1122 
1123 
1124  // Turn the three meshes of FSI traction elements into compound
1125  // geometric objects (one Lagrangian, two Eulerian coordinates)
1126  // that determine particular boundaries of the fluid mesh
1128  bottom_flag_pt=
1129  new MeshAsGeomObject
1130  (Traction_mesh_pt[0]);
1131 
1132  MeshAsGeomObject* tip_flag_pt=
1133  new MeshAsGeomObject
1134  (Traction_mesh_pt[1]);
1135 
1136  MeshAsGeomObject* top_flag_pt=
1137  new MeshAsGeomObject
1138  (Traction_mesh_pt[2]);
1139 
1140 
1141  // Delete the old MeshAsGeomObjects and tell the fluid mesh
1142  // about the new ones.
1143  delete fluid_mesh_pt()->bottom_flag_pt();
1144  fluid_mesh_pt()->set_bottom_flag_pt(bottom_flag_pt);
1145  delete fluid_mesh_pt()->top_flag_pt();
1146  fluid_mesh_pt()->set_top_flag_pt(top_flag_pt);
1147  delete fluid_mesh_pt()->tip_flag_pt();
1148  fluid_mesh_pt()->set_tip_flag_pt(tip_flag_pt);
1149 
1150  // Call update_node_update for all the fluid mesh nodes, as the
1151  // geometric objects representing the fluid mesh boundaries have changed
1152  unsigned n_fluid_node=fluid_mesh_pt()->nnode();
1153  for (unsigned n=0;n<n_fluid_node;n++)
1154  {
1155  // Get the (algebraic) node
1156  AlgebraicNode* alg_nod_pt=dynamic_cast<AlgebraicNode*>
1157  (fluid_mesh_pt()->node_pt(n));
1158 
1159  // Call update_node_update for this node
1160  fluid_mesh_pt()->update_node_update(alg_nod_pt);
1161  }
1162 
1163  // Add the traction meshes back to the problem
1164  for (unsigned i=0;i<3;i++)
1165  {
1167  }
1168 
1169  // Rebuild global mesh
1171 
1172  // If the solid is to be loaded by the fluid, then set up the interaction
1173  // and specify the velocity of the fluid nodes based on the wall motion
1175  {
1176 
1177 #ifdef OLD_FSI
1178 
1179  // Re-setup the fluid load information for fsi solid traction elements
1180  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
1181  (this,5,Fluid_mesh_pt,Traction_mesh_pt[0]);
1182 
1183  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
1184  (this,6,Fluid_mesh_pt,Traction_mesh_pt[2]);
1185 
1186  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
1187  (this,7,Fluid_mesh_pt,Traction_mesh_pt[1]);
1188 
1189 #else
1190 
1191  // Package fsi solid traction meshes and boundary IDs in
1192  // fluid mesh
1193  Vector<unsigned> fluid_fsi_boundary_id(3);
1195  fluid_fsi_boundary_id[0]=5;
1197  fluid_fsi_boundary_id[1]=6;
1199  fluid_fsi_boundary_id[2]=7;
1201 
1202  // Vector based FSI setup
1203  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
1204  (this,fluid_fsi_boundary_id,Fluid_mesh_pt,
1206 
1207 #endif
1208 
1209  // The velocity of the fluid nodes on the wall (fluid mesh boundary 5,6,7)
1210  // is set by the wall motion -- hence the no-slip condition must be
1211  // re-applied whenever a node update is performed for these nodes.
1212  // Such tasks may be performed automatically by the auxiliary node update
1213  // function specified by a function pointer:
1214  for(unsigned ibound=5;ibound<8;ibound++ )
1215  {
1216  unsigned num_nod= Fluid_mesh_pt->nboundary_node(ibound);
1217  for (unsigned inod=0;inod<num_nod;inod++)
1218  {
1219  Fluid_mesh_pt->boundary_node_pt(ibound, inod)->
1220  set_auxiliary_node_update_fct_pt(
1222  }
1223  }
1224 
1225  } // end of (re-)assignment of the auxiliary node update fct
1226 
1227  // Re-set control nodes
1228 
1229  // Loop over fluid nodes
1230  unsigned n_fluid_nod=fluid_mesh_pt()->nnode();
1231  for (unsigned j=0;j<n_fluid_nod;j++)
1232  {
1233  if ((fluid_mesh_pt()->node_pt(j)->x(0)==Fluid_control_x0) &&
1234  (fluid_mesh_pt()->node_pt(j)->x(1)==Fluid_control_x1))
1235  {
1236  // The node still exists on this process...
1238  break;
1239  }
1240 
1241  // if the end has been reached then we've lost the control node
1242  if (j==n_fluid_nod-1)
1243  {
1245  }
1246  }
1247 
1248 } // end of actions after distribute
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
double Fluid_control_x0
Backed-up x coordinate of fluid control node.
Definition: mpi/multi_domain/turek_flag/turek_flag.cc:450
double Fluid_control_x1
Backed-up y coordinate of fluid control node.
Definition: mpi/multi_domain/turek_flag/turek_flag.cc:453
bool I_have_the_fluid_control_node
Definition: mpi/multi_domain/turek_flag/turek_flag.cc:457
void delete_fsi_traction_elements()
Delete FSI traction elements.
Definition: mpi/multi_domain/turek_flag/turek_flag.cc:1308
void set_tip_flag_pt(GeomObject *tip_flag_pt)
Definition: cylinder_with_flag_mesh.template.h:237
void set_bottom_flag_pt(GeomObject *bottom_flag_pt)
Definition: cylinder_with_flag_mesh.template.h:219
void set_top_flag_pt(GeomObject *top_flag_pt)
Definition: cylinder_with_flag_mesh.template.h:228
Definition: algebraic_elements.h:55
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
void rebuild_global_mesh()
Definition: problem.cc:1533
void update_node_update(AlgebraicNode *&node_pt)
Update the node update functions.
Definition: cylinder_with_flag_mesh.template.cc:1883
list x
Definition: plotDoE.py:28
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References oomph::FSI_functions::apply_no_slip_on_moving_wall(), e(), i, Global_Parameters::Ignore_fluid_loading, j, n, Global_Parameters::Q, oomph::FSIWallElement::q_pt(), oomph::FaceElement::set_boundary_number_in_bulk_mesh(), and plotDoE::x.

◆ actions_after_distribute() [2/2]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_distribute ( )
inline

Actions after distribute: Add traction elements, re-setup the fsi lookup scheme

433  {
434  bool called_from_adapt=false;
435  generic_actions_after(called_from_adapt);
436  }

◆ actions_after_newton_solve() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

397 {}

◆ actions_after_newton_solve() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

404 {}

◆ actions_after_newton_solve() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

445 {}

◆ actions_before_distribute() [1/2]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_distribute

Actions before distribute: Remove traction elements.

Actions before distribute: Make sure that the bulk solid elements attached to the FSISolidTractionElements are kept as halo elements. Unlike in most other parallel codes we DON'T delete the FSISolidTractionElements here, though, because they need to be around while the fluid mesh is adapted.

1042 {
1043  // The bulk elements attached to the traction elements need to be kept
1044  // as halo elements
1045 
1046  // There are 3 traction meshes
1047  for (unsigned b=0;b<3;b++)
1048  {
1049  // Loop over elements in traction meshes
1050  unsigned n_element=Traction_mesh_pt[b]->nelement();
1051  for (unsigned e=0;e<n_element;e++)
1052  {
1053  FSISolidTractionElement<SOLID_ELEMENT,2>* traction_elem_pt=
1055  (Traction_mesh_pt[b]->element_pt(e));
1056 
1057  // Get the bulk element (which is a SOLID_ELEMENT)
1058  SOLID_ELEMENT* solid_elem_pt = dynamic_cast<SOLID_ELEMENT*>
1059  (traction_elem_pt->bulk_element_pt());
1060 
1061  // Require bulk to be kept as a (possible) halo element
1062  // Note: The traction element itself will "become" a halo element
1063  // when it is recreated after the distribution has taken place
1064  solid_elem_pt->set_must_be_kept_as_halo();
1065  }
1066  } // end of loop over meshes of fsi traction elements
1067 
1068 
1069  // Flush all the submeshes out but keep the meshes of FSISolidTractionElements
1070  // alive (i.e. don't delete them)
1071  flush_sub_meshes();
1072 
1073  // Add the fluid mesh and the solid mesh back again
1074  // Remember that it's important that the fluid mesh is
1075  // added before the solid mesh!
1078 
1079  // Rebuild global mesh
1081 
1082 } // end of actions before distribute
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
Definition: elements.h:4735
void flush_sub_meshes()
Definition: problem.h:1339

References b, oomph::FaceElement::bulk_element_pt(), and e().

◆ actions_before_distribute() [2/2]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_distribute ( )

Actions before distribute: Remove traction elements.

◆ actions_before_implicit_timestep() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_implicit_timestep
virtual

Update the time-dependent influx.

Actions before implicit timestep: Update inflow profile.

Reimplemented from oomph::Problem.

870 {
871  // Current time
872  double t=time_pt()->time();
873 
874  // Amplitude of flow
875  double ampl=Global_Parameters::flux(t);
876 
877  // Update parabolic flow along boundary 3
878  unsigned ibound=3;
879  unsigned num_nod= Fluid_mesh_pt->nboundary_node(ibound);
880  for (unsigned inod=0;inod<num_nod;inod++)
881  {
882  double ycoord = Fluid_mesh_pt->boundary_node_pt(ibound,inod)->x(1);
883  double uy = ampl*6.0*ycoord/Domain_height*(1.0-ycoord/Domain_height);
884  Fluid_mesh_pt->boundary_node_pt(ibound,inod)->set_value(0,uy);
885  Fluid_mesh_pt->boundary_node_pt(ibound,inod)->set_value(1,0.0);
886  }
887 
888 } //end_of_actions_before_implicit_timestep
Time *& time_pt()
Return a pointer to the global time object.
Definition: problem.h:1504
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123

References Global_Parameters::flux(), and plotPSD::t.

◆ actions_before_implicit_timestep() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_implicit_timestep ( )
virtual

Update the time-dependent influx.

Reimplemented from oomph::Problem.

◆ actions_before_implicit_timestep() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_implicit_timestep ( )
virtual

Update the time-dependent influx.

Reimplemented from oomph::Problem.

◆ actions_before_newton_convergence_check() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_newton_convergence_check
virtual

Update the (dependent) fluid node positions following the update of the solid variables before performing Newton convergence check

Update the (dependent) fluid node positions following the update of the solid variables

Reimplemented from oomph::Problem.

858 {
860 }
void node_update(const bool &update_all_solid_nodes=false)
Definition: algebraic_elements.h:653

◆ actions_before_newton_convergence_check() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_newton_convergence_check ( )
virtual

Update the (dependent) fluid node positions following the update of the solid variables before performing Newton convergence check

Reimplemented from oomph::Problem.

◆ actions_before_newton_convergence_check() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_newton_convergence_check ( )
virtual

Update the (dependent) fluid node positions following the update of the solid variables before performing Newton convergence check

Reimplemented from oomph::Problem.

◆ actions_before_newton_solve() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

400 {}

◆ actions_before_newton_solve() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

407 {}

◆ actions_before_newton_solve() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update function (empty)

Reimplemented from oomph::Problem.

448 {}

◆ build_mesh()

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::build_mesh

Build the meshes for the problem.

Build meshes involved in problem.

Left point on centreline of flag so that the top and bottom vertices merge with the cylinder.

614 {
615  // Build solid mesh
616  //------------------
617 
618  // # of elements in x-direction
619  unsigned n_x=20;
620 
621  // # of elements in y-direction
622  unsigned n_y=2;
623 
624  // Domain length in y-direction
625  double l_y=Global_Parameters::H;
626 
629  Vector<double> origin(2);
630  origin[0]=Global_Parameters::Centre_x+
634  origin[1]=Global_Parameters::Centre_y-0.5*l_y;
635 
636  // Set length of flag so that endpoint actually stretches all the
637  // way to x=6:
638  double l_x=6.0-origin[0];
639 
640  //Now create the mesh
642  n_x,n_y,l_x,l_y,origin,Flag_time_stepper_pt);
643 
644  // Set error estimator for the solid mesh
646 
647 
648  // Element that contains the control point
649  FiniteElement* el_pt=solid_mesh_pt()->finite_element_pt(n_x*n_y/2-1);
650 
651  // How many nodes does it have?
652  unsigned nnod=el_pt->nnode();
653 
654  // Get the control node
655  Solid_control_node_pt=el_pt->node_pt(nnod-1);
656 
657  std::cout << "Coordinates of solid control point "
658  << Solid_control_node_pt->x(0) << " "
659  << Solid_control_node_pt->x(1) << " " << std::endl;
660 
661  // Complete build of solid elements - needs to happen before refinement
662  //---------------------------------------------------------------------
663 
664  //Pass problem parameters to solid elements
665  unsigned n_element =solid_mesh_pt()->nelement();
666  for(unsigned i=0;i<n_element;i++)
667  {
668  //Cast to a solid element
669  SOLID_ELEMENT *el_pt = dynamic_cast<SOLID_ELEMENT*>(
671 
672  // Set the constitutive law
673  el_pt->constitutive_law_pt() =
675 
676  //Set the body force
677  el_pt->body_force_fct_pt() = Global_Parameters::gravity;
678 
679  // Timescale ratio for solid
680  el_pt->lambda_sq_pt() = &Global_Parameters::Lambda_sq;
681  } // end build of solid elements
682 
683  // Build mesh of solid traction elements that apply the fluid
684  //------------------------------------------------------------
685  // traction to the solid elements
686  //-------------------------------
687 
688  // Create storage for Meshes of FSI traction elements at the bottom
689  // top and left boundaries of the flag
690  Traction_mesh_pt.resize(3);
691 
692  // Now construct the traction element meshes
696 
697  // Build the FSI traction elements
699 
700  // Loop over traction elements, pass the FSI parameter and tell them
701  // the boundary number in the bulk solid mesh -- this is required so
702  // they can get access to the boundary coordinates!
703  for (unsigned bound=0;bound<3;bound++)
704  {
705  unsigned n_face_element = Traction_mesh_pt[bound]->nelement();
706  for(unsigned e=0;e<n_face_element;e++)
707  {
708  //Cast the element pointer and specify boundary number
711  (Traction_mesh_pt[bound]->element_pt(e));
712 
713  // Specify boundary number
714  elem_pt->set_boundary_number_in_bulk_mesh(bound);
715 
716  // Function that specifies the load ratios
717  elem_pt->q_pt() = &Global_Parameters::Q;
718 
719  }
720  } // build of FSISolidTractionElements is complete
721 
722 
723  // Turn the three meshes of FSI traction elements into compound
724  // geometric objects (one Lagrangian, two Eulerian coordinates)
725  // that determine the boundary of the fluid mesh
727  bottom_flag_pt=
728  new MeshAsGeomObject
729  (Traction_mesh_pt[0]);
730 
731  MeshAsGeomObject* tip_flag_pt=
732  new MeshAsGeomObject
733  (Traction_mesh_pt[1]);
734 
735  MeshAsGeomObject* top_flag_pt=
736  new MeshAsGeomObject
737  (Traction_mesh_pt[2]);
738 
739 
740  // Build fluid mesh
741  //-----------------
742 
743  // Build fluid mesh
746  (Cylinder_pt,
747  top_flag_pt,
748  bottom_flag_pt,
749  tip_flag_pt,
756 
757  // By default all processors contain the fluid control node
759 
760  // I happen to have found out by inspection that
761  // node 5 in the hand-coded fluid mesh is at the
762  // upstream tip of the cylinder
764 
765  std::cout << "Coordinates of fluid control point "
766  << Fluid_control_node_pt->x(0) << " "
767  << Fluid_control_node_pt->x(1) << " " << std::endl;
768 
771 
772  // Set error estimator for the fluid mesh
774 
775  // Refine uniformly
777 
778 
779  // Build combined global mesh
780  //---------------------------
781 
782  // Add Fluid mesh
784 
785  // Add Solid mesh to the problem's collection of submeshes
787 
788  // Add traction sub-meshes
789  for (unsigned i=0;i<3;i++)
790  {
792  }
793 
794  // Build combined "global" mesh
796 
797 
798 
799  // Apply solid boundary conditions
800  //--------------------------------
801 
802  //Solid mesh: Pin the left boundary (boundary 3) in both directions
803  unsigned n_side = mesh_pt()->nboundary_node(3);
804 
805  //Loop over the nodes
806  for(unsigned i=0;i<n_side;i++)
807  {
810  }
811 
812  // Pin the redundant solid pressures (if any)
814  solid_mesh_pt()->element_pt());
815 
816  // Apply fluid boundary conditions
817  //--------------------------------
818 
819  //Fluid mesh: Horizontal, traction-free outflow; pinned elsewhere
820  unsigned num_bound = fluid_mesh_pt()->nboundary();
821  for(unsigned ibound=0;ibound<num_bound;ibound++)
822  {
823  unsigned num_nod= fluid_mesh_pt()->nboundary_node(ibound);
824  for (unsigned inod=0;inod<num_nod;inod++)
825  {
826  // Parallel, axially traction free outflow at downstream end
827  if (ibound != 1)
828  {
829  fluid_mesh_pt()->boundary_node_pt(ibound,inod)->pin(0);
830  fluid_mesh_pt()->boundary_node_pt(ibound,inod)->pin(1);
831  }
832  else
833  {
834  fluid_mesh_pt()->boundary_node_pt(ibound,inod)->pin(1);
835  }
836  }
837  }//end_of_pin
838 
839  // Pin redundant pressure dofs in fluid mesh
842 
843 
844  // Apply boundary conditions for fluid
845  //-------------------------------------
846 
847  // Impose parabolic flow along boundary 3
848  // Current flow rate
849  double t=0.0;
850  double ampl=Global_Parameters::flux(t);
851  unsigned ibound=3;
852  unsigned num_nod= Fluid_mesh_pt->nboundary_node(ibound);
853  for (unsigned inod=0;inod<num_nod;inod++)
854  {
855  double ycoord = Fluid_mesh_pt->boundary_node_pt(ibound,inod)->x(1);
856  double uy = ampl*6.0*ycoord/Domain_height*(1.0-ycoord/Domain_height);
857  Fluid_mesh_pt->boundary_node_pt(ibound,inod)->set_value(0,uy);
858  Fluid_mesh_pt->boundary_node_pt(ibound,inod)->set_value(1,0.0);
859  }
860 
861 
862  // Complete build of fluid elements
863  //---------------------------------
864 
865  // Set physical parameters in the fluid mesh
866  unsigned nelem=fluid_mesh_pt()->nelement();
867  for (unsigned e=0;e<nelem;e++)
868  {
869  // Upcast from GeneralisedElement to the present element
870  FLUID_ELEMENT* el_pt = dynamic_cast<FLUID_ELEMENT*>
871  (fluid_mesh_pt()->element_pt(e));
872 
873  //Set the Reynolds number
874  el_pt->re_pt() = &Global_Parameters::Re;
875 
876  //Set the Womersley number
877  el_pt->re_st_pt() = &Global_Parameters::ReSt;
878 
879  }//end_of_loop
880 
881 }//end_of_build_mesh
Z2ErrorEstimator * Fluid_error_estimator_pt
Error estimator for the fluid mesh.
Definition: turek_flag_load_balance.cc:510
Z2ErrorEstimator * Solid_error_estimator_pt
Error estimator for the solid mesh.
Definition: turek_flag_load_balance.cc:501
Newmark< 2 > * Flag_time_stepper_pt
The flag timestepper (consistent with BDF<2> for fluid)
Definition: turek_flag_load_balance.cc:498
BDF< 2 > * Fluid_time_stepper_pt
The fluid timestepper.
Definition: turek_flag_load_balance.cc:504
Circle * Cylinder_pt
Circle object as the central cylinder.
Definition: turek_flag_load_balance.cc:507

References Global_Parameters::Centre_x, Global_Parameters::Centre_y, Global_Parameters::Constitutive_law_pt, GlobalParameters::Cylinder_pt, e(), FLUID_ELEMENT, Global_Parameters::flux(), Global_Parameters::gravity(), Global_Parameters::H, i, Global_Parameters::Lambda_sq, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), Global_Parameters::Q, oomph::FSIWallElement::q_pt(), Global_Parameters::Radius, Global_Parameters::Re, Global_Parameters::ReSt, oomph::FaceElement::set_boundary_number_in_bulk_mesh(), sqrt(), plotPSD::t, and oomph::Node::x().

◆ create_fsi_traction_elements() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_fsi_traction_elements
private

Create FSI traction elements.

954 {
955 
956  // Container to collect all nodes in the traction meshes
957  std::set<SolidNode*> all_nodes;
958 
959  // Traction elements are located on boundaries 0-2:
960  for (unsigned b=0;b<3;b++)
961  {
962  // How many bulk elements are adjacent to boundary b?
963  unsigned n_element = solid_mesh_pt()->nboundary_element(b);
964 
965  // Loop over the bulk elements adjacent to boundary b?
966  for(unsigned e=0;e<n_element;e++)
967  {
968  // Get pointer to the bulk element that is adjacent to boundary b
969  SOLID_ELEMENT* bulk_elem_pt = dynamic_cast<SOLID_ELEMENT*>(
971 
972  //What is the index of the face of the element e along boundary b
973  int face_index = solid_mesh_pt()->face_index_at_boundary(b,e);
974 
975  // Create new element and add to mesh
976  Traction_mesh_pt[b]->add_element_pt(
977  new FSISolidTractionElement<SOLID_ELEMENT,2>(bulk_elem_pt,face_index));
978 
979  } //end of loop over bulk elements adjacent to boundary b
980 
981  // Identify unique nodes
982  unsigned nnod=solid_mesh_pt()->nboundary_node(b);
983  for (unsigned j=0;j<nnod;j++)
984  {
985  all_nodes.insert(solid_mesh_pt()->boundary_node_pt(b,j));
986  }
987  }
988 
989  // Build combined mesh of fsi traction elements
991 
992  // Stick nodes into combined traction mesh
993  for (std::set<SolidNode*>::iterator it=all_nodes.begin();
994  it!=all_nodes.end();it++)
995  {
997  }
998 
999 } // end of create_traction_elements
SolidMesh * Combined_traction_mesh_pt
Combined mesh of traction elements – only used for documentation.
Definition: interaction/turek_flag/turek_flag.cc:425
int face_index_at_boundary(const unsigned &b, const unsigned &e) const
Definition: mesh.h:896
unsigned nboundary_element(const unsigned &b) const
Return number of finite elements that are adjacent to boundary b.
Definition: mesh.h:878
FiniteElement * boundary_element_pt(const unsigned &b, const unsigned &e) const
Return pointer to e-th finite element on boundary b.
Definition: mesh.h:840
void add_node_pt(Node *const &node_pt)
Add a (pointer to a) node to the mesh.
Definition: mesh.h:611

References b, e(), and j.

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().

◆ create_fsi_traction_elements() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_fsi_traction_elements ( )
private

Create FSI traction elements.

◆ create_fsi_traction_elements() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::create_fsi_traction_elements ( )
private

Create FSI traction elements.

◆ delete_fsi_traction_elements() [1/2]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::delete_fsi_traction_elements
private

Delete FSI traction elements.

1309 {
1310  // There are 3 traction meshes
1311  for (unsigned b=0;b<3;b++)
1312  {
1313  unsigned n_element=Traction_mesh_pt[b]->nelement();
1314  for (unsigned e=0;e<n_element;e++)
1315  {
1316  // Kill the element
1317  delete Traction_mesh_pt[b]->element_pt(e);
1318  }
1319 
1320  // Wipe the mesh
1321  Traction_mesh_pt[b]->flush_element_and_node_storage();
1322  }
1323 } // end of delete traction elements

References b, and e().

◆ delete_fsi_traction_elements() [2/2]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::delete_fsi_traction_elements ( )
private

Delete FSI traction elements.

◆ doc_solution() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::doc_solution ( DocInfo doc_info,
ofstream &  trace_file 
)

Doc the solution.

1010 {
1011 
1012 // FSI_functions::doc_fsi<AlgebraicNode>(Fluid_mesh_pt,
1013 // Combined_traction_mesh_pt,
1014 // doc_info);
1015 
1016 // pause("done");
1017 
1018  ofstream some_file;
1019  char filename[100];
1020 
1021  // Number of plot points
1022  unsigned n_plot = 5;
1023 
1024  // Output solid solution
1025  sprintf(filename,"%s/solid_soln%i.dat",doc_info.directory().c_str(),
1026  doc_info.number());
1027  some_file.open(filename);
1028  solid_mesh_pt()->output(some_file,n_plot);
1029  some_file.close();
1030 
1031  // Output fluid solution
1032  sprintf(filename,"%s/soln%i.dat",doc_info.directory().c_str(),
1033  doc_info.number());
1034  some_file.open(filename);
1035  fluid_mesh_pt()->output(some_file,n_plot);
1036  some_file.close();
1037 
1038 
1039 //Output the traction
1040  sprintf(filename,"%s/traction%i.dat",doc_info.directory().c_str(),
1041  doc_info.number());
1042  some_file.open(filename);
1043 // Loop over the traction meshes
1044  for(unsigned i=0;i<3;i++)
1045  {
1046  // Loop over the element in traction_mesh_pt
1047  unsigned n_element = Traction_mesh_pt[i]->nelement();
1048  for(unsigned e=0;e<n_element;e++)
1049  {
1052  Traction_mesh_pt[i]->element_pt(e) );
1053 
1054  el_pt->output(some_file,5);
1055  }
1056  }
1057  some_file.close();
1058 
1059 
1060  // Write trace (we're only using Taylor Hood elements so we know that
1061  // the pressure is the third value at the fluid control node...
1062  trace_file << time_pt()->time() << " "
1063  << Solid_control_node_pt->x(0) << " "
1064  << Solid_control_node_pt->x(1) << " "
1065  << Fluid_control_node_pt->value(2) << " "
1066  << Global_Parameters::flux(time_pt()->time()) << " "
1067  << std::endl;
1068 
1069  cout << "Doced solution for step "
1070  << doc_info.number()
1071  << std::endl << std::endl << std::endl;
1072 
1073 }//end_of_doc_solution
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
void output(std::ostream &outfile, const unsigned &n_plot)
Definition: solid_traction_elements.h:878
void output(std::ostream &outfile)
Output for all elements.
Definition: mesh.cc:2027
double value(const unsigned &i) const
Definition: nodes.cc:2408
double & time()
Return the current value of continuous time.
Definition: problem.cc:11531
string filename
Definition: MergeRestartFiles.py:39

References oomph::DocInfo::directory(), e(), MergeRestartFiles::filename, Global_Parameters::flux(), i, oomph::DocInfo::number(), and oomph::FSISolidTractionElement< ELEMENT, DIM >::output().

◆ doc_solution() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::doc_solution ( DocInfo doc_info,
ofstream &  trace_file 
)

Doc the solution.

◆ doc_solution() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::doc_solution ( DocInfo doc_info,
ofstream &  trace_file 
)

Doc the solution.

◆ fluid_mesh_pt() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
RefineableAlgebraicCylinderWithFlagMesh<FLUID_ELEMENT>* TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::fluid_mesh_pt ( )
inline

Access function for the fluid mesh.

380  { return Fluid_mesh_pt;}

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().

◆ fluid_mesh_pt() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
RefineableAlgebraicCylinderWithFlagMesh<FLUID_ELEMENT>* TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::fluid_mesh_pt ( )
inline

Access function for the fluid mesh.

380  { return Fluid_mesh_pt;}

◆ fluid_mesh_pt() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
RefineableAlgebraicCylinderWithFlagMesh<FLUID_ELEMENT>* TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::fluid_mesh_pt ( )
inline

Access function for the fluid mesh.

407  { return Fluid_mesh_pt;}

◆ generic_actions_after()

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
void TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::generic_actions_after ( const bool called_from_adapt)

Generic actions after.

Actions after distribute: Re-setup FSI.

983 {
984  // The solid mesh has now been distributed, so it now has halo elements
985  // on certain processors. The traction elements attached to these new
986  // halo elements need to be halo themselves, so we need to delete the
987  // old ones and re-attach new ones. Recall that FaceElements attached
988  // to bulk halo elements become halos themselves.
990 
991  // (Re-)Build the FSI traction elements
993 
994  // Loop over traction elements, pass the FSI parameter and tell them
995  // the boundary number in the bulk solid mesh -- this is required so
996  // they can get access to the boundary coordinates!
997  for (unsigned bound=0;bound<3;bound++)
998  {
999  unsigned n_face_element = Traction_mesh_pt[bound]->nelement();
1000  for(unsigned e=0;e<n_face_element;e++)
1001  {
1002  //Cast the element pointer and specify boundary number
1005  (Traction_mesh_pt[bound]->element_pt(e));
1006 
1007  // Specify boundary number
1008  elem_pt->set_boundary_number_in_bulk_mesh(bound);
1009 
1010  // Function that specifies the load ratios
1011  elem_pt->q_pt() = &Global_Parameters::Q;
1012 
1013  }
1014  } // build of FSISolidTractionElements is complete
1015 
1016 
1017  // Turn the three meshes of FSI traction elements into compound
1018  // geometric objects (one Lagrangian, two Eulerian coordinates)
1019  // that determine particular boundaries of the fluid mesh
1021  bottom_flag_pt=
1022  new MeshAsGeomObject
1023  (Traction_mesh_pt[0]);
1024 
1025  MeshAsGeomObject* tip_flag_pt=
1026  new MeshAsGeomObject
1027  (Traction_mesh_pt[1]);
1028 
1029  MeshAsGeomObject* top_flag_pt=
1030  new MeshAsGeomObject
1031  (Traction_mesh_pt[2]);
1032 
1033 
1034  // Delete the old MeshAsGeomObjects and tell the fluid mesh
1035  // about the new ones.
1036  delete fluid_mesh_pt()->bottom_flag_pt();
1037  fluid_mesh_pt()->set_bottom_flag_pt(bottom_flag_pt);
1038  delete fluid_mesh_pt()->top_flag_pt();
1039  fluid_mesh_pt()->set_top_flag_pt(top_flag_pt);
1040  delete fluid_mesh_pt()->tip_flag_pt();
1041  fluid_mesh_pt()->set_tip_flag_pt(tip_flag_pt);
1042 
1043  // Call update_node_update for all the fluid mesh nodes, as the
1044  // geometric objects representing the fluid mesh boundaries have changed
1045  unsigned n_fluid_node=fluid_mesh_pt()->nnode();
1046  for (unsigned n=0;n<n_fluid_node;n++)
1047  {
1048  // Get the (algebraic) node
1049  AlgebraicNode* alg_nod_pt=dynamic_cast<AlgebraicNode*>
1050  (fluid_mesh_pt()->node_pt(n));
1051 
1052  // Call update_node_update for this node
1053  fluid_mesh_pt()->update_node_update(alg_nod_pt);
1054  }
1055 
1056 
1057  if (!called_from_adapt)
1058  {
1059  // Add the traction meshes back to the problem
1060  for (unsigned i=0;i<3;i++)
1061  {
1063  }
1064  }
1065 
1066  // Rebuild global mesh
1068 
1069 
1070  // Unpin all pressure dofs
1072  unpin_all_pressure_dofs(fluid_mesh_pt()->element_pt());
1073 
1074  // Pin redundant pressure dofs
1077 
1078  // Unpin all solid pressure dofs
1081 
1082  // Pin the redundant solid pressures (if any)
1084  solid_mesh_pt()->element_pt());
1085 
1086  // If the solid is to be loaded by the fluid, then set up the interaction
1087  // and specify the velocity of the fluid nodes based on the wall motion
1089  {
1090  // Re-setup the fluid load information for fsi solid traction elements
1091  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
1092  (this,5,Fluid_mesh_pt,Traction_mesh_pt[0]);
1093 
1094  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
1095  (this,6,Fluid_mesh_pt,Traction_mesh_pt[2]);
1096 
1097  FSI_functions::setup_fluid_load_info_for_solid_elements<FLUID_ELEMENT,2>
1098  (this,7,Fluid_mesh_pt,Traction_mesh_pt[1]);
1099 
1100  // The velocity of the fluid nodes on the wall (fluid mesh boundary 5,6,7)
1101  // is set by the wall motion -- hence the no-slip condition must be
1102  // re-applied whenever a node update is performed for these nodes.
1103  // Such tasks may be performed automatically by the auxiliary node update
1104  // function specified by a function pointer:
1105  for(unsigned ibound=5;ibound<8;ibound++ )
1106  {
1107  unsigned num_nod= Fluid_mesh_pt->nboundary_node(ibound);
1108  for (unsigned inod=0;inod<num_nod;inod++)
1109  {
1110  Fluid_mesh_pt->boundary_node_pt(ibound, inod)->
1111  set_auxiliary_node_update_fct_pt(
1113  }
1114  }
1115 
1116  } // end of (re-)assignment of the auxiliary node update fct
1117 
1118 
1119 
1120  // Call update_node_update for all the nodes of external halo elements
1121  Vector<Node*> external_halo_node_pt;
1122  fluid_mesh_pt()->get_external_halo_node_pt(external_halo_node_pt);
1123  unsigned n=external_halo_node_pt.size();
1124  for (unsigned j=0;j<n;j++)
1125  {
1126  // Get the (algebraic) node
1127  AlgebraicNode* alg_nod_pt=dynamic_cast<AlgebraicNode*>
1128  (external_halo_node_pt[j]);
1129 
1130  // Call update_node_update for this node
1131  fluid_mesh_pt()->update_node_update(alg_nod_pt);
1132  }
1133 
1134 
1135  // Re-set control nodes
1136 
1137  // Loop over fluid nodes
1138  unsigned n_fluid_nod=fluid_mesh_pt()->nnode();
1139  for (unsigned j=0;j<n_fluid_nod;j++)
1140  {
1141  if ((fluid_mesh_pt()->node_pt(j)->x(0)==Fluid_control_x0) &&
1142  (fluid_mesh_pt()->node_pt(j)->x(1)==Fluid_control_x1))
1143  {
1144  // The node still exists on this process...
1146  break;
1147  }
1148 
1149  // if the end has been reached then we've lost the control node
1150  if (j==n_fluid_nod-1)
1151  {
1153  }
1154  }
1155 
1156 } // end of actions after distribute

References oomph::FSI_functions::apply_no_slip_on_moving_wall(), e(), i, Global_Parameters::Ignore_fluid_loading, j, n, Global_Parameters::Q, oomph::FSIWallElement::q_pt(), oomph::FaceElement::set_boundary_number_in_bulk_mesh(), and plotDoE::x.

◆ solid_mesh_pt() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
ElasticRefineableRectangularQuadMesh<SOLID_ELEMENT>*& TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

384  {return Solid_mesh_pt;}
ElasticRefineableRectangularQuadMesh< SOLID_ELEMENT > * Solid_mesh_pt
Pointer to solid mesh.
Definition: interaction/turek_flag/turek_flag.cc:416

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().

◆ solid_mesh_pt() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
ElasticRefineableRectangularQuadMesh<SOLID_ELEMENT>*& TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

384  {return Solid_mesh_pt;}

◆ solid_mesh_pt() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
ElasticRefineableRectangularQuadMesh<SOLID_ELEMENT>*& TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::solid_mesh_pt ( )
inline

Access function for the solid mesh.

411  {return Solid_mesh_pt;}

◆ traction_mesh_pt() [1/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
SolidMesh*& TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::traction_mesh_pt ( const unsigned i)
inline

Access function for the i-th mesh of FSI traction elements.

388  {return Traction_mesh_pt[i];}

References i.

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().

◆ traction_mesh_pt() [2/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
SolidMesh*& TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::traction_mesh_pt ( const unsigned i)
inline

Access function for the i-th mesh of FSI traction elements.

388  {return Traction_mesh_pt[i];}

References i.

◆ traction_mesh_pt() [3/3]

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
SolidMesh*& TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::traction_mesh_pt ( const unsigned i)
inline

Access function for the i-th mesh of FSI traction elements.

415  {return Traction_mesh_pt[i];}

References i.

Member Data Documentation

◆ Combined_traction_mesh_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
SolidMesh * TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Combined_traction_mesh_pt
private

Combined mesh of traction elements – only used for documentation.

◆ Cylinder_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
Circle* TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Cylinder_pt
private

Circle object as the central cylinder.

◆ Domain_height

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
double TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Domain_height
private

Overall height of domain.

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().

◆ Domain_length

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
double TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Domain_length
private

Overall length of domain.

◆ Flag_time_stepper_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
Newmark<2>* TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Flag_time_stepper_pt
private

The flag timestepper (consistent with BDF<2> for fluid)

◆ Fluid_control_node_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
Node * TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Fluid_control_node_pt
private

Pointer to fluid control node.

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().

◆ Fluid_control_x0

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
double TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Fluid_control_x0
private

Backed-up x coordinate of fluid control node.

◆ Fluid_control_x1

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
double TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Fluid_control_x1
private

Backed-up y coordinate of fluid control node.

◆ Fluid_error_estimator_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
Z2ErrorEstimator* TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Fluid_error_estimator_pt
private

Error estimator for the fluid mesh.

◆ Fluid_mesh_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
RefineableAlgebraicCylinderWithFlagMesh< FLUID_ELEMENT > * TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Fluid_mesh_pt
private

Pointer to fluid mesh.

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().

◆ Fluid_time_stepper_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
BDF<2>* TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Fluid_time_stepper_pt
private

The fluid timestepper.

◆ I_have_the_fluid_control_node

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
bool TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::I_have_the_fluid_control_node
private

Boolean indicating if the current processor contains the fluid control node

◆ Solid_control_node_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
Node * TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Solid_control_node_pt
private

Pointer to solid control node.

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().

◆ Solid_error_estimator_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
Z2ErrorEstimator* TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Solid_error_estimator_pt
private

Error estimator for the solid mesh.

◆ Solid_mesh_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
ElasticRefineableRectangularQuadMesh< SOLID_ELEMENT > * TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Solid_mesh_pt
private

Pointer to solid mesh.

◆ Traction_mesh_pt

template<class FLUID_ELEMENT , class SOLID_ELEMENT >
Vector< SolidMesh * > TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::Traction_mesh_pt
private

Vector of pointers to mesh of FSI traction elements.

Referenced by TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >::TurekProblem().


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