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

Public Member Functions

 RefineableRotatingCylinderProblem (const double &length, const double &height)
 
void actions_after_newton_solve ()
 Update the problem specs after solve (empty) More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve: More...
 
void actions_before_adapt ()
 Strip off the interface before adaptation. More...
 
void actions_after_adapt ()
 Actions that are to be performed after a mesh adaptation. More...
 
void finish_problem_setup ()
 
void set_boundary_conditions ()
 
void solve ()
 
void create_volume_constraint_elements ()
 Create the volume constraint elements. More...
 
void delete_volume_constraint_elements ()
 
void create_free_surface_elements ()
 
void delete_free_surface_elements ()
 
- 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
 
OomphCommunicator * communicator_pt ()
 access function to the oomph-lib communicator More...
 
const OomphCommunicator * communicator_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 ()
 
LinearSolver * mass_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...
 
Time * time_pt () const
 Return a pointer to the global time object (const version). More...
 
double & time ()
 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 TimeStepper * time_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...
 
double & minimum_dt ()
 Access function to min timestep in adaptive timestepping. More...
 
double & maximum_dt ()
 Access function to max timestep in adaptive timestepping. More...
 
unsigned & max_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...
 
double & max_residuals ()
 
bool & time_adaptive_newton_crash_on_solve_fail ()
 Access function for Time_adaptive_newton_crash_on_solve_fail. More...
 
double & newton_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...
 
double * global_dof_pt (const unsigned &i)
 
