BaseStateProblem< BASE_ELEMENT > Class Template Reference

Base state problem class for Tuckerman counter-rotating lids problem. More...

+ Inheritance diagram for BaseStateProblem< BASE_ELEMENT >:

Public Member Functions

 BaseStateProblem (const unsigned &n_r, const unsigned &n_z, const double &domain_height)
 Constructor. More...
 
 ~BaseStateProblem ()
 Destructor (empty) More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem specs after solve (empty) More...
 
void actions_before_implicit_timestep ()
 Actions before the timestep (empty) More...
 
void actions_after_implicit_timestep ()
 Update the problem specs after solve (empty) More...
 
void set_initial_condition ()
 Set initial condition (incl previous timesteps) More...
 
void set_boundary_conditions ()
 Set the boundary conditions. More...
 
RectangularQuadMesh< BASE_ELEMENT > * mesh_pt ()
 Access function for the specific mesh. More...
 
void doc_solution (DocInfo &doc_info)
 Doc the solution. More...
 
 BaseStateProblem (const unsigned &n_r, const unsigned &n_z, const double &domain_height)
 Constructor. More...
 
 ~BaseStateProblem ()
 Destructor (empty) More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem specs after solve (empty) More...
 
void actions_before_implicit_timestep ()
 Actions before the timestep (empty) More...
 
void actions_after_implicit_timestep ()
 Update the problem specs after solve (empty) More...
 
void actions_after_adapt ()
 
void set_initial_condition ()
 Set initial condition (incl previous timesteps) More...
 
void set_boundary_conditions ()
 Set the boundary conditions. More...
 
RefineableRectangularQuadMesh< BASE_ELEMENT > * mesh_pt ()
 Access function for the specific mesh. More...
 
void doc_solution (DocInfo &doc_info)
 Doc the solution. More...
 
 BaseStateProblem (const unsigned &n_r, const unsigned &n_z, const double &domain_height)
 Constructor. More...
 
 ~BaseStateProblem ()
 Destructor (empty) More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem specs after solve (empty) More...
 
void actions_before_implicit_timestep ()
 
void actions_after_implicit_timestep ()
 Update the problem specs after solve (empty) More...
 
void set_initial_condition ()
 Set initial condition (incl previous timesteps) More...
 
void set_boundary_conditions ()
 Set the boundary conditions. More...
 
RectangularQuadMesh< BASE_ELEMENT > * mesh_pt ()
 Access function for the specific mesh. More...
 
SelfStartingBDF2time_stepper_pt ()
 Access function for the specific timestepper. More...
 
void doc_solution (DocInfo &doc_info, const bool &output_soln=true)
 Doc the solution. More...
 
void create_trace_file (DocInfo &doc_info)
 Create a trace file. More...
 
void initialise_trace_file ()
 Initialise trace file (print column headings) More...
 
void close_trace_file ()
 Clear and close trace file. More...
 
ofstream & trace_file ()
 Access function for trace file. More...
 
void pass_updated_nondim_parameters_to_elements ()
 
 BaseStateProblem (const unsigned &n_r, const unsigned &n_z, const double &domain_height)
 Constructor. More...
 
 ~BaseStateProblem ()
 Destructor (empty) More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem specs after solve (empty) More...
 
void actions_before_implicit_timestep ()
 
void actions_after_implicit_timestep ()
 Update the problem specs after solve (empty) More...
 
void actions_after_adapt ()
 
void set_initial_condition ()
 Set initial condition (incl previous timesteps) More...
 
void set_boundary_conditions ()
 Set the boundary conditions. More...
 
RefineableRectangularQuadMesh< BASE_ELEMENT > * mesh_pt ()
 Access function for the specific mesh. More...
 
SelfStartingBDF2time_stepper_pt ()
 Access function for the specific timestepper. More...
 
void doc_solution (DocInfo &doc_info, const bool &output_soln=true)
 Doc the solution. More...
 
void create_trace_file (DocInfo &doc_info)
 Create a trace file. More...
 
void initialise_trace_file ()
 Initialise trace file (print column headings) More...
 
void close_trace_file ()
 Clear and close trace file. More...
 
ofstream & trace_file ()
 Access function for trace file. More...
 
void pass_updated_nondim_parameters_to_elements ()
 
 BaseStateProblem (const unsigned &n_r, const unsigned &n_z, const double &radius_inner_cylinder, const double &radius_outer_cylinder, const double &l_z)
 Constructor. More...
 
 ~BaseStateProblem ()
 Destructor (empty) More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem specs after solve (empty) More...
 
void actions_before_implicit_timestep ()
 
void actions_after_implicit_timestep ()
 Update the problem specs after solve (empty) More...
 
void set_initial_condition ()
 Set initial condition (incl previous timesteps) More...
 
void set_boundary_conditions (const double &time)
 Set the boundary conditions. More...
 
RectangularQuadMesh< BASE_ELEMENT > * mesh_pt ()
 Access function for the specific mesh. More...
 
SelfStartingBDF2time_stepper_pt ()
 Access function for the specific timestepper. More...
 
void doc_solution (DocInfo &doc_info, const bool &output_soln)
 Doc the solution. More...
 
void create_trace_file (DocInfo &doc_info)
 Create a trace file. More...
 
void initialise_trace_file ()
 Initialise trace file (print column headings) More...
 
void close_trace_file ()
 Clear and close trace file. More...
 
ofstream & trace_file ()
 Access function for trace file. More...
 
 BaseStateProblem (const unsigned &n_r, const unsigned &n_z1, const unsigned &n_z2, const double &h1, const double &h2)
 Constructor for base state Tuckerman counter-rotating lids problem. More...
 
 ~BaseStateProblem ()
 Destructor (empty) More...
 
void set_initial_condition ()
 Set initial condition (incl previous timesteps) More...
 
void set_boundary_conditions ()
 Set the boundary conditions. More...
 
TIMESTEPPER * time_stepper_pt ()
 Access function for the specific timestepper. More...
 
void doc_solution (DocInfo *&doc_info_pt)
 Doc the solution. More...
 
void create_interface_elements ()
 Create interface elements at boundary between upper and lower layers. More...
 
TwoLayerSpineMesh< BASE_ELEMENT > * bulk_mesh_pt ()
 Access function for bulk mesh. More...
 
Meshsurface_mesh_pt ()
 Access function for surface mesh. 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 fix_pressure (const unsigned &e, const unsigned &pdof, const double &pvalue)
 Fix pressure in element e at pressure dof pdof and set to pvalue. More...
 
void fix_pressure (const unsigned &e, const unsigned &pdof, const double &pvalue)
 Fix pressure in element e at pressure dof pdof and set to pvalue. More...
 
void fix_pressure (const unsigned &e, const unsigned &pdof, const double &pvalue)
 Fix pressure in element e at pressure dof pdof and set to pvalue. More...
 
void fix_pressure (const unsigned &e, const unsigned &pdof, const double &pvalue)
 Fix pressure in element e at pressure dof pdof and set to pvalue. More...
 
void fix_pressure (const unsigned &e, const unsigned &pdof, const double &pvalue)
 Fix pressure in element e at pressure dof pdof and set to pvalue. More...
 
void actions_before_newton_convergence_check ()
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem specs after solve (empty) More...
 
void actions_before_implicit_timestep ()
 
