26 #ifndef OOMPH_SEGREGATED_FSI_SOLVER
27 #define OOMPH_SEGREGATED_FSI_SOLVER
30 #include "../generic/problem.h"
31 #include "../generic/geom_objects.h"
32 #include "../generic/mesh.h"
148 const std::string& function_name,
149 const char* location)
150 : OomphLibError(error_description, function_name, location)
167 const std::string& error_description,
168 const std::string& function_name,
169 const char* location)
276 Vector<Data*>& solid_data_pt,
277 Mesh*& fluid_mesh_pt,
278 Mesh*& solid_mesh_pt) = 0;
292 const bool& full_setup_of_fluid_and_solid_dofs =
true);
323 const bool& shift_values);
341 Problem::Newton_solver_tolerance);
359 Problem::Newton_solver_tolerance);
377 Problem::Newton_solver_tolerance);
Object that collates convergence data of Picard iteration.
void set_solver_converged()
Set the flag to indicate that the solver has converged.
void set_solver_not_converged()
Set the flag to indicate that the solver has not converged.
unsigned & niter()
Number of iterations performed.
double & cpu_for_global_residual()
CPU time for computation of global residual vectors Note: This time is contained in Total_CPU and is ...
double & tol_achieved()
Final tolerance achieved by the iteration.
PicardConvergenceData()
Constructor initialises all data.
~PicardConvergenceData()
Empty destructor.
bool Has_converged
Flag to indicate if the solver has converged.
bool has_converged() const
Flag to indicate if the solver has converged.
double Essential_cpu_total
Total essential CPU time for segregated solve (excluding any actions that merely doc the progress of ...
double & essential_cpu_total()
Total essential CPU time for segregated solve (excluding any actions that merely doc the progress of ...
unsigned Niter
Number of iterations performed.
double CPU_total
Total CPU time for segregated solve.
double CPU_for_global_residual
CPU time for computation of global residual vectors Note: This time is contained in Total_CPU and is ...
double & cpu_total()
Total CPU time for segregated solve.
double Tol_achieved
Final tolerance achieved by the iteration.
////////////////////////////////////////////////////////////////// //////////////////////////////////...
RanOutOfIterationsInSegregatedSolverError(const std::string &error_description, const std::string &function_name, const char *location)
Default constructor, does nothing.
////////////////////////////////////////////////////////////////// //////////////////////////////////...
convergence_criteria
Enumerated flags for convergence criteria.
@ Assess_convergence_based_on_relative_solid_change
@ Assess_convergence_based_on_absolute_solid_change
@ Assess_convergence_based_on_max_global_residual
void enable_pointwise_aitken(const unsigned &pointwise_aitken_start)
Use pointwise Aitken extrapolation. The argument is used to specify the Picard iteration after which ...
void enable_irons_and_tuck_extrapolation()
Use Irons and Tuck extrapolation for solid dofs.
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.
solve_type
Enumerated flags to indicate which solve is taking place.
virtual void actions_after_segregated_solve()
This function is called once at the end of each segregated solve.
void restart_timer()
(Re-)start timer (e.g. after completing non-essential parts of the code such as documentation of the ...
void assess_convergence_based_on_max_global_residual()
Assess convergence based on max. residuals of coupled system of eqns. This interface has no argument ...
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.
void disable_pointwise_aitken()
Disable the use of pointwise Aitken extrapolation.
Mesh * Solid_mesh_pt
Mesh containing only solid elements – the elements in this mesh will be excluded from the assembly pr...
void enable_pointwise_aitken()
Use pointwise Aitken extrapolation. This interface has no argument and the current value of Pointwise...
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.
void halt_timer()
Halt timer (e.g. before performing non-essential parts of the code such as documentation of the itera...
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.
void enable_under_relaxation(const double &omega=1.0)
Use under-relaxation and (optionally) specify under-relaxation parameter. Default: omega=1....
void disable_irons_and_tuck_extrapolation()
Do not use Irons and Tuck extrapolation for solid dofs.
double T_spent_on_actual_solve
Total elapsed time since start of solve, can be accumulated by adding bits of time spent in relevant ...
clock_t T_ref
Reference time for segregated solve. Can be re-initialised whenever total elapsed time has been store...
PicardConvergenceData segregated_solve()
Segregated solver. Peform a segregated step from the present state of the system. Returns PicardConve...
void assess_convergence_based_on_max_global_residual(const double &tol)
Assess convergence based on max. residual of coupled system of eqns. The argument specifies the conve...
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 & ...
void assess_convergence_based_on_absolute_solid_change(const double &tol)
Assess convergence based on max. absolute change of solid dofs. The argument specifies the convergenc...
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.
virtual ~SegregatableFSIProblem()
Empty virtual destructor.
SegregatableFSIProblem()
Constructor. Set default values for solver parameters:
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....
bool Timer_has_been_halted
boolean flag to indicate if timer has been halted
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...
void assess_convergence_based_on_relative_solid_change(const double &tol)
Assess convergence based on max. relative change of solid dofs. The argument specifies the convergenc...
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)
void assess_convergence_based_on_absolute_solid_change()
Assess convergence based on max. absolute change of solid dofs. This interface has no argument and th...
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...
void assess_convergence_based_on_relative_solid_change()
Assess convergence based on max. relative change of solid dofs. This interface has no argument and th...
////////////////////////////////////////////////////////////////// //////////////////////////////////...
SegregatedSolverError(const std::string &error_description, const std::string &function_name, const char *location)
Default constructor, does nothing.