double & dof (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...
 
double * dof_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...
 
bool & use_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 Problem * make_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 ()
 
double * bifurcation_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 ()
 
int & sign_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 ()
 

Public Attributes

double Re
 
double Ca
 
double ReInvFr
 
double Bo
 
double Omega
 
double Volume
 
double Angle
 
Vector< double > G
 
RefineableCylinderAndInterfaceMesh< ELEMENT > * Bulk_mesh_pt
 
Mesh * Surface_mesh_pt
 
Mesh * Point_mesh_pt
 
Mesh * Volume_constraint_mesh_pt
 The volume constraint mesh. More...
 
- Public Attributes inherited from oomph::Problem
bool Shut_up_in_newton_solve
 

Private Attributes

double Length
 
double Height
 
ConstitutiveLaw * Constitutive_law_pt
 
Data * Traded_pressure_data_pt
 

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...
 
- Static Public Attributes inherited from oomph::Problem
static bool Suppress_warning_about_actions_before_read_unstructured_meshes
 
- Protected Types inherited from oomph::Problem
enum  Assembly_method {
  Perform_assembly_using_vectors_of_pairs , Perform_assembly_using_two_vectors , Perform_assembly_using_maps , Perform_assembly_using_lists ,
  Perform_assembly_using_two_arrays
}
 Enumerated flags to determine which sparse assembly method is used. More...
 
- Protected Member Functions inherited from oomph::Problem
unsigned setup_element_count_per_dof ()
 
virtual void sparse_assemble_row_or_column_compressed (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag)
 
virtual void actions_before_newton_convergence_check ()
 
virtual void actions_before_newton_step ()
 
virtual void actions_after_newton_step ()
 
virtual void actions_before_implicit_timestep ()
 
virtual void actions_after_implicit_timestep ()
 
virtual void actions_after_implicit_timestep_and_error_estimation ()
 
virtual void actions_before_explicit_timestep ()
 Actions that should be performed before each explicit time step. More...
 
virtual void actions_after_explicit_timestep ()
 Actions that should be performed after each explicit time step. More...
 
virtual void actions_before_read_unstructured_meshes ()
 
virtual void actions_after_read_unstructured_meshes ()
 
virtual void actions_after_change_in_global_parameter (double *const &parameter_pt)
 
virtual void actions_after_change_in_bifurcation_parameter ()
 
virtual void actions_after_parameter_increase (double *const &parameter_pt)
 
double & dof_derivative (const unsigned &i)
 
double & dof_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 *, bool > Calculate_dparameter_analytic
 
bool Calculate_hessian_products_analytic
 
LinearAlgebraDistribution * Dof_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< double > Max_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< double > Dof_derivative
 Storage for the derivative of the problem variables wrt arc-length. More...
 
Vector< double > Dof_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
 
OomphCommunicator * Communicator_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...
 

Constructor & Destructor Documentation

◆ RefineableRotatingCylinderProblem()

template<class ELEMENT >
RefineableRotatingCylinderProblem< ELEMENT >::RefineableRotatingCylinderProblem ( const double &  length,
const double &  height 
)

Constructor: Pass flag to indicate if you want a constant source function or the tanh profile.

Constructor for adaptive Poisson problem in deformable fish-shaped domain. Pass bool to indicate if we want a constant source function or the one that produces a tanh step.

Set the initial value of the ReInvFr = Bo/Ca

Build a linear solver: Use HSL's MA42 frontal solver

Switch off full doc for frontal solver

911  : Length(length), Height(height),
912  Re(0.0), Ca(0.001),
913  ReInvFr(0.0),
914  Bo(0.0), Omega(1.0),
915  Volume(12.0),
916  Angle(1.57)
917 {
921 
922  G.resize(2);
923  G[0] = 0.0; G[1] = -1.0;
924 
926  ReInvFr = Bo/Ca;
927 
929  //linear_solver_pt() = new HSL_MA42;
930 
931  //Set the constituive law
933 
934 
936  //static_cast<HSL_MA42*>(linear_solver_pt())->disable_doc_stats();
937 
938  //Allocate the timestepper (no timedependence)
940 
941  // Build mesh
942  Bulk_mesh_pt=
944  Problem::time_stepper_pt());
945 
946  // Set error estimator
948  Bulk_mesh_pt->spatial_error_estimator_pt()=error_estimator_pt;
949 
950 
951  //Refine the problem a couple of times
952  bool update_all_solid_nodes=true;
953  Bulk_mesh_pt->refine_uniformly();
954  Bulk_mesh_pt->node_update(update_all_solid_nodes);
955  Bulk_mesh_pt->refine_uniformly();
956  Bulk_mesh_pt->node_update(update_all_solid_nodes);
957  //Bulk_mesh_pt->refine_uniformly();
958  //refine_uniformly();
959  //refine_uniformly();
960 
961  // Loop over all elements and unset macro element pointer
962  unsigned Nelement = Bulk_mesh_pt->nelement();
963  for(unsigned e=0;e<Nelement;e++)
964  {
965  dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(e))->
966  set_macro_elem_pt(0);
967  }
968 
969 
970  //The external pressure is a piece of global data
971  Traded_pressure_data_pt = new Data(1);
973 
974  // Complete the build of all elements so they are fully functional
975 
976  Surface_mesh_pt = new Mesh;
977  Point_mesh_pt = new Mesh;
979 
981 
982  this->add_sub_mesh(Bulk_mesh_pt);
986 
987  this->build_global_mesh();
988 
989  //Attach the boundary conditions to the mesh
990  oomph_info <<"Number of equations: " << assign_eqn_numbers() << std::endl;
991 
992 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Definition: adaptive_interface.cc:687
double Bo
Definition: adaptive_interface.cc:734
Vector< double > G
Definition: adaptive_interface.cc:742
double Ca
Definition: adaptive_interface.cc:734
double Height
Definition: adaptive_interface.cc:725
double Re
Definition: adaptive_interface.cc:734
Mesh * Volume_constraint_mesh_pt
The volume constraint mesh.
Definition: adaptive_interface.cc:777
void finish_problem_setup()
Definition: adaptive_interface.cc:1001
Mesh * Surface_mesh_pt
Definition: adaptive_interface.cc:771
ConstitutiveLaw * Constitutive_law_pt
Definition: adaptive_interface.cc:728
double Angle
Definition: adaptive_interface.cc:740
Data * Traded_pressure_data_pt
Definition: adaptive_interface.cc:730
double Volume
Definition: adaptive_interface.cc:738
double Omega
Definition: adaptive_interface.cc:736
double ReInvFr
Definition: adaptive_interface.cc:734
double Length
Definition: adaptive_interface.cc:725
RefineableCylinderAndInterfaceMesh< ELEMENT > * Bulk_mesh_pt
Definition: adaptive_interface.cc:768
Mesh * Point_mesh_pt
Definition: adaptive_interface.cc:774
Definition: nodes.h:86
Definition: constitutive_laws.h:699
Definition: mesh.h:67
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
void add_global_data(Data *const &global_data_pt)
Definition: problem.h:1654
void build_global_mesh()
Definition: problem.cc:1493
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Definition: problem.cc:1989
Definition: error_estimator.h:266
double Nu
Poisson's ratio.
Definition: TwenteMeshGluing.cpp:71
double height(const double &x)
Height of domain.
Definition: simple_spine_channel.cc:429
Vector< double > Wall_normal
Direction of the wall normal vector.
Definition: axi_static_cap.cc:59
Z2ErrorEstimator * error_estimator_pt
Definition: MortaringCantileverCompareToNonMortaring.cpp:190
OomphInfo oomph_info
Definition: oomph_definitions.cc:319

