558 double cpu_for_global_residual = 0.0;
569 double tol_achieved = 0.0;
604 oomph_info <<
"==================================================\n";
605 oomph_info <<
"Initial iteration : " << 0 << std::endl;
606 oomph_info <<
"RMS change : " << 0 << std::endl;
607 oomph_info <<
"Max. change : " << 0 << std::endl;
608 oomph_info <<
"RMS norm : " << 0 << std::endl;
614 oomph_info <<
"==================================================\n\n";
623 <<
"\n\n\n////////////////////////////////////////////////////////"
624 <<
"\nPicard iteration converged after " << 0 <<
" steps!"
626 <<
"Convergence was based on max. residual of coupled eqns \n"
628 <<
"////////////////////////////////////////////////////////\n\n\n"
729 oomph_info <<
"==================================================\n";
741 oomph_info <<
"==================================================\n\n";
751 <<
"\n\n\n/////////////////////////////////////////////////////"
753 <<
"\nPicard iteration converged after " <<
iter <<
" steps!"
755 <<
"Convergence was based on absolute change in solid dofs \n"
758 <<
"////////////////////////////////////////////////////////"
771 <<
"\n\n\n/////////////////////////////////////////////////////"
773 <<
"\nPicard iteration converged after " <<
iter <<
" steps!"
775 <<
"Convergence was based on relative change in solid dofs \n"
778 <<
"////////////////////////////////////////////////////////"
790 <<
"\n\n\n/////////////////////////////////////////////////////"
792 <<
"\nPicard iteration converged after " <<
iter <<
" steps!"
794 <<
"Convergence was based on max. residual of coupled eqns \n"
797 <<
"////////////////////////////////////////////////////////"
878 conv_data.cpu_for_global_residual() = cpu_for_global_residual;
890 <<
"\n\n\n////////////////////////////////////////////////////////"
891 <<
"\nPicard iteration did not converge after " <<
iter_taken
892 <<
" steps!" << std::endl
893 <<
"Convergence was based on absolute change in solid dofs \n"
895 <<
"but we achieved only " << tol_achieved <<
"." << std::endl
896 <<
"////////////////////////////////////////////////////////\n\n\n"
902 "Error occured in Segregated solver. \n",
909 "Error occured in Segregated solver. \n",
918 <<
"\n\n\n///////////////////////////////////////////////////////"
919 <<
"\nPicard iteration did not converge after " <<
iter_taken
920 <<
" steps!" << std::endl
921 <<
"Convergence was based on relative change in solid dofs \n"
923 <<
"but we achieved only " << tol_achieved <<
"." << std::endl
924 <<
"////////////////////////////////////////////////////////\n\n\n"
930 "Error occured in Segregated solver. \n",
937 "Error occured in Segregated solver. \n",
945 <<
"\n\n\n////////////////////////////////////////////////////////"
946 <<
"\nPicard iteration did not converge after " <<
iter_taken
947 <<
" steps!" << std::endl
948 <<
"Convergence was based on max. residual of coupled eqns \n"
950 <<
"but we achieved only " << tol_achieved <<
"." << std::endl
952 <<
"////////////////////////////////////////////////////////\n\n\n"
958 "Error occured in Segregated solver. \n",
965 "Error occured in Segregated solver. \n",
1010 oomph_info <<
"Note: Ran out of iterations but continuing anyway"
1095 oomph_info <<
"Note: Ran out of iterations but continuing anyway"
1128 <<
"Warning: Your implementation of the pure virtual\n"
1129 <<
" function identify_fluid_and_solid_dofs(...)\n"
1130 <<
" returned a NULL pointer for Fluid_mesh_pt.\n"
1131 <<
" --> The fluid elements will remain activated\n"
1132 <<
" during the solid solve. This is inefficient!\n"
1133 <<
" You should combine all fluid elements into a combined\n"
1134 <<
" mesh and specify this mesh in your\n"
1135 <<
" implementation of \n\n"
1137 "SegregatableFSIProblem::identify_fluid_and_solid_dofs(...)"
1148 <<
"Warning: Your implementation of the pure virtual\n"
1149 <<
" function identify_fluid_and_solid_dofs(...)\n"
1150 <<
" returned a NULL pointer for Solid_mesh_pt.\n"
1151 <<
" --> The solid elements will remain activated\n"
1152 <<
" during the fluid solve. This is inefficient!\n"
1153 <<
" You should combine all solid elements into a combined\n"
1154 <<
" mesh and specify this mesh in your\n"
1155 <<
" implementation of \n\n"
1157 "SegregatableFSIProblem::identify_fluid_and_solid_dofs(...)"
1275 for (
unsigned i = 0;
i <
n_del;
i++)
A vector in the mathematical sense, initially developed for linear algebra type applications....
double max() const
returns the maximum coefficient
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
virtual void node_update(const bool &update_all_solid_nodes=false)
Update nodal positions in response to changes in the domain shape. Uses the FiniteElement::get_x(....
Object that collates convergence data of Picard iteration.
virtual void actions_after_implicit_timestep()
Actions that should be performed after each implicit time step. This is needed when one wants to solv...
unsigned add_sub_mesh(Mesh *const &mesh_pt)
Add a submesh to the problem and return its number, i, by which it can be accessed via mesh_pt(i).
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Assign all equation numbers for problem: Deals with global data (= data that isn't attached to any el...
void assign_initial_values_impulsive()
Initialise data and nodal positions to simulate impulsive start from initial configuration/solution.
void flush_sub_meshes()
Flush the problem's collection of sub-meshes. Must be followed by call to rebuild_global_mesh().
virtual void actions_before_implicit_timestep()
Actions that should be performed before each implicit time step. This is needed when one wants to sol...
void newton_solve()
Use Newton method to solve the problem.
virtual void get_residuals(DoubleVector &residuals)
Return the fully-assembled residuals Vector for the problem: Virtual so it can be overloaded in for m...
TimeStepper *& time_stepper_pt()
Access function for the pointer to the first (presumably only) timestepper.
virtual void shift_time_values()
Shift all values along to prepare for next timestep.
void rebuild_global_mesh()
If one of the submeshes has changed (e.g. by mesh adaptation) we need to update the global mesh....
unsigned nsub_mesh() const
Return number of submeshes.
unsigned ntime_stepper() const
Return the number of time steppers.
Mesh *& mesh_pt()
Return a pointer to the global mesh.
Time *& time_pt()
Return a pointer to the global time object.
////////////////////////////////////////////////////////////////// //////////////////////////////////...
@ Assess_convergence_based_on_relative_solid_change
@ Assess_convergence_based_on_absolute_solid_change
@ Assess_convergence_based_on_max_global_residual
bool Recheck_convergence_after_pointwise_aitken
Have we just done a pointwise Aitken step.
void extrapolate_solid_data()
Extrapolate solid data and update fluid mesh during unsteady run.
Vector< std::vector< bool > > Solid_value_is_pinned
Vector of vectors that store the pinned status of solid Data values.
void setup_segregated_solver(const bool &full_setup_of_fluid_and_solid_dofs=true)
Setup the segregated solver: Backup the pinned status of the fluid and solid dofs and allocate the in...
void use_only_fluid_elements()
Only include fluid elements in the Problem's mesh. This is called before the segregated fluid solve....
Vector< Mesh * > Orig_sub_mesh_pt
Backup for the pointers to the submeshes in the original problem.
bool Use_pointwise_aitken
Use pointwise Aitken extrapolation?
Vector< Data * > Fluid_data_pt
Vector storing the Data objects associated with the fluid problem: Tyically the nodal and internal da...
bool Use_irons_and_tuck_extrapolation
Boolean flag to indicate use of Irons and Tuck's extrapolation for solid values.
virtual void actions_after_segregated_solve()
This function is called once at the end of each segregated solve.
void use_only_solid_elements()
Only include solid elements in the Problem's mesh. This is called before the segregated solid solve....
void pin_fluid_dofs()
Pin fluid dofs.
Mesh * Solid_mesh_pt
Mesh containing only solid elements – the elements in this mesh will be excluded from the assembly pr...
unsigned Pointwise_aitken_start
Start pointwise Aitken extrpolation after specified number of Picard iterations.
void reset_timer()
Reset timer.
void rebuild_monolithic_mesh()
Rebuild global mesh for monolithic discretisation.
virtual void identify_fluid_and_solid_dofs(Vector< Data * > &fluid_data_pt, Vector< Data * > &solid_data_pt, Mesh *&fluid_mesh_pt, Mesh *&solid_mesh_pt)=0
Identify the fluid and solid Data. This is a pure virtual function that MUST be implemented for every...
void restore_solid_dofs()
Restore pinned status of solid dofs.
Vector< double > Previous_solid_value
Vector storing the previous solid values – used for convergence check.
double R_irons_and_tuck
Irons and Tuck relaxation factor.
PicardConvergenceData segregated_solve()
Segregated solver. Peform a segregated step from the present state of the system. Returns PicardConve...
Vector< double > Del_irons_and_tuck
Vector of changes in Irons and Tuck under-relaxation.
PicardConvergenceData steady_segregated_solve()
Steady version of segregated solver. Makes all timesteppers steady before solving....
int Convergence_criterion
Convergence criterion (enumerated flag)
void pointwise_aitken_extrapolate()
Do pointwise Aitken extrapolation for solid.
void under_relax_solid()
Under-relax the most recently computed solid variables, either by classical relaxation or by Irons & ...
Vector< Vector< double > > Pointwise_aitken_solid_value
Vector of Vectors containing up to three previous iterates for the solid dofs; used for pointwise Ait...
unsigned Max_picard
Max. number of Picard iterations.
Vector< std::vector< bool > > Fluid_value_is_pinned
Vector of vectors that store the pinned status of fluid Data values.
bool Doc_max_global_residual
Doc maximum global residual during iteration? (default: false)
PicardConvergenceData unsteady_segregated_solve(const double &dt)
Unsteady segregated solver, advance time by dt and solve by the segregated solver....
void restore_fluid_dofs()
Restore pinned status of fluid dofs.
virtual void actions_before_segregated_convergence_check()
This function is to be filled with actions that take place before the check for convergence of the en...
Vector< Data * > Solid_data_pt
Vector storing the Data objects associated with the solid problem: Typically the positional data of s...
void pin_solid_dofs()
Pin solid dofs.
void get_solid_change(double &rms_change, double &max_change, double &rms_norm)
Get rms of change in the solid dofs; the max. change of the solid dofs and the rms norm of the solid ...
int Pointwise_aitken_counter
Number of Aitken histories available (int because after extrapolation it's re-initialised to -1 to fo...
double Convergence_tolerance
Convergence tolerance for Picard iteration.
Mesh * Fluid_mesh_pt
Mesh containing only fluid elements – the elements in this Mesh will be excluded from the assembly pr...
double t_spent_on_actual_solve()
Total elapsed time since start of solve.
double Omega_relax
Under-relaxation parameter. (1.0: no under-relaxation; 0.0: Freeze wall shape)
virtual void actions_before_segregated_solve()
This function is called once at the start of each segregated solve.
int Solve_type
Solve that is taking place (enumerated flag)
void store_solid_dofs()
Store the current solid values as reference values for future convergence check. Also add another ent...
A class to handle errors in the Segregated solver.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
virtual void set_weights()=0
Function to set the weights for present timestep (don't need to pass present timestep or previous tim...
virtual unsigned nprev_values() const =0
Number of previous values available: 0 for static, 1 for BDF<1>,...
void make_steady()
Function to make the time stepper temporarily steady. This is trivially achieved by setting all the w...
virtual void undo_make_steady()
Reset the is_steady status of a specific TimeStepper to its default and re-assign the weights.
bool is_steady() const
Flag to indicate if a timestepper has been made steady (possibly temporarily to switch off time-depen...
double & time()
Return the current value of the continuous time.
double & dt(const unsigned &t=0)
Return the value of the t-th stored timestep (t=0: present; t>0: previous).
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...