void fix_pressure (const unsigned &e, const unsigned &pdof, const double &pvalue)
 Fix pressure in element e at pressure dof pdof and set to pvalue. More...
 

Private Attributes

ofstream Trace_file
 Trace file. More...
 
TwoLayerSpineMesh< BASE_ELEMENT > * Bulk_mesh_pt
 Pointer to the (specific) "bulk" mesh. More...
 
MeshSurface_mesh_pt
 Pointer to the "surface" mesh. More...
 
Vector< unsignedU_nodal_index
 Index at which the i-th velocity component is stored. 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_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 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 BASE_ELEMENT>
class BaseStateProblem< BASE_ELEMENT >

Base state problem class for Tuckerman counter-rotating lids problem.

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

////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// Base state problem class for the time-periodic Taylor–Couette problem

////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// Base state problem class for viscous two-layer rotating cylinder problem

Constructor & Destructor Documentation

◆ BaseStateProblem() [1/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::BaseStateProblem ( const unsigned n_r,
const unsigned n_z,
const double domain_height 
)

Constructor.

Constructor for base state Tuckerman counter-rotating lids problem.

155 {
156  // Build and assign mesh
157  Problem::mesh_pt() =
158  new RectangularQuadMesh<BASE_ELEMENT>(n_r,n_z,0.0,1.0,0.0,domain_height);
159 
160  // --------------------------------------------
161  // Set the boundary conditions for this problem
162  // --------------------------------------------
163 
164  // All nodes are free by default -- just pin the ones that have
165  // Dirichlet conditions here
166 
167  // Determine number of boundaries in the mesh
168  const unsigned n_boundary = mesh_pt()->nboundary();
169 
170  // Loop over boundaries
171  for(unsigned b=0;b<n_boundary;b++)
172  {
173  // Determine number of nodes on boundary b
174  const unsigned n_node = mesh_pt()->nboundary_node(b);
175 
176  // Loop over nodes on boundary b
177  for (unsigned n=0;n<n_node;n++)
178  {
179  // Pin radial velocity component on all boundaries
180  mesh_pt()->boundary_node_pt(b,n)->pin(0);
181 
182  // Pin azimuthal velocity component on all boundaries
183  mesh_pt()->boundary_node_pt(b,n)->pin(2);
184 
185  // Pin axial velocity component on all SOLID boundaries
186  if(b!=3) { mesh_pt()->boundary_node_pt(b,n)->pin(1); }
187  }
188  } // End of loop over mesh boundaries
189 
190  // ----------------------------------------------------------------
191  // Complete the problem setup to make the elements fully functional
192  // ----------------------------------------------------------------
193 
194  // Determine number of elements in the mesh
195  const unsigned n_element = mesh_pt()->nelement();
196 
197  // Loop over the elements
198  for(unsigned e=0;e<n_element;e++)
199  {
200  // Upcast from GeneralisedElement to the present element
201  BASE_ELEMENT *el_pt = dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e));
202 
203  // Set the Reynolds number
204  el_pt->re_pt() = &GlobalPhysicalVariables::Re;
205 
206  // Set the Womersley number
207  el_pt->re_st_pt() = &GlobalPhysicalVariables::ReSt;
208 
209  // Set the product of the Reynolds number and the inverse of the
210  // Froude number
211  el_pt->re_invfr_pt() = &GlobalPhysicalVariables::ReInvFr;
212 
213  // Set the direction of gravity
214  el_pt->g_pt() = &GlobalPhysicalVariables::G;
215 
216  // The mesh remains fixed
217  el_pt->disable_ALE();
218 
219  } // End of loop over elements
220 
221  // Set the pressure in first element at 'node' 0 to 0.0
222  fix_pressure(0,0,0.0);
223 
224  // Set up equation numbering scheme
225  std::cout << "Number of equations: " << assign_eqn_numbers() << std::endl;
226 
227 } // End of base state constructor
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Scalar * b
Definition: benchVecAdd.cpp:17
RectangularQuadMesh< BASE_ELEMENT > * mesh_pt()
Access function for the specific mesh.
Definition: axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:124
void fix_pressure(const unsigned &e, const unsigned &pdof, const double &pvalue)
Fix pressure in element e at pressure dof pdof and set to pvalue.
Definition: axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:136
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Definition: problem.cc:1989
Definition: rectangular_quadmesh.template.h:59
double ReInvFr
Product of Rynolds number and inverse of Froude number.
Definition: axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:67
double Re
Reynolds number.
Definition: axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:61
Vector< double > G(3)
Direction of gravity.
double ReSt
Product of Reynolds and Strouhal numbers.
Definition: axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:64

References b, e(), GlobalPhysicalVariables::G, n, GlobalPhysicalVariables::Re, GlobalPhysicalVariables::ReInvFr, and GlobalPhysicalVariables::ReSt.