References oomph::Problem::add_global_data(), oomph::Problem::add_sub_mesh(), oomph::Problem::add_time_stepper_pt(), oomph::Problem::assign_eqn_numbers(), RefineableRotatingCylinderProblem< ELEMENT >::Bo, oomph::Problem::build_global_mesh(), RefineableRotatingCylinderProblem< ELEMENT >::Bulk_mesh_pt, RefineableRotatingCylinderProblem< ELEMENT >::Ca, RefineableRotatingCylinderProblem< ELEMENT >::Constitutive_law_pt, e(), MeshRefinement::error_estimator_pt, RefineableRotatingCylinderProblem< ELEMENT >::finish_problem_setup(), RefineableRotatingCylinderProblem< ELEMENT >::G, Global_Physical_Variables::height(), Global_Physical_Variables::Nu, oomph::oomph_info, RefineableRotatingCylinderProblem< ELEMENT >::Point_mesh_pt, RefineableRotatingCylinderProblem< ELEMENT >::ReInvFr, RefineableRotatingCylinderProblem< ELEMENT >::Surface_mesh_pt, RefineableRotatingCylinderProblem< ELEMENT >::Traded_pressure_data_pt, RefineableRotatingCylinderProblem< ELEMENT >::Volume_constraint_mesh_pt, and Global_Physical_Variables::Wall_normal.

Member Function Documentation

◆ actions_after_adapt()

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

Actions that are to be performed after a mesh adaptation.

Reimplemented from oomph::Problem.

void rebuild_global_mesh()
Definition: problem.cc:1533

◆ actions_after_newton_solve()

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

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

749 {}

◆ actions_before_adapt()

template<class ELEMENT >
void RefineableRotatingCylinderProblem< ELEMENT >::actions_before_adapt ( )
inlinevirtual

Strip off the interface before adaptation.

Reimplemented from oomph::Problem.

756  {
759  }
void delete_volume_constraint_elements()
Definition: adaptive_interface.cc:822
void delete_free_surface_elements()
Definition: adaptive_interface.cc:883

◆ actions_before_newton_solve()

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

Update the problem specs before solve:

Reimplemented from oomph::Problem.

void set_boundary_conditions()
Definition: adaptive_interface.cc:1137

◆ create_free_surface_elements()

template<class ELEMENT >
void RefineableRotatingCylinderProblem< ELEMENT >::create_free_surface_elements ( )
inline
833  {
834  //Find number of elements adjacent to upper boundary
835  unsigned n_boundary_element = Bulk_mesh_pt->nboundary_element(2);
836  //The boundary elements do no necessarily come in order, so we will
837  //need to detect the element adjacent to boundary 1.
838  //The index of that element in our array will be stored in this variable
839  //(initialised to a negative and therefore invalid number)
840  int final_element_index=-1;
841  //Loop over the elements adjacent to the boundary
842  for(unsigned e=0;e<n_boundary_element;e++)
843  {
844  //Create the free surface element (on face 2)
845  FiniteElement *free_surface_element_pt
847  (Bulk_mesh_pt->boundary_element_pt(2,e),
848  Bulk_mesh_pt->face_index_at_boundary(2,e));
849  //Push it back onto the stack
850  Surface_mesh_pt->add_element_pt(free_surface_element_pt);
851 
852  //Check whether the element is on the boundary 1
853  unsigned n_node = free_surface_element_pt->nnode();
854  //Only need to check the end nodes
855  if((free_surface_element_pt->node_pt(0)->is_on_boundary(1)) ||
856  (free_surface_element_pt->node_pt(n_node-1)->is_on_boundary(1)))
857  {
858  final_element_index=e;
859  }
860  }
861 
862  unsigned Nfree = Surface_mesh_pt->nelement();
863  oomph_info << Nfree << " free surface elements assigned" << std::endl;
864 
865  if(final_element_index == -1)
866  {
867  throw OomphLibError("No Surface Element adjacent to boundary 1\n",
870  }
871 
872  //Make the edge point
873  FiniteElement* point_element_pt=
875  (Surface_mesh_pt->element_pt(final_element_index))
876  ->make_bounding_element(1);
877 
878  //Add it to the stack
879  Point_mesh_pt->add_element_pt(point_element_pt);
880  }
Specialise the elastic update template class to concrete 1D case.
Definition: specific_node_update_interface_elements.h:1220
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
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
void add_element_pt(GeneralisedElement *const &element_pt)
Add a (pointer to) an element to the mesh.
Definition: mesh.h:617
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
virtual bool is_on_boundary() const
Definition: nodes.h:1373
Definition: oomph_definitions.h:222
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References oomph::Mesh::add_element_pt(), oomph::Mesh::boundary_element_pt(), e(), oomph::Mesh::element_pt(), oomph::Mesh::face_index_at_boundary(), oomph::Node::is_on_boundary(), oomph::Mesh::nboundary_element(), oomph::Mesh::nelement(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and oomph::oomph_info.

◆ create_volume_constraint_elements()

template<class ELEMENT >
void RefineableRotatingCylinderProblem< ELEMENT >::create_volume_constraint_elements ( )
inline

Create the volume constraint elements.

785  {
786  //The single volume constraint element
787  VolumeConstraintElement* vol_constraint_element =
789  Volume_constraint_mesh_pt->add_element_pt(vol_constraint_element);
790 
791  //Loop over all boundaries (or just 1 and 2 why?)
792  for(unsigned b=0;b<4;b++)
793  {
794  // How many bulk fluid elements are adjacent to boundary b?
795  unsigned n_element = Bulk_mesh_pt->nboundary_element(b);
796 
797  // Loop over the bulk fluid elements adjacent to boundary b?
798  for(unsigned e=0;e<n_element;e++)
799  {
800  // Get pointer to the bulk fluid element that is
801  // adjacent to boundary b
802  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
803  Bulk_mesh_pt->boundary_element_pt(b,e));
804 
805  //Find the index of the face of element e along boundary b
806  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
807 
808  // Create new element
811  bulk_elem_pt,face_index);
812 
813  //Set the "master" volume control element
814  el_pt->set_volume_constraint_element(vol_constraint_element);
815 
816  // Add it to the mesh
818  }
819  }
820  }
Scalar * b
Definition: benchVecAdd.cpp:17
Definition: constrained_volume_elements.h:372
void set_volume_constraint_element(VolumeConstraintElement *const &vol_constraint_el_pt, const bool &check_nodal_data=true)
Definition: constrained_volume_elements.h:261
Definition: constrained_volume_elements.h:66

References oomph::Mesh::add_element_pt(), b, oomph::Mesh::boundary_element_pt(), e(), oomph::Mesh::face_index_at_boundary(), oomph::Mesh::nboundary_element(), oomph::VolumeConstraintBoundingElement::set_volume_constraint_element(), and Global_Physical_Variables::Volume.

◆ delete_free_surface_elements()

template<class ELEMENT >
void RefineableRotatingCylinderProblem< ELEMENT >::delete_free_surface_elements ( )
inline
884  {
885  //Find the number of traction elements
886  unsigned Nfree_surface = Surface_mesh_pt->nelement();
887 
888  //The traction elements are ALWAYS? stored at the end
889  //So delete and remove them, add one to get rid of the constraint
890  for(unsigned e=0;e<Nfree_surface;e++)
891  {
892  delete Surface_mesh_pt->element_pt(e);
893  }
895 
896  delete Point_mesh_pt->element_pt(0);
898  }
void flush_element_and_node_storage()
Definition: mesh.h:407

References e(), oomph::Mesh::element_pt(), oomph::Mesh::flush_element_and_node_storage(), and oomph::Mesh::nelement().

◆ delete_volume_constraint_elements()

template<class ELEMENT >
void RefineableRotatingCylinderProblem< ELEMENT >::delete_volume_constraint_elements ( )
inline
823  {
824  unsigned n_element = Volume_constraint_mesh_pt->nelement();
825  for(unsigned e=0;e<n_element;e++)
826  {
828  }
830  }

References e(), oomph::Mesh::element_pt(), oomph::Mesh::flush_element_and_node_storage(), and oomph::Mesh::nelement().

◆ finish_problem_setup()

template<class ELEMENT >
void RefineableRotatingCylinderProblem< ELEMENT >::finish_problem_setup

Complete problem setup: Setup element-specific things (source fct pointers etc.)

Complete build of Poisson problem: Loop over elements and setup pointers to source function