◆ ~BaseStateProblem() [1/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::~BaseStateProblem ( )
inline

Destructor (empty)

103 {}

◆ BaseStateProblem() [2/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::BaseStateProblem ( const unsigned n_r,
const unsigned n_z,
const double domain_height 
)

Constructor.

◆ ~BaseStateProblem() [2/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::~BaseStateProblem ( )
inline

Destructor (empty)

105 {}

◆ BaseStateProblem() [3/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::BaseStateProblem ( const unsigned n_r,
const unsigned n_z,
const double domain_height 
)

Constructor.

◆ ~BaseStateProblem() [3/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::~BaseStateProblem ( )
inline

Destructor (empty)

113 {}

◆ BaseStateProblem() [4/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::BaseStateProblem ( const unsigned n_r,
const unsigned n_z,
const double domain_height 
)

Constructor.

◆ ~BaseStateProblem() [4/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::~BaseStateProblem ( )
inline

Destructor (empty)

113 {}

◆ BaseStateProblem() [5/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::BaseStateProblem ( const unsigned n_r,
const unsigned n_z,
const double radius_inner_cylinder,
const double radius_outer_cylinder,
const double l_z 
)

Constructor.

Constructor for base state time-periodic Taylor–Couette problem.

221 {
222  // Be less verbose during newton solve
223  Problem::disable_info_in_newton_solve();
224 
225  // Be less verbose about linear solve timings
227 
228  // Overwrite maximum allowed residual to accomodate possibly
229  // poor initial guess for solution
230  Problem::Max_residuals=1000;
231 
232  // Allocate the timestepper (this constructs the time object as well)
234 
235  // Build and assign mesh
236  Problem::mesh_pt() =
237  new RectangularQuadMesh<BASE_ELEMENT>(n_r,n_z,radius_inner_cylinder,
238  radius_outer_cylinder,0.0,l_z,
239  time_stepper_pt());
240 
241  // --------------------------------------------
242  // Set the boundary conditions for this problem
243  // --------------------------------------------
244 
245  // All nodes are free by default -- just pin the ones that have
246  // Dirichlet conditions here
247 
248  // Determine number of boundaries in the mesh
249  const unsigned n_boundary = mesh_pt()->nboundary();
250 
251  // Loop over boundaries
252  for(unsigned b=0;b<n_boundary;b++)
253  {
254  // Determine number of nodes on boundary b
255  const unsigned n_node = mesh_pt()->nboundary_node(b);
256 
257  // Loop over nodes on boundary b
258  for (unsigned n=0;n<n_node;n++)
259  {
260  // Pin axial velocity component on all boundaries
261  mesh_pt()->boundary_node_pt(b,n)->pin(1);
262 
263  // Pin radial and azimuthal velocity components on all solid boundaries
264  if(b==1 || b==3)
265  {
266  mesh_pt()->boundary_node_pt(b,n)->pin(0); // Radial
267  mesh_pt()->boundary_node_pt(b,n)->pin(2); // Azimuthal
268  }
269  } // End of loop over nodes on boundary b
270  } // End of loop over mesh boundaries
271 
272  // Determine total number of nodes in mesh
273  const unsigned n_node = mesh_pt()->nnode();
274 
275  // Pin all radial and axial velocities throughout the bulk of the domain
276  for(unsigned n=0;n<n_node;n++)
277  {
278 // mesh_pt()->node_pt(n)->pin(0); // Radial
279 // mesh_pt()->node_pt(n)->pin(1); // Axial
280  }
281 
282  // ----------------------------------------------------------------
283  // Complete the problem setup to make the elements fully functional
284  // ----------------------------------------------------------------
285 
286  // Determine number of elements in the mesh
287  const unsigned n_element = mesh_pt()->nelement();
288 
289  // Loop over the elements
290  for(unsigned e=0;e<n_element;e++)
291  {
292  // Upcast from GeneralisedElement to the present element
293  BASE_ELEMENT *el_pt = dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e));
294 
295  // Set the Reynolds number
296  el_pt->re_pt() = &GlobalPhysicalVariables::Re;
297 
298  // Set the Womersley number
299  el_pt->re_st_pt() = &GlobalPhysicalVariables::ReSt;
300 
301  // Set the product of the Reynolds number and the inverse of the
302  // Froude number
303  el_pt->re_invfr_pt() = &GlobalPhysicalVariables::ReInvFr;
304 
305  // Set the direction of gravity
306  el_pt->g_pt() = &GlobalPhysicalVariables::G;
307 
308  // The mesh remains fixed
309  el_pt->disable_ALE();
310 
311  } // End of loop over elements
312 
313  // Set the pressure in first element at 'node' 0 to 0.0
314  fix_pressure(0,0,0.0);
315 
316  // Set up equation numbering scheme
317  std::cout << "Number of equations: " << assign_eqn_numbers() << std::endl;
318 
319 } // End of base state constructor
SelfStartingBDF2 * time_stepper_pt()
Access function for the specific timestepper.
Definition: linearised_axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:145
void disable_doc_time()
Disable documentation of solve times.
Definition: linear_solver.h:116
void add_time_stepper_pt(TimeStepper *const &time_stepper_pt)
Definition: problem.cc:1545
LinearSolver *& linear_solver_pt()
Return a pointer to the linear solver object.
Definition: problem.h:1466
Self-starting BDF2 timestepper class.
Definition: self_starting_BDF2_timestepper.h:37

References b, e(), GlobalPhysicalVariables::G, n, GlobalPhysicalVariables::Re, GlobalPhysicalVariables::ReInvFr, and GlobalPhysicalVariables::ReSt.

◆ ~BaseStateProblem() [5/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::~BaseStateProblem ( )
inline

Destructor (empty)

126 {}

◆ BaseStateProblem() [6/6]

template<class BASE_ELEMENT , class TIMESTEPPER >
BaseStateProblem< BASE_ELEMENT, TIMESTEPPER >::BaseStateProblem ( const unsigned n_r,
const unsigned n_z1,
const unsigned n_z2,
const double h1,
const double h2 
)

Constructor for base state Tuckerman counter-rotating lids problem.

Constructor: Pass the width of the domain in the r direction, and the heights of both bottom (fluid 1) and top (fluid 2) layers. Also pass the number of elements in both horizontal regions in the r direction and the number of elements in all three vertical regions in the z direction, along with the fractions which determine the spacings of those regions.

238 {
239  // Always take one newton step even if the initial residuals are
240  // below the required tolerance
241  Problem::Always_take_one_newton_step = true;
242 
243  // Allocate the timestepper (this constructs the time object as well)
244  add_time_stepper_pt(new TIMESTEPPER);
245 
246  // Build and assign "bulk" mesh
248  (n_r,n_z1,n_z2,1.0,h1,h2,time_stepper_pt());
249 
250  // Create "surface mesh" that will contain only the interface elements.
251  // The constructor just creates the mesh without giving it any elements,
252  // nodes, etc.
253  Surface_mesh_pt = new Mesh;
254 
255  // Add the two sub meshes to the problem
258 
259  // Combine all submeshes into a single Mesh
261 
262  // -------------------------------------------------------------------
263  // Get information from elements about the order of nodal data storage
264  // -------------------------------------------------------------------
265 
266  // Get a pointer to the first element in the mesh -- note that we
267  // are assuming that the indices will be the same in each element
268  BASE_ELEMENT* el_pt = dynamic_cast<BASE_ELEMENT*>
269  (Bulk_mesh_pt->element_pt(0));
270 
271  // Determine indices at which velocities are stored
272  this->U_nodal_index.resize(3);
273  for(unsigned i=0;i<3;i++)
274  {
275  U_nodal_index[i] = el_pt->u_index_axi_nst(i);
276  }
277 
278  // --------------------------------------------
279  // Set the boundary conditions for this problem
280  // --------------------------------------------
281 
282  // Determine number of nodes in the mesh
283  const unsigned n_node = Bulk_mesh_pt->nnode();
284 
285  // Pin all azimuthal velocities throughout the bulk of the domain
286  for(unsigned n=0;n<n_node;n++)
287  {
288  for(unsigned i=0;i<3;i++)
289  {
291  }
292  }
293 
294  // ------------------------------------
295  // Pin all velocity dofs in the problem
296  // ------------------------------------
297 
298  // Loop over all nodes
299  for(unsigned n=0;n<n_node;n++)
300  {
301  // Loop over the velocity components and pin the value
302  for(unsigned i=0;i<3;i++) { Bulk_mesh_pt->node_pt(n)->pin(i); }
303  }
304 
305  // ----------------------
306  // Prescribe the pressure
307  // ----------------------
308 
309  // Determine number of bulk elements in lower and upper fluid
310  const unsigned n_lower = Bulk_mesh_pt->nlower();
311  const unsigned n_upper = Bulk_mesh_pt->nupper();
312 
313  // Loop over elements in the lower layer
314  for(unsigned e=0;e<n_lower;e++)
315  {
316  // Upcast from GeneralisedElement to the present element
317  BASE_ELEMENT *el_pt = dynamic_cast<BASE_ELEMENT*>
319 
320  // In these 9-node elements, the 4-th node is always positioned at s1=0,s2=0
321  // where s1, s2 are the local coordinates (and the "first" node is the 0-th)
322  const double eulerian_z_pos_middle_node = el_pt->node_pt(4)->x(1);
323 
324  // Determine the value of the pressure at this node
325  const double p_val_at_middle_node =
327  GlobalPhysicalVariables::ReInvFr*eulerian_z_pos_middle_node;
328 
329  // Specify the pressure analytically
330  el_pt->fix_pressure(0,p_val_at_middle_node);
331  el_pt->fix_pressure(1,0.0);
332  el_pt->fix_pressure(2,(GlobalPhysicalVariables::G[1]*
333  GlobalPhysicalVariables::ReInvFr/(n_z1+n_z2)));
334  }
335 
336  // Loop over elements in the upper layer
337  for(unsigned e=0;e<n_upper;e++)
338  {
339  // Upcast from GeneralisedElement to the present element
340  BASE_ELEMENT *el_pt = dynamic_cast<BASE_ELEMENT*>
342 
343  // In these elements, the 4-th node is always positioned at s1=0,s2=0
344  // where s1, s2 are the local coordinates (and the "first" node is the 0-th)
345  const double eulerian_z_pos_middle_node = el_pt->node_pt(4)->x(1);
346 
347  // Determine the value of the pressure at this node
348  const double p_val_at_middle_node =
351  GlobalPhysicalVariables::ReInvFr*eulerian_z_pos_middle_node;
352 
353  // Specify the pressure analytically
354  el_pt->fix_pressure(0,p_val_at_middle_node
358  el_pt->fix_pressure(1,0.0);
359  el_pt->fix_pressure(2,(GlobalPhysicalVariables::G[1]*
361  GlobalPhysicalVariables::ReInvFr/(n_z1+n_z2)));
362  }
363 
364  // ---------------------
365  // Pin all spine heights
366  // ---------------------
367 
368  // Determine the number of spines in the mesh
369  const unsigned n_spine = Bulk_mesh_pt->nspine();
370 
371  // Loop over all spines
372  for(unsigned i=0;i<n_spine;i++)
373  {
374  // Pin the spine height
376 
377  // Set the value to the height of the lower fluid layer (h1)
379  }
380 
381  // ----------------------------------------------------------------
382  // Complete the problem setup to make the elements fully functional
383  // ----------------------------------------------------------------
384 
385  // Loop over bulk elements in lower fluid
386  for(unsigned e=0;e<n_lower;e++)
387  {
388  // Upcast from GeneralisedElement to the present element
389  BASE_ELEMENT* el_pt = dynamic_cast<BASE_ELEMENT*>
391 
392  // Set the Reynolds number
393  el_pt->re_pt() = &GlobalPhysicalVariables::Re;
394 
395  // Set the Womersley number
396  el_pt->re_st_pt() = &GlobalPhysicalVariables::ReSt;
397 
398  // Set the product of the Reynolds number and inverse Froude number
399  el_pt->re_invfr_pt() = &GlobalPhysicalVariables::ReInvFr;
400 
401  // Set the direction of gravity
402  el_pt->g_pt() = &GlobalPhysicalVariables::G;
403 
404  } // End of loop over bulk elements in lower fluid
405 
406  // Loop over bulk elements in upper fluid
407  for(unsigned e=0;e<n_upper;e++)
408  {
409  // Upcast from GeneralisedElement to the present element
410  BASE_ELEMENT* el_pt = dynamic_cast<BASE_ELEMENT*>
412 
413  // Set the Reynolds number
414  el_pt->re_pt() = &GlobalPhysicalVariables::Re;
415 
416  // Set the Womersley number
417  el_pt->re_st_pt() = &GlobalPhysicalVariables::ReSt;
418 
419  // Set the product of the Reynolds number and inverse Froude number
420  el_pt->re_invfr_pt() = &GlobalPhysicalVariables::ReInvFr;
421 
422  // Set the direction of gravity
423  el_pt->g_pt() = &GlobalPhysicalVariables::G;
424 
425  // Set the viscosity ratio
426  el_pt->viscosity_ratio_pt() = &GlobalPhysicalVariables::Viscosity_Ratio;
427 
428  // Set the density ratio
429  el_pt->density_ratio_pt() = &GlobalPhysicalVariables::Density_Ratio;
430 
431  } // End of loop over bulk elements in upper fluid
432 
433  // Set the pressure in the first element at 'node' 0 to 0.0
434  fix_pressure(0,0,0.0);
435 
436  // Pin all the spine heights
437  for(unsigned s=0;s<n_spine;s++)
438  {
440  }
441 
442  // Set up equation numbering scheme
443  std::cout << "Number of equations: " << assign_eqn_numbers() << std::endl;
444 
445 } // End of base state constructor
int i
Definition: BiCGSTAB_step_by_step.cpp:9
TwoLayerSpineMesh< BASE_ELEMENT > * Bulk_mesh_pt
Pointer to the (specific) "bulk" mesh.
Definition: two_layer_interface_nonaxisym_perturbations.cc:219
Vector< unsigned > U_nodal_index
Index at which the i-th velocity component is stored.
Definition: two_layer_interface_nonaxisym_perturbations.cc:225
Mesh * Surface_mesh_pt
Pointer to the "surface" mesh.
Definition: two_layer_interface_nonaxisym_perturbations.cc:222
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: mesh.h:67
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
unsigned add_sub_mesh(Mesh *const &mesh_pt)
Definition: problem.h:1330
void build_global_mesh()
Definition: problem.cc:1493
SpineNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global SpineNode.
Definition: spines.h:648
unsigned long nspine() const
Return the number of spines in the mesh.
Definition: spines.h:635
Spine *& spine_pt(const unsigned long &i)
Return the i-th spine in the mesh.
Definition: spines.h:623
Data *& spine_height_pt()
Access function to Data object that stores the spine height.
Definition: spines.h:156
FiniteElement *& upper_layer_element_pt(const unsigned long &i)
Access functions for pointers to elements in upper layer.
Definition: two_layer_spine_mesh.template.h:111
FiniteElement *& lower_layer_element_pt(const unsigned long &i)
Access functions for pointers to elements in bottom layer.
Definition: two_layer_spine_mesh.template.h:117
unsigned long nupper() const
Number of elements in upper layer.
Definition: two_layer_spine_mesh.template.h:123
unsigned long nlower() const
Number of elements in top layer.
Definition: two_layer_spine_mesh.template.h:129
RealScalar s
Definition: level1_cplx_impl.h:130
double Viscosity_Ratio
Definition: two_layer_interface_nonaxisym_perturbations.cc:85
double Density_Ratio
Definition: two_layer_interface_nonaxisym_perturbations.cc:89

References GlobalPhysicalVariables::Density_Ratio, e(), GlobalPhysicalVariables::G, i, n, GlobalPhysicalVariables::Re, GlobalPhysicalVariables::ReInvFr, GlobalPhysicalVariables::ReSt, s, and GlobalPhysicalVariables::Viscosity_Ratio.

◆ ~BaseStateProblem() [6/6]

template<class BASE_ELEMENT >
BaseStateProblem< BASE_ELEMENT >::~BaseStateProblem ( )
inline

Destructor (empty)

163 {}

Member Function Documentation

◆ actions_after_adapt() [1/2]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_adapt ( )
inlinevirtual

After adaptation: Pin pressure again (the previously pinned value might have disappeared) and pin redudant pressure dofs

Reimplemented from oomph::Problem.

122  {
123  // Unpin all pressure dofs
124  RefineableAxisymmetricNavierStokesEquations::
125  unpin_all_pressure_dofs(mesh_pt()->element_pt());
126 
127  // Pin redudant pressure dofs
128  RefineableAxisymmetricNavierStokesEquations::
129  pin_redundant_nodal_pressures(mesh_pt()->element_pt());
130 
131  // Now set the pressure in first element at 'node' 0 to 0.0
132  fix_pressure(0,0,0.0);
133 
134  } // End of actions_after_adapt

◆ actions_after_adapt() [2/2]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_adapt ( )
inlinevirtual

After adaptation: Pin pressure again (the previously pinned value might have disappeared) and pin redudant pressure dofs

Reimplemented from oomph::Problem.

134  {
135  // Unpin all pressure dofs
136  RefineableAxisymmetricNavierStokesEquations::
137  unpin_all_pressure_dofs(mesh_pt()->element_pt());
138 
139  // Pin redudant pressure dofs
140  RefineableAxisymmetricNavierStokesEquations::
141  pin_redundant_nodal_pressures(mesh_pt()->element_pt());
142 
143  // Now set the pressure in first element at 'node' 0 to 0.0
144  fix_pressure(0,0,0.0);
145 
146  } // End of actions_after_adapt

◆ actions_after_implicit_timestep() [1/5]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_implicit_timestep ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

115 {}

◆ actions_after_implicit_timestep() [2/5]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_implicit_timestep ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

117 {}

◆ actions_after_implicit_timestep() [3/5]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_implicit_timestep ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

129 {}

◆ actions_after_implicit_timestep() [4/5]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_implicit_timestep ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

129 {}

◆ actions_after_implicit_timestep() [5/5]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_implicit_timestep ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

142 {}

◆ actions_after_newton_solve() [1/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

109 {}

◆ actions_after_newton_solve() [2/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

111 {}

◆ actions_after_newton_solve() [3/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

119 {}

◆ actions_after_newton_solve() [4/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

119 {}

◆ actions_after_newton_solve() [5/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

132 {}

◆ actions_after_newton_solve() [6/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_after_newton_solve ( )
inlineprivatevirtual

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

204 {}

◆ actions_before_implicit_timestep() [1/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_implicit_timestep ( )
inlinevirtual

Actions before the timestep (empty)

Reimplemented from oomph::Problem.

112 {}

◆ actions_before_implicit_timestep() [2/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_implicit_timestep ( )
inlinevirtual

Actions before the timestep (empty)

Reimplemented from oomph::Problem.

114 {}

◆ actions_before_implicit_timestep() [3/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_implicit_timestep ( )
inlinevirtual

Actions before the timestep (update the the time-dependent boundary conditions)

Reimplemented from oomph::Problem.

124  {
126  }
void set_boundary_conditions()
Set the boundary conditions.
Definition: axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:265

◆ actions_before_implicit_timestep() [4/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_implicit_timestep ( )
inlinevirtual

Actions before the timestep (update the the time-dependent boundary conditions)

Reimplemented from oomph::Problem.

124  {
126  }

◆ actions_before_implicit_timestep() [5/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_implicit_timestep ( )
inlinevirtual

Actions before the timestep (update the the time-dependent boundary conditions)

Reimplemented from oomph::Problem.

137  {
139  }
Time *& time_pt()
Return a pointer to the global time object.
Definition: problem.h:1504
double & time()
Return the current value of continuous time.
Definition: problem.cc:11531

◆ actions_before_implicit_timestep() [6/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_implicit_timestep ( )
inlineprivatevirtual

Actions before the timestep (update the the time-dependent boundary conditions)

Reimplemented from oomph::Problem.

208 {}

◆ actions_before_newton_convergence_check()

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_newton_convergence_check ( )
inlineprivatevirtual

Spine heights/lengths are unknowns in the problem so their values get corrected during each Newton step. However, changing their value does not automatically change the nodal positions, so we need to update all of them here.

Reimplemented from oomph::Problem.

196  {
198  }
void node_update(const bool &update_all_solid_nodes=false)
Definition: spines.cc:84

◆ actions_before_newton_solve() [1/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

106 {}

◆ actions_before_newton_solve() [2/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

108 {}

◆ actions_before_newton_solve() [3/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

116 {}

◆ actions_before_newton_solve() [4/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

116 {}

◆ actions_before_newton_solve() [5/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

129 {}

◆ actions_before_newton_solve() [6/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::actions_before_newton_solve ( )
inlineprivatevirtual

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

201 {}

◆ bulk_mesh_pt()

template<class BASE_ELEMENT >
TwoLayerSpineMesh<BASE_ELEMENT>* BaseStateProblem< BASE_ELEMENT >::bulk_mesh_pt ( )
inline

Access function for bulk mesh.

184 { return Bulk_mesh_pt; }

Referenced by main().

◆ close_trace_file() [1/3]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::close_trace_file ( )
inline

Clear and close trace file.

172 { Trace_file.clear(); Trace_file.close(); }
ofstream Trace_file
Trace file.
Definition: linearised_axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:211

References oomph::Problem_Parameter::Trace_file.

◆ close_trace_file() [2/3]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::close_trace_file ( )
inline

Clear and close trace file.

189 { Trace_file.clear(); Trace_file.close(); }

References oomph::Problem_Parameter::Trace_file.

◆ close_trace_file() [3/3]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::close_trace_file ( )
inline

Clear and close trace file.

186  {
187  Trace_file.clear();
188  Trace_file.close();
189  }

References oomph::Problem_Parameter::Trace_file.

◆ create_interface_elements()

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::create_interface_elements ( )

Create interface elements at boundary between upper and lower layers.

◆ create_trace_file() [1/3]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::create_trace_file ( DocInfo doc_info)
inline

Create a trace file.

155  {
156  // Open trace file
157  char filename[256];
158  sprintf(filename,"%s/base_trace_k%i_Re%4.2f.dat",
159  doc_info.directory().c_str(),
162  Trace_file.open(filename);
163  }
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
int k
Azimuthal mode number k in e^ik(theta) decomposition.
Definition: axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:73
double Re_current
Definition: linearised_axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:70
string filename
Definition: MergeRestartFiles.py:39

References oomph::DocInfo::directory(), MergeRestartFiles::filename, GlobalPhysicalVariables::k, GlobalPhysicalVariables::Re_current, and oomph::Problem_Parameter::Trace_file.

◆ create_trace_file() [2/3]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::create_trace_file ( DocInfo doc_info)
inline

Create a trace file.

172  {
173  // Open trace file
174  char filename[256];
175  sprintf(filename,"%s/base_trace_k%i_Re%4.2f.dat",
176  doc_info.directory().c_str(),
179  Trace_file.open(filename);
180  }

References oomph::DocInfo::directory(), MergeRestartFiles::filename, GlobalPhysicalVariables::k, GlobalPhysicalVariables::Re_current, and oomph::Problem_Parameter::Trace_file.

◆ create_trace_file() [3/3]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::create_trace_file ( DocInfo doc_info)
inline

Create a trace file.

168  {
169  // Open trace file
170  char filename1[256];
171  sprintf(filename1,"%s/base_trace_epsilon%2.1f_Re%4.2f.dat",
172  doc_info.directory().c_str(),
175  Trace_file.open(filename1);
176  }
double Epsilon
Dimensionless modulation amplitude (epsilon)
Definition: time_periodic_taylor_couette.cc:84
double MMC_Re_current
Definition: time_periodic_taylor_couette.cc:73

References oomph::DocInfo::directory(), GlobalPhysicalVariables::Epsilon, GlobalPhysicalVariables::MMC_Re_current, and oomph::Problem_Parameter::Trace_file.

◆ doc_solution() [1/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::doc_solution ( DocInfo doc_info)

Doc the solution.

Document the base state solution.

336 {
337  ofstream some_file;
338  char filename[256];
339 
340  // Set number of plot points (in each coordinate direction)
341  const unsigned npts = 5;
342 
343  // Open solution output file
344  sprintf(filename,"%s/base_soln%i.dat",
345  doc_info.directory().c_str(),
346  doc_info.number());
347  some_file.open(filename);
348 
349  // Output solution to file
350  mesh_pt()->output(some_file,npts);
351 
352  // Close solution output file
353  some_file.close();
354 
355 } // End of doc_solution for base state
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554

References oomph::DocInfo::directory(), MergeRestartFiles::filename, and oomph::DocInfo::number().

Referenced by main().

◆ doc_solution() [2/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::doc_solution ( DocInfo doc_info)

Doc the solution.

◆ doc_solution() [3/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::doc_solution ( DocInfo doc_info,
const bool output_soln 
)

Doc the solution.

◆ doc_solution() [4/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::doc_solution ( DocInfo doc_info,
const bool output_soln = true 
)

Doc the solution.

Document the base state solution.

413 {
414  // Create vector of dofs
415  DoubleVector dofs;
416 
417  // Get dofs
418  this->get_dofs(dofs);
419 
420  // Get L2 norm of dof vector
421  const double dof_norm = dofs.norm();
422 
423  // Document in trace file
424  Trace_file << time_pt()->time() << " " << dof_norm << std::endl;
425 
426  // If desired, output solution to file
427  if(output_soln)
428  {
429  ofstream some_file;
430  char filename[256];
431 
432  // Set number of plot points (in each coordinate direction)
433  const unsigned npts = 5;
434 
435  // Open solution output file
436  sprintf(filename,"%s/base_soln_k%i_Re%4.2f_soln%i.dat",
437  doc_info.directory().c_str(),
440  doc_info.number());
441  some_file.open(filename);
442 
443  // Output solution to file
444  mesh_pt()->output(some_file,npts);
445 
446  // Close solution output file
447  some_file.close();
448  }
449 } // End of doc_solution for base state
Definition: double_vector.h:58
double norm() const
compute the 2 norm of this vector
Definition: double_vector.cc:867
void get_dofs(DoubleVector &dofs) const
Definition: problem.cc:2479
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123

References oomph::DocInfo::directory(), MergeRestartFiles::filename, GlobalPhysicalVariables::k, oomph::DoubleVector::norm(), oomph::DocInfo::number(), GlobalPhysicalVariables::Re_current, and oomph::Problem_Parameter::Trace_file.

◆ doc_solution() [5/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::doc_solution ( DocInfo doc_info,
const bool output_soln = true 
)

Doc the solution.

◆ doc_solution() [6/6]

template<class BASE_ELEMENT , class TIMESTEPPER >
void BaseStateProblem< BASE_ELEMENT, TIMESTEPPER >::doc_solution ( DocInfo *&  doc_info_pt)

Doc the solution.

Document the base state solution.

484 {
485  ofstream some_file;
486  char filename[256];
487 
488  // Set number of plot points (in each coordinate direction)
489  const unsigned npts_bulk = 2;
490 
491  // Open solution output file
492  sprintf(filename,"%s/base_soln%i.dat",
493  doc_info_pt->directory().c_str(),
494  doc_info_pt->number());
495  some_file.open(filename);
496 
497  // Output solution to file
498  Bulk_mesh_pt->output(some_file,npts_bulk);
499 
500  // Close solution output file
501  some_file.close();
502 
503 } // End of doc_solution for base state
void output(std::ostream &outfile)
Output for all elements.
Definition: mesh.cc:2027

References oomph::DocInfo::directory(), MergeRestartFiles::filename, and oomph::DocInfo::number().

◆ fix_pressure() [1/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::fix_pressure ( const unsigned e,
const unsigned pdof,
const double pvalue 
)
inlineprivate

Fix pressure in element e at pressure dof pdof and set to pvalue.

138  {
139  dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e))
140  ->fix_pressure(pdof,pvalue);
141  }

References e().

◆ fix_pressure() [2/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::fix_pressure ( const unsigned e,
const unsigned pdof,
const double pvalue 
)
inlineprivate

Fix pressure in element e at pressure dof pdof and set to pvalue.

157  {
158  dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e))
159  ->fix_pressure(pdof,pvalue);
160  }

References e().

◆ fix_pressure() [3/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::fix_pressure ( const unsigned e,
const unsigned pdof,
const double pvalue 
)
inlineprivate

Fix pressure in element e at pressure dof pdof and set to pvalue.

205  {
206  dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e))
207  ->fix_pressure(pdof,pvalue);
208  }

References e().

◆ fix_pressure() [4/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::fix_pressure ( const unsigned e,
const unsigned pdof,
const double pvalue 
)
inlineprivate

Fix pressure in element e at pressure dof pdof and set to pvalue.

222  {
223  dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e))
224  ->fix_pressure(pdof,pvalue);
225  }

References e().

◆ fix_pressure() [5/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::fix_pressure ( const unsigned e,
const unsigned pdof,
const double pvalue 
)
inlineprivate

Fix pressure in element e at pressure dof pdof and set to pvalue.

199  {
200  dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e))
201  ->fix_pressure(pdof,pvalue);
202  }

References e().

◆ fix_pressure() [6/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::fix_pressure ( const unsigned e,
const unsigned pdof,
const double pvalue 
)
inlineprivate

Fix pressure in element e at pressure dof pdof and set to pvalue.

213  {
214  dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e))
215  ->fix_pressure(pdof,pvalue);
216  }

References e().

◆ initialise_trace_file() [1/3]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::initialise_trace_file ( )
inline

Initialise trace file (print column headings)

167  {
168  Trace_file << "time, norm_of_dof_vector" << std::endl;
169  }

References oomph::Problem_Parameter::Trace_file.

◆ initialise_trace_file() [2/3]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::initialise_trace_file ( )
inline

Initialise trace file (print column headings)

184  {
185  Trace_file << "time, norm_of_dof_vector" << std::endl;
186  }

References oomph::Problem_Parameter::Trace_file.

◆ initialise_trace_file() [3/3]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::initialise_trace_file ( )
inline

Initialise trace file (print column headings)

180  {
181  Trace_file << "time, norm_of_dof_vector" << std::endl;
182  }

References oomph::Problem_Parameter::Trace_file.

◆ mesh_pt() [1/5]

template<class BASE_ELEMENT >
RectangularQuadMesh<BASE_ELEMENT>* BaseStateProblem< BASE_ELEMENT >::mesh_pt ( )
inline

Access function for the specific mesh.

125  {
126  return dynamic_cast<RectangularQuadMesh<BASE_ELEMENT>*>
127  (Problem::mesh_pt());
128  }

Referenced by main().

◆ mesh_pt() [2/5]

template<class BASE_ELEMENT >
RefineableRectangularQuadMesh<BASE_ELEMENT>* BaseStateProblem< BASE_ELEMENT >::mesh_pt ( )
inline

Access function for the specific mesh.

144  {
145  return dynamic_cast<RefineableRectangularQuadMesh<BASE_ELEMENT>*>
146  (Problem::mesh_pt());
147  }
Definition: rectangular_quadmesh.template.h:326

◆ mesh_pt() [3/5]

template<class BASE_ELEMENT >
RectangularQuadMesh<BASE_ELEMENT>* BaseStateProblem< BASE_ELEMENT >::mesh_pt ( )
inline

Access function for the specific mesh.

139  {
140  return dynamic_cast<RectangularQuadMesh<BASE_ELEMENT>*>
141  (Problem::mesh_pt());
142  }

◆ mesh_pt() [4/5]

template<class BASE_ELEMENT >
RefineableRectangularQuadMesh<BASE_ELEMENT>* BaseStateProblem< BASE_ELEMENT >::mesh_pt ( )
inline

Access function for the specific mesh.

156  {
157  return dynamic_cast<RefineableRectangularQuadMesh<BASE_ELEMENT>*>
158  (Problem::mesh_pt());
159  }

◆ mesh_pt() [5/5]

template<class BASE_ELEMENT >
RectangularQuadMesh<BASE_ELEMENT>* BaseStateProblem< BASE_ELEMENT >::mesh_pt ( )
inline

Access function for the specific mesh.

152  {
153  return dynamic_cast<RectangularQuadMesh<BASE_ELEMENT>*>(Problem::mesh_pt());
154  }

◆ pass_updated_nondim_parameters_to_elements() [1/2]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::pass_updated_nondim_parameters_to_elements ( )
inline
178  {
179  // Determine number of elements in the mesh
180  const unsigned n_element = this->mesh_pt()->nelement();
181 
182  // Loop over the elements
183  for(unsigned e=0;e<n_element;e++)
184  {
185  // Upcast from GeneralisedElement to the present element
186  BASE_ELEMENT *el_pt=dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e));
187 
188  // Set the Reynolds number
189  el_pt->re_pt() = &GlobalPhysicalVariables::Re_current;
190 
191  // Set the Womersley number
192  el_pt->re_st_pt() = &GlobalPhysicalVariables::ReSt_current;
193 
194  // Set the product of the Reynolds number and the inverse of the
195  // Froude number
196  el_pt->re_invfr_pt() = &GlobalPhysicalVariables::ReInvFr_current;
197  }
198  }
double ReInvFr_current
Definition: linearised_axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:72
double ReSt_current
Definition: linearised_axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:71

References e(), GlobalPhysicalVariables::Re_current, GlobalPhysicalVariables::ReInvFr_current, and GlobalPhysicalVariables::ReSt_current.

◆ pass_updated_nondim_parameters_to_elements() [2/2]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::pass_updated_nondim_parameters_to_elements ( )
inline
195  {
196  // Determine number of elements in the mesh
197  const unsigned n_element = this->mesh_pt()->nelement();
198 
199  // Loop over the elements
200  for(unsigned e=0;e<n_element;e++)
201  {
202  // Upcast from GeneralisedElement to the present element
203  BASE_ELEMENT *el_pt=dynamic_cast<BASE_ELEMENT*>(mesh_pt()->element_pt(e));
204 
205  // Set the Reynolds number
206  el_pt->re_pt() = &GlobalPhysicalVariables::Re_current;
207 
208  // Set the Womersley number
209  el_pt->re_st_pt() = &GlobalPhysicalVariables::ReSt_current;
210 
211  // Set the product of the Reynolds number and the inverse of the
212  // Froude number
213  el_pt->re_invfr_pt() = &GlobalPhysicalVariables::ReInvFr_current;
214  }
215  }

References e(), GlobalPhysicalVariables::Re_current, GlobalPhysicalVariables::ReInvFr_current, and GlobalPhysicalVariables::ReSt_current.

◆ set_boundary_conditions() [1/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_boundary_conditions

Set the boundary conditions.

Reset the boundary conditions for the current time.

266 {
267  // Set fraction along lid, "a", after which to apply "smoothing"
268  // of boundary conditions (0 < a < 1)
269  const double a = 0.96;
270 
271  // Determine number of mesh boundaries
272  const unsigned n_boundary = mesh_pt()->nboundary();
273 
274  // Loop over mesh boundaries
275  for(unsigned b=0;b<n_boundary;b++)
276  {
277  // Determine number of nodes on boundary b
278  const unsigned n_node = mesh_pt()->nboundary_node(b);
279 
280  // Loop over nodes on boundary b
281  for(unsigned n=0;n<n_node;n++)
282  {
283  // Set up pointer to node
284  Node* nod_pt = mesh_pt()->boundary_node_pt(b,n);
285 
286  // Get the radial value
287  double r = mesh_pt()->boundary_node_pt(b,n)->x(0);
288 
289  // Provide storage for azimuthal velocity value
290  double azi_vel = 0.0;
291 
292  // Apply "smoothing" if r > a
293  if(r>a) { azi_vel = a*(1.0-r)/(1.0-a); }
294  else { azi_vel = r; }
295 
296  // Loop over the three velocity components
297  for(unsigned i=0;i<3;i++)
298  {
299  switch(b)
300  {
301  // Outer wall (all components = 0)
302  case 1:
303  nod_pt->set_value(0,i,0.0);
304  break;
305 
306  // Top lid (azimuthal component = r, others = 0)
307  case 2:
308  if(i==2) { nod_pt->set_value(0,i,azi_vel); }
309  else { nod_pt->set_value(0,i,0.0); }
310  break;
311 
312  // Bottom lid (azimuthal component = -r, others = 0)
313  case 0:
314  if(i==2) { nod_pt->set_value(0,i,-azi_vel); }
315  else { nod_pt->set_value(0,i,0.0); }
316  break;
317 
318  // Symmetry boundary (axial component not set, others = 0)
319  case 3:
320  if(i!=1) { nod_pt->set_value(0,i,0.0); }
321  break;
322  }
323  } // End of loop over velocity components
324  } // End of loop over nodes on boundary b
325  } // End of loop over mesh boundaries
326 } // End of set_boundary_conditions for base state
Definition: nodes.h:906
const Scalar * a
Definition: level2_cplx_impl.h:32
r
Definition: UniformPSDSelfTest.py:20

References a, b, i, n, UniformPSDSelfTest::r, and oomph::Data::set_value().

◆ set_boundary_conditions() [2/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_boundary_conditions ( )

Set the boundary conditions.

◆ set_boundary_conditions() [3/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_boundary_conditions ( )

Set the boundary conditions.

◆ set_boundary_conditions() [4/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_boundary_conditions ( )

Set the boundary conditions.

◆ set_boundary_conditions() [5/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_boundary_conditions ( )

Set the boundary conditions.

◆ set_boundary_conditions() [6/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_boundary_conditions ( const double time)

Set the boundary conditions.

Reset the boundary conditions for the current time.

357 {
358  // Cache radius ratio
359  const double eta = GlobalPhysicalVariables::Eta;
360 
361  // Determine number of mesh boundaries
362  const unsigned n_boundary = mesh_pt()->nboundary();
363 
364  // Loop over mesh boundaries
365  for(unsigned b=0;b<n_boundary;b++)
366  {
367  // Determine number of nodes on boundary b
368  const unsigned n_node = mesh_pt()->nboundary_node(b);
369 
370  // Loop over nodes on boundary b
371  for(unsigned n=0;n<n_node;n++)
372  {
373  // Loop over the three velocity components
374  for(unsigned i=0;i<3;i++)
375  {
376  // For the inner solid boundary (boundary 3)
377  if(b==3)
378  {
379  // Evaluate boundary condition
380  double azi_vel=eta*GlobalPhysicalVariables::MMC_Re_current/(1.0-eta);
381 
382  // Set all velocity components to no flow along boundary
383  switch(i)
384  {
385  case 2: // Azimuthal velocity
386  mesh_pt()->boundary_node_pt(b,n)->set_value(0,i,azi_vel);
387  break;
388  case 1: // Axial velocity
389  mesh_pt()->boundary_node_pt(b,n)->set_value(0,i,0.0);
390  break;
391  case 0: // Radial velocity
392  mesh_pt()->boundary_node_pt(b,n)->set_value(0,i,0.0);
393  break;
394  }
395  }
396 
397  // For the outer solid boundary (boundary 1)
398  if(b==1)
399  {
400  // Evaluate time-dependent boundary condition
401  double azi_vel
405 
406  // Set all velocity components to no flow along boundary
407  switch(i)
408  {
409  case 2: // Azimuthal velocity
410  mesh_pt()->boundary_node_pt(b,n)->set_value(0,i,azi_vel);
411  break;
412  case 1: // Axial velocity
413  mesh_pt()->boundary_node_pt(b,n)->set_value(0,i,0.0);
414  break;
415  case 0: // Radial velocity
416  mesh_pt()->boundary_node_pt(b,n)->set_value(0,i,0.0);
417  break;
418  }
419  }
420 
421  // For the symmetry boundaries (boundaries 0 and 2)
422  if(b==0 || b==2)
423  {
424  // Set only the axial (i=1) velocity component to zero
425  // (no penetration of symmetry boundary)
426  if(i==1) { mesh_pt()->boundary_node_pt(b,n)->set_value(0,i,0.0); }
427  }
428  } // End of loop over velocity components
429  } // End of loop over nodes on boundary b
430  } // End of loop over mesh boundaries
431 } // End of set_boundary_conditions for base state
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
double AngularFrequency
Angular frequency of outer cylinder rotation (omega = 2*gamma^2)
Definition: time_periodic_taylor_couette.cc:81
double Eta
Radius ratio (radius of inner cylinder / radius of outer cylinder)
Definition: time_periodic_taylor_couette.cc:87
double eta
Definition: foeppl_von_karman/circular_disk/circular_disk.cc:45

References GlobalPhysicalVariables::AngularFrequency, b, cos(), GlobalPhysicalVariables::Epsilon, TestSoln::eta, GlobalPhysicalVariables::Eta, i, GlobalPhysicalVariables::MMC_Re_current, and n.

◆ set_initial_condition() [1/6]

template<class BASE_ELEMENT , class TIMESTEPPER >
void BaseStateProblem< BASE_ELEMENT, TIMESTEPPER >::set_initial_condition
virtual

Set initial condition (incl previous timesteps)

Set the initial conditions to be zero everywhere for base state.

Reimplemented from oomph::Problem.

237 {
238  // Determine number of nodes in mesh
239  const unsigned n_node = mesh_pt()->nnode();
240 
241  // Loop over all nodes in mesh
242  for(unsigned n=0;n<n_node;n++)
243  {
244  // Loop over the three velocity components
245  for(unsigned i=0;i<3;i++)
246  {
247  // Set velocity component i of node n to zero
248  mesh_pt()->node_pt(n)->set_value(i,0.0);
249  }
250  }
251 
252  // Initialise the previous velocity values for timestepping
253  // corresponding to an impulsive start
255 
256 } // End of set_initial_condition for base state
void assign_initial_values_impulsive()
Definition: problem.cc:11499

References i, and n.

Referenced by main().

◆ set_initial_condition() [2/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_initial_condition ( )
virtual

Set initial condition (incl previous timesteps)

Reimplemented from oomph::Problem.

◆ set_initial_condition() [3/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_initial_condition ( )
virtual

Set initial condition (incl previous timesteps)

Reimplemented from oomph::Problem.

◆ set_initial_condition() [4/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_initial_condition ( )
virtual

Set initial condition (incl previous timesteps)

Reimplemented from oomph::Problem.

◆ set_initial_condition() [5/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_initial_condition ( )
virtual

Set initial condition (incl previous timesteps)

Reimplemented from oomph::Problem.

◆ set_initial_condition() [6/6]

template<class BASE_ELEMENT >
void BaseStateProblem< BASE_ELEMENT >::set_initial_condition ( )
virtual

Set initial condition (incl previous timesteps)

Reimplemented from oomph::Problem.

◆ surface_mesh_pt()

template<class BASE_ELEMENT >
Mesh* BaseStateProblem< BASE_ELEMENT >::surface_mesh_pt ( )
inline

Access function for surface mesh.

187 { return Surface_mesh_pt; }

Referenced by main().

◆ time_stepper_pt() [1/4]

template<class BASE_ELEMENT >
SelfStartingBDF2* BaseStateProblem< BASE_ELEMENT >::time_stepper_pt ( )
inline

Access function for the specific timestepper.

146  {
147  return dynamic_cast<SelfStartingBDF2*>(Problem::time_stepper_pt());
148  }

◆ time_stepper_pt() [2/4]

template<class BASE_ELEMENT >
SelfStartingBDF2* BaseStateProblem< BASE_ELEMENT >::time_stepper_pt ( )
inline

Access function for the specific timestepper.

163  {
164  return dynamic_cast<SelfStartingBDF2*>(Problem::time_stepper_pt());
165  }

◆ time_stepper_pt() [3/4]

template<class BASE_ELEMENT >
SelfStartingBDF2* BaseStateProblem< BASE_ELEMENT >::time_stepper_pt ( )
inline

Access function for the specific timestepper.

158  {
159  return dynamic_cast<SelfStartingBDF2*>(Problem::time_stepper_pt());
160  }

◆ time_stepper_pt() [4/4]

template<class BASE_ELEMENT >
TIMESTEPPER* BaseStateProblem< BASE_ELEMENT >::time_stepper_pt ( )
inline

Access function for the specific timestepper.

173  {
174  return dynamic_cast<TIMESTEPPER*>(Problem::time_stepper_pt());
175  }

◆ trace_file() [1/3]

template<class BASE_ELEMENT >
ofstream& BaseStateProblem< BASE_ELEMENT >::trace_file ( )
inline

Access function for trace file.

175 { return Trace_file; }

References oomph::Problem_Parameter::Trace_file.

◆ trace_file() [2/3]

template<class BASE_ELEMENT >
ofstream& BaseStateProblem< BASE_ELEMENT >::trace_file ( )
inline

Access function for trace file.

192 { return Trace_file; }

References oomph::Problem_Parameter::Trace_file.

◆ trace_file() [3/3]

template<class BASE_ELEMENT >
ofstream& BaseStateProblem< BASE_ELEMENT >::trace_file ( )
inline

Access function for trace file.

192 { return Trace_file; }

References oomph::Problem_Parameter::Trace_file.

Member Data Documentation

◆ Bulk_mesh_pt

template<class BASE_ELEMENT >
TwoLayerSpineMesh<BASE_ELEMENT>* BaseStateProblem< BASE_ELEMENT >::Bulk_mesh_pt
private

Pointer to the (specific) "bulk" mesh.

◆ Surface_mesh_pt

template<class BASE_ELEMENT >
Mesh* BaseStateProblem< BASE_ELEMENT >::Surface_mesh_pt
private

Pointer to the "surface" mesh.

◆ Trace_file

template<class BASE_ELEMENT >
ofstream BaseStateProblem< BASE_ELEMENT >::Trace_file
private

Trace file.

◆ U_nodal_index

template<class BASE_ELEMENT >
Vector<unsigned> BaseStateProblem< BASE_ELEMENT >::U_nodal_index
private

Index at which the i-th velocity component is stored.


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