1002 {
1003  //Now sort out the free surface
1005  //Create the volume constraint elements
1007 
1008  // Set the boundary conditions for this problem: All nodes are
1009  // free by default -- just pin the ones that have Dirichlet conditions
1010  // here.
1011 
1012  //Pin bottom and cylinder
1013  unsigned num_bound = Bulk_mesh_pt->nboundary();
1014  for(unsigned ibound=0;ibound<num_bound;ibound+=4)
1015  {
1016  unsigned num_nod= Bulk_mesh_pt->nboundary_node(ibound);
1017  for (unsigned inod=0;inod<num_nod;inod++)
1018  {
1019  Bulk_mesh_pt->boundary_node_pt(ibound,inod)->pin(0);
1020  Bulk_mesh_pt->boundary_node_pt(ibound,inod)->pin(1);
1021  }
1022  }
1023 
1024  //Pin u and v on LHS
1025  {
1026  unsigned num_nod= Bulk_mesh_pt->nboundary_node(3);
1027  for (unsigned inod=0;inod<num_nod;inod++)
1028  {
1029  Bulk_mesh_pt->boundary_node_pt(3,inod)->pin(0);
1030  //Bulk_mesh_pt->boundary_node_pt(3,inod)->pin(1);
1031  }
1032  }
1033 
1034  //Pin u and v on RHS
1035  {
1036  unsigned num_nod= Bulk_mesh_pt->nboundary_node(1);
1037  for (unsigned inod=0;inod<num_nod;inod++)
1038  {
1039  Bulk_mesh_pt->boundary_node_pt(1,inod)->pin(0);
1040  Bulk_mesh_pt->boundary_node_pt(1,inod)->pin(1);
1041  }
1042  }
1043 
1044 
1045  dynamic_cast<FluidInterfaceBoundingElement*>
1046  (Point_mesh_pt->element_pt(0))->set_contact_angle(&Angle);
1047 
1048  dynamic_cast<FluidInterfaceBoundingElement*>
1049  (Point_mesh_pt->element_pt(0))->ca_pt() = &Ca;
1050 
1051 
1052  dynamic_cast<FluidInterfaceBoundingElement*>
1053  (Point_mesh_pt->element_pt(0))->
1054  wall_unit_normal_fct_pt() = &Global_Physical_Variables::wall_unit_normal_fct;
1055 
1056  //Pin one pressure
1057  dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(0))->fix_pressure(0,0.0);
1058 
1059  //Loop over the lower boundary and pin nodal positions in both directions
1060  unsigned num_nod= Bulk_mesh_pt->nboundary_node(0);
1061  for (unsigned inod=0;inod<num_nod;inod++)
1062  {
1063  Bulk_mesh_pt->boundary_node_pt(0,inod)->pin_position(0);
1064  Bulk_mesh_pt->boundary_node_pt(0,inod)->pin_position(1);
1065  }
1066 
1067  //Loop over the RHS side and pin in x and y
1068  num_nod= Bulk_mesh_pt->nboundary_node(1);
1069  for (unsigned inod=0;inod<num_nod;inod++)
1070  {
1071  Bulk_mesh_pt->boundary_node_pt(1,inod)->pin_position(0);
1072  //Bulk_mesh_pt->boundary_node_pt(1,inod)->pin_position(1);
1073  }
1074 
1075 
1076  //Loop over the LHS side and pin in x
1077  num_nod= Bulk_mesh_pt->nboundary_node(3);
1078  for (unsigned inod=0;inod<num_nod;inod++)
1079  {
1080  Bulk_mesh_pt->boundary_node_pt(3,inod)->pin_position(0);
1081  //Bulk_mesh_pt->boundary_node_pt(3,inod)->pin_position(1);
1082  }
1083 
1084  //Loop over the cylinder and pin nodal positions in both directions
1085  num_nod= Bulk_mesh_pt->nboundary_node(4);
1086  for (unsigned inod=0;inod<num_nod;inod++)
1087  {
1088  Bulk_mesh_pt->boundary_node_pt(4,inod)->pin_position(0);
1089  Bulk_mesh_pt->boundary_node_pt(4,inod)->pin_position(1);
1090  }
1091 
1092 
1093  //Find number of elements in mesh
1094  unsigned Nfluid = Bulk_mesh_pt->nelement();
1095  //Find the number of free surface elements
1096  unsigned Nfree = Surface_mesh_pt->nelement();
1097 
1098  // Loop over the elements to set up element-specific
1099  // things that cannot be handled by constructor
1100  for(unsigned i=0;i<Nfluid;i++)
1101  {
1102  // Upcast from FiniteElement to the present element
1103  ELEMENT *temp_pt = dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(i));
1104 
1105  //Set the source function pointer
1106  temp_pt->re_pt() = &Re;
1107  temp_pt->re_invfr_pt() = &ReInvFr;
1108  temp_pt->g_pt() = &G;
1109 
1110  //Assign the mesh deformation constitutive law
1111  temp_pt->constitutive_law_pt() = Constitutive_law_pt;
1112 
1113  }
1114 
1115 
1116  // Pin the redundant solid pressures (if any)
1118  Bulk_mesh_pt->element_pt());
1119 
1120  //Loop over the free surface elements
1121  for(unsigned i=0;i<Nfree;i++)
1122  {
1123  // Upcast from FiniteElement to the present element
1127  //Set the Capillary number
1128  temp_pt->ca_pt() = &Ca;
1129 
1130  //Pass the Data item that contains the external pressure
1131  temp_pt->set_external_pressure_data(this->global_data_pt(0));
1132  }
1133 
1134 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
void create_volume_constraint_elements()
Create the volume constraint elements.
Definition: adaptive_interface.cc:784
void create_free_surface_elements()
Definition: adaptive_interface.cc:832
Definition: interface_elements.h:54
double *& ca_pt()
Pointer to the Capillary number.
Definition: interface_elements.h:492
void set_external_pressure_data(Data *external_pressure_data_pt)
Definition: interface_elements.h:539
Definition: solid_elements.h:58
Data *& global_data_pt(const unsigned &i)
Return a pointer to the the i-th global data object.
Definition: problem.h:1647
void wall_unit_normal_fct(const Vector< double > &x, Vector< double > &normal)
Function that specifies the wall unit normal.
Definition: axi_static_cap.cc:62

References Global_Physical_Variables::Angle, Global_Physical_Variables::Ca, oomph::FluidInterfaceElement::ca_pt(), Constitutive::Constitutive_law_pt, G, i, GlobalPhysicalVariables::Re, GlobalPhysicalVariables::ReInvFr, oomph::FluidInterfaceElement::set_external_pressure_data(), and Global_Physical_Variables::wall_unit_normal_fct().

Referenced by RefineableRotatingCylinderProblem< ELEMENT >::RefineableRotatingCylinderProblem().

◆ set_boundary_conditions()

template<class ELEMENT >
void RefineableRotatingCylinderProblem< ELEMENT >::set_boundary_conditions
1138 {
1139  //Only bother to set non-zero velocity on the cylinder
1140  unsigned Nnode = Bulk_mesh_pt->nboundary_node(4);
1141  for(unsigned n=0;n<Nnode;n++)
1142  {
1143  //Get x and y
1144  double x = Bulk_mesh_pt->boundary_node_pt(4,n)->x(0);
1145  double y = Bulk_mesh_pt->boundary_node_pt(4,n)->x(1);
1146 
1147  //Now find the vector distance to the centre
1148  double len_x = x - Bulk_mesh_pt->domain_pt()->centre_x;
1149  double len_y = y - Bulk_mesh_pt->domain_pt()->centre_y;
1150 
1151  //Calculate the angle and radius
1152  double r = sqrt(len_x*len_x + len_y*len_y);
1153  double theta = atan2(len_y,len_x);
1154 
1155  //Now set the velocities
1156  Bulk_mesh_pt->boundary_node_pt(4,n)->set_value(0,-Omega*r*sin(theta));
1157  Bulk_mesh_pt->boundary_node_pt(4,n)->set_value(1, Omega*r*cos(theta));
1158  }
1159 }
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar atan2(const AnnoyingScalar &y, const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:139
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Scalar * y
Definition: level1_cplx_impl.h:128
double theta
Definition: two_d_biharmonic.cc:236
r
Definition: UniformPSDSelfTest.py:20
list x
Definition: plotDoE.py:28

References atan2(), cos(), n, oomph::SarahBL::Omega, UniformPSDSelfTest::r, sin(), sqrt(), BiharmonicTestFunctions2::theta, plotDoE::x, and y.

◆ solve()

template<class ELEMENT >
void RefineableRotatingCylinderProblem< ELEMENT >::solve
1163 {
1164  Newton_solver_tolerance = 1.0e-8;
1165  //Document the solution
1166  std::ofstream filenamee("input.dat");
1167  Bulk_mesh_pt->output(filenamee,5);
1168  Surface_mesh_pt->output(filenamee,5);
1169  //Point_mesh_pt->output(filenamee,5);
1170  filenamee.close();
1171 
1172  //Solve the initial value problem
1173  newton_solve();
1174 
1175  std::ofstream filename("first.dat");
1176  Bulk_mesh_pt->output(filename,5);
1178  //Point_mesh_pt->output(filename,5);
1179  filename.close();
1180 
1181  //Initialise the value of the arc-length
1182  double ds=0.001;
1183 
1184  std::ofstream trace("trace.dat");
1185 
1186  trace << Ca << " " << ReInvFr << " "
1187  << Bulk_mesh_pt->boundary_node_pt(2,0)->x(1) << std::endl;
1188 
1189 // bool flag=true, fflag=true;
1190 
1191  for(unsigned i=0;i<2;i++)
1192  {
1193  if(i<5)
1194  {
1195  //Decrease the contact angle
1196  Angle -= 0.1;
1197  newton_solve(2);
1198  //newton_solve();
1199  }
1200  else
1201  {
1202  //do an arc-length continuation step in Ca
1203  ds = arc_length_step_solve(&Ca,ds);
1204  }
1205 
1206  // if(flag)
1207 // {
1208 // //Do an arc-length continuation step in ReInvFr
1209 // ds = arc_length_step_solve(&ReInvFr,ds);
1210 // }
1211 // else
1212 // {
1213 // //Reset arc-length parameters
1214 // if(fflag) {reset_arc_length_parameters(); fflag=false;}
1215 // ds = 0.001;
1216 // //Now do it in Ca
1217 // ds = arc_length_step_solve(&Ca,ds);
1218 // }
1219 
1220 // if(Bulk_mesh_pt->boundary_node_pt(2,0)->x(1) < 4.0)
1221 // {flag=false;}
1222 
1223  trace << Ca << " " << ReInvFr << " " << Angle << " "
1224  << Bulk_mesh_pt->boundary_node_pt(2,0)->x(1) << std::endl;
1225 
1226  char file[100];
1227  sprintf(file,"step%i.dat",i);
1228  filename.open(file);
1229  Bulk_mesh_pt->output(filename,5);
1231  //Point_mesh_pt->output(filename,5);
1232  filename.close();
1233 
1234  //Now reset the values of the lagrange multipliers and the xi's
1235  //An updated lagrangian approach
1236 
1237  //Now loop over all the nodes and set their Lagrangian coordinates
1238  unsigned Nnode = Bulk_mesh_pt->nnode();
1239  for(unsigned n=0;n<Nnode;n++)
1240  {
1241  //Cast node to an elastic node
1242  SolidNode* temp_pt = static_cast<SolidNode*>(Bulk_mesh_pt->node_pt(n));
1243  for(unsigned j=0;j<2;j++) {temp_pt->xi(j) = temp_pt->x(j);}
1244  }
1245 
1246  //Find the number of free surface elements
1247  unsigned Nfree = Surface_mesh_pt->nelement();
1248  //Loop over the free surface elements
1249  for(unsigned n=0;n<Nfree;n++)
1250  {
1251  // Upcast from FiniteElement to the present element
1255  unsigned Nnode = temp_pt->nnode();
1256  //Reset the lagrange multipliers
1257  for(unsigned j=0;j<Nnode;j++) {temp_pt->lagrange(j) = 0.0;}
1258  }
1259  }
1260 
1261  //Document the solution
1262  //filename.open("output.dat");
1263  //Bulk_mesh_pt->output(filename,5);
1264  //filename.close();
1265  trace.close();
1266 }
double & lagrange(const unsigned &n)
Return the lagrange multiplier at local node n.
Definition: specific_node_update_interface_elements.h:830
void output(std::ostream &outfile)
Output for all elements.
Definition: mesh.cc:2027
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
double Newton_solver_tolerance
Definition: problem.h:596
void newton_solve()
Use Newton method to solve the problem.
Definition: problem.cc:8783
double arc_length_step_solve(double *const &parameter_pt, const double &ds, const unsigned &max_adapt=0)
Definition: problem.cc:10294
Definition: nodes.h:1686
double & xi(const unsigned &i)
Reference to i-th Lagrangian position.
Definition: nodes.h:1883
string filename
Definition: MergeRestartFiles.py:39
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References Global_Physical_Variables::Angle, Global_Physical_Variables::Ca, MergeRestartFiles::filename, i, j, oomph::ElasticUpdateFluidInterfaceElement< EQUATION_CLASS, DERIVATIVE_CLASS, ELEMENT >::lagrange(), n, oomph::FiniteElement::nnode(), GlobalPhysicalVariables::ReInvFr, oomph::Node::x(), and oomph::SolidNode::xi().

Member Data Documentation

◆ Angle

template<class ELEMENT >
double RefineableRotatingCylinderProblem< ELEMENT >::Angle

◆ Bo

◆ Bulk_mesh_pt

◆ Ca

◆ Constitutive_law_pt

◆ G

◆ Height

template<class ELEMENT >
double RefineableRotatingCylinderProblem< ELEMENT >::Height
private

◆ Length

template<class ELEMENT >
double RefineableRotatingCylinderProblem< ELEMENT >::Length
private

◆ Omega

template<class ELEMENT >
double RefineableRotatingCylinderProblem< ELEMENT >::Omega

◆ Point_mesh_pt

◆ Re

template<class ELEMENT >
double RefineableRotatingCylinderProblem< ELEMENT >::Re

◆ ReInvFr

◆ Surface_mesh_pt

◆ Traded_pressure_data_pt

template<class ELEMENT >
Data* RefineableRotatingCylinderProblem< ELEMENT >::Traded_pressure_data_pt
private

◆ Volume

template<class ELEMENT >
double RefineableRotatingCylinderProblem< ELEMENT >::Volume

◆ Volume_constraint_mesh_pt

template<class ELEMENT >
Mesh* RefineableRotatingCylinderProblem< ELEMENT >::Volume_constraint_mesh_pt

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