segregated_fsi_solver.h
Go to the documentation of this file.
1 // LIC// ====================================================================
2 // LIC// This file forms part of oomph-lib, the object-oriented,
3 // LIC// multi-physics finite-element library, available
4 // LIC// at http://www.oomph-lib.org.
5 // LIC//
6 // LIC// Copyright (C) 2006-2023 Matthias Heil and Andrew Hazel
7 // LIC//
8 // LIC// This library is free software; you can redistribute it and/or
9 // LIC// modify it under the terms of the GNU Lesser General Public
10 // LIC// License as published by the Free Software Foundation; either
11 // LIC// version 2.1 of the License, or (at your option) any later version.
12 // LIC//
13 // LIC// This library is distributed in the hope that it will be useful,
14 // LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // LIC// Lesser General Public License for more details.
17 // LIC//
18 // LIC// You should have received a copy of the GNU Lesser General Public
19 // LIC// License along with this library; if not, write to the Free Software
20 // LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 // LIC// 02110-1301 USA.
22 // LIC//
23 // LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24 // LIC//
25 // LIC//====================================================================
26 #ifndef OOMPH_SEGREGATED_FSI_SOLVER
27 #define OOMPH_SEGREGATED_FSI_SOLVER
28 
29 
30 #include "../generic/problem.h"
31 #include "../generic/geom_objects.h"
32 #include "../generic/mesh.h"
33 
34 namespace oomph
35 {
36  //===============================================================
37  /// Object that collates convergence data of Picard iteration
38  //===============================================================
40  {
41  public:
42  /// Constructor initialises all data
44  : Niter(0),
45  CPU_total(0.0),
48  Tol_achieved(0.0),
49  Has_converged(false)
50  {
51  }
52 
53  /// Empty destructor
55 
56  /// Number of iterations performed
57  unsigned& niter()
58  {
59  return Niter;
60  }
61 
62  /// Total CPU time for segregated solve
63  double& cpu_total()
64  {
65  return CPU_total;
66  }
67 
68  /// Total essential CPU time for segregated solve
69  /// (excluding any actions that merely doc the progress
70  /// of the iteration, etc.)
72  {
73  return Essential_cpu_total;
74  }
75 
76  /// CPU time for computation of global residual vectors
77  /// Note: This time is contained in Total_CPU and is
78  /// only used if convergence is based on the residual
79  /// of the fully coupled system.
81  {
83  }
84 
85  /// Final tolerance achieved by the iteration
86  double& tol_achieved()
87  {
88  return Tol_achieved;
89  }
90 
91  /// Flag to indicate if the solver has converged
92  bool has_converged() const
93  {
94  return Has_converged;
95  }
96 
97  /// Set the flag to indicate that the solver has converged
99  {
100  Has_converged = true;
101  }
102 
103  /// Set the flag to indicate that the solver has not converged
105  {
106  Has_converged = false;
107  }
108 
109  private:
110  /// Number of iterations performed
111  unsigned Niter;
112 
113  /// Total CPU time for segregated solve
114  double CPU_total;
115 
116  /// Total essential CPU time for segregated solve
117  /// (excluding any actions that merely doc the progress
118  /// of the iteration, etc.)
120 
121  /// CPU time for computation of global residual vectors
122  /// Note: This time is contained in Total_CPU and is
123  /// only used if convergence is based on the residual
124  /// of the fully coupled system
126 
127  /// Final tolerance achieved by the iteration
128  double Tol_achieved;
129 
130  /// Flag to indicate if the solver has converged
132  };
133 
134 
135  /// //////////////////////////////////////////////////////////////////
136  /// //////////////////////////////////////////////////////////////////
137  /// //////////////////////////////////////////////////////////////////
138 
139 
140  //=======================================================================
141  /// A class to handle errors in the Segregated solver
142  //=======================================================================
144  {
145  public:
146  /// Default constructor, does nothing
147  SegregatedSolverError(const bool& ran_out_of_iterations = false)
148  {
149  Ran_out_of_iterations = ran_out_of_iterations;
150  }
151 
152  /// Boolean indicating if the error occured because
153  /// we ran out of iterations
155  };
156 
157 
158  /// //////////////////////////////////////////////////////////////////
159  /// //////////////////////////////////////////////////////////////////
160  /// //////////////////////////////////////////////////////////////////
161 
162 
163  //===============================================================
164  /// Base class for problems that can be solved by segregated
165  /// FSI solver
166  //===============================================================
167  class SegregatableFSIProblem : public virtual Problem
168  {
169  protected:
170  /// This function is called once at the start of each
171  /// segregated solve.
173 
174  /// This function is called once at the end of each
175  /// segregated solve.
177 
178  /// This function is to be filled with actions that take place
179  /// before the check for convergence of the entire segregated solve
181 
182  public:
183  /// Constructor. Set default values for solver parameters:
184  /// - Don't use pointwise Aitken extrapolation but if it's used at
185  /// all, it's used immediately.
186  /// - No under-relaxation at all (neither classical nor Irons&Tuck)
187  /// - Base convergence on max. residual of coupled system of eqns
188  /// - Convergence tolerance = tolerance for Newton solver
189  /// defined in Problem base class
190  /// - Max. 50 Picard iterations
192  {
193  // Use pointwise Aitken extrapolation?
194  Use_pointwise_aitken = false;
195 
196  // Default: No under-relaxation
197  Omega_relax = 1.0;
198 
199  // Don't use of Irons and Tuck's extrapolation for solid values
201 
202  // Start using pointwise Aitken immediately
204 
205  // By default we don't recheck convergence
207 
208  // Default solve type is full solve
210 
211  // Convergence criterion
213 
214  // Convergence tolerance (as in global Newton solver)
215  Convergence_tolerance = Problem::Newton_solver_tolerance;
216 
217  // Doc max. global residual during iteration?
218  Doc_max_global_residual = false;
219 
220  // Max. number of Picard iterations
221  Max_picard = 50;
222 
223  // Pointer to Mesh containing only fluid elements -- the elements in this
224  // Mesh will be excluded from the assembly process when
225  // the solid problem is solved
226  Fluid_mesh_pt = 0;
227 
228  // Pointer to Mesh containing only solid elements -- the elements in this
229  // mesh will be excluded from the assembly process when
230  // the fluid problem is solved
231  Solid_mesh_pt = 0;
232 
233  // Initialise timer that allows doc of iteration/cpu time
234  T_ref = clock();
236 
237  /// boolean flag to indicate if timer has been halted
238  Timer_has_been_halted = false;
239  }
240 
241  /// Empty virtual destructor
243 
244  /// Identify the fluid and solid Data. This is a pure virtual
245  /// function that MUST be implemented for every specific problem that
246  /// is to be solved by the segregated solver.
247  /// The two mesh pointers identify meshes that contain
248  /// elements and nodes used during the fluid
249  /// or solid solves respectively. Elements that feature during
250  /// both phases of the segretated solution must be included in both.
251  /// These pointers may be set to NULL. In this case, all elements
252  /// in the global mesh (set up during the monolithic discretisation
253  /// of the problem) contribute to the global Jacobian matrix
254  /// and the residual vector, even if their contributions only contain
255  /// zero entries. This can be costly, though the code will
256  /// still compute the correct results.
257  virtual void identify_fluid_and_solid_dofs(Vector<Data*>& fluid_data_pt,
258  Vector<Data*>& solid_data_pt,
259  Mesh*& fluid_mesh_pt,
260  Mesh*& solid_mesh_pt) = 0;
261 
262  /// Setup the segregated solver: Backup the pinned status of
263  /// the fluid and solid dofs and allocate the internal storage
264  /// based on the input provided by identify_fluid_and_solid_dofs(...)
265  /// In addition, reset storage associated with convergence acceleration
266  /// techniques.
267  /// If the problem and degrees of freedom has not changed between
268  /// calls to the solver then it is wasteful to call
269  /// identify_fluid_and_solid_dofs(...) again and again. If the optional
270  /// boolean flag is set to false then the storage for convergence
271  /// acceleration techniques is reset, but the fluid and solid dofs
272  /// are not altered.
274  const bool& full_setup_of_fluid_and_solid_dofs = true);
275 
276  /// Segregated solver. Peform a segregated step from
277  /// the present state of the system.
278  /// Returns PicardConvergenceData object that contains the vital
279  /// stats of the iteration
281 
282  /// Steady version of segregated solver. Makes all
283  /// timesteppers steady before solving.
284  /// Returns PicardConvergenceData object that contains the
285  /// vital stats of the iteration.
287 
288 
289  /// Unsteady segregated solver, advance time by dt and solve
290  /// by the segregated solver. The time values are always shifted by
291  /// this function.
292  /// Returns PicardConvergenceData object that contains the
293  /// vital stats of the iteration.
295 
296 
297  /// Unsteady segregated solver. Advance time by dt and solve
298  /// the system by a segregated method. The boolean flag is used to
299  /// control whether the time values should be shifted. If it is true
300  /// the current data values will be shifted (stored as previous
301  /// timesteps) before the solution step.
302  /// Returns PicardConvergenceData object that contains the
303  /// vital stats of the iteration.
305  const bool& shift_values);
306 
307 
308  /// Assess convergence based on max. residual of coupled system of
309  /// eqns. The argument specifies the convergence tolerance.
311  {
313  Convergence_tolerance = tol;
314  }
315 
316  /// Assess convergence based on max. residuals of coupled
317  /// system of eqns. This interface has no argument
318  /// and the default convergence tolerance
319  /// for the Newton solver, Problem::Newton_solver_tolerance is used.
321  {
323  Problem::Newton_solver_tolerance);
324  }
325 
326  /// Assess convergence based on max. absolute change of solid
327  /// dofs. The argument specifies the convergence tolerance.
329  {
331  Convergence_tolerance = tol;
332  }
333 
334  /// Assess convergence based on max. absolute change of solid
335  /// dofs. This interface has no argument and the default
336  /// convergence tolerance
337  /// for the Newton solver, Problem::Newton_solver_tolerance is used.
339  {
341  Problem::Newton_solver_tolerance);
342  }
343 
344  /// Assess convergence based on max. relative change of solid
345  /// dofs. The argument specifies the convergence tolerance.
347  {
349  Convergence_tolerance = tol;
350  }
351 
352  /// Assess convergence based on max. relative change of solid
353  /// dofs. This interface has no argument and the default
354  /// convergence tolerance
355  /// for the Newton solver, Problem::Newton_solver_tolerance is used.
357  {
359  Problem::Newton_solver_tolerance);
360  }
361 
362 
363  /// Use pointwise Aitken extrapolation. The argument is used to
364  /// specify the Picard iteration after which pointwise Aitken extrapolation
365  /// is to be used for the first time.
366  void enable_pointwise_aitken(const unsigned& pointwise_aitken_start)
367  {
368  Pointwise_aitken_start = pointwise_aitken_start;
369  Use_pointwise_aitken = true;
370  }
371 
372  /// Use pointwise Aitken extrapolation. This interface has
373  /// no argument and the current value of Pointwise_aitken_start will
374  /// be used. The default is zero, extrapolation starts immediately
376  {
377  Use_pointwise_aitken = true;
378  }
379 
380  /// Disable the use of pointwise Aitken extrapolation
382  {
383  Use_pointwise_aitken = false;
384  }
385 
386  /// Use under-relaxation and (optionally) specify under-relaxation
387  /// parameter. Default: omega=1.0 (i.e. no actual under-relaxation;
388  /// Other extreme: omega=0.0 (freeze wall shape). Under-relaxation
389  /// parameter can also be computed dynamically by setting
390  /// use_irons_and_tuck_extrapolation()
391  void enable_under_relaxation(const double& omega = 1.0)
392  {
393  Omega_relax = omega;
394  }
395 
396  /// Use Irons and Tuck extrapolation for solid dofs
398  {
400  }
401 
402  /// Do not use Irons and Tuck extrapolation for solid dofs
404  {
406  }
407 
408  /// Enumerated flags for convergence criteria
410  {
414  };
415 
416 
417  /// Enumerated flags to indicate which solve is taking place
419  {
423  };
424 
425  /// Get rms of change in the solid dofs; the max. change of the
426  /// solid dofs and the rms norm of the solid dofs themselves.
427  /// Change is computed relative to the reference values stored when
428  /// store_solid_dofs() was last called.
429  void get_solid_change(double& rms_change,
430  double& max_change,
431  double& rms_norm);
432 
433  /// Store the current solid values as reference values for
434  /// future convergence check. Also add another entry to pointwise
435  /// Aitken history if required.
436  void store_solid_dofs();
437 
438  /// Reset timer
439  void reset_timer()
440  {
442  T_ref = clock();
443  Timer_has_been_halted = false;
444  }
445 
446 
447  /// (Re-)start timer (e.g. after completing non-essential
448  /// parts of the code such as documentation of the iteration's
449  /// progress)
451  {
452  T_ref = clock();
453  Timer_has_been_halted = false;
454  }
455 
456 
457  /// Halt timer (e.g. before performing non-essential
458  /// parts of the code such as documentation of the iteration's
459  /// progress)
460  void halt_timer()
461  {
463  {
464  T_spent_on_actual_solve += double(clock() - T_ref) / CLOCKS_PER_SEC;
465  Timer_has_been_halted = true;
466  }
467  }
468 
469 
470  /// Total elapsed time since start of solve
472  {
473  halt_timer();
474  double time = T_spent_on_actual_solve;
475  restart_timer();
476  return time;
477  }
478 
479 
480  protected:
481  /// Rebuild global mesh for monolithic discretisation
483 
484  /// Number of Aitken histories available (int because after
485  /// extrapolation it's re-initialised to -1 to force the computation
486  /// of three new genuine iterates).
488 
489  /// Use pointwise Aitken extrapolation?
491 
492  /// Start pointwise Aitken extrpolation after specified number
493  /// of Picard iterations
495 
496  /// Solve that is taking place (enumerated flag)
498 
499  /// Convergence tolerance for Picard iteration
501 
502  /// Max. number of Picard iterations
503  unsigned Max_picard;
504 
505  /// Doc maximum global residual during iteration? (default: false)
507 
508  /// Restore pinned status of fluid dofs
509  void restore_fluid_dofs();
510 
511  /// Pin solid dofs
512  void pin_solid_dofs();
513 
514  /// Restore pinned status of solid dofs
515  void restore_solid_dofs();
516 
517 
518  /// Do pointwise Aitken extrapolation for solid
520 
521  /// Vector storing the Data objects associated with the fluid
522  /// problem: Tyically the nodal and internal data of the elements in the
523  /// fluid bulk mesh
524  Vector<Data*> Fluid_data_pt;
525 
526  /// Vector of vectors that store the pinned status of
527  /// fluid Data values
528  Vector<std::vector<bool>> Fluid_value_is_pinned;
529 
530  /// Vector storing the Data objects associated with the solid
531  /// problem: Typically the positional data of solid nodes and
532  /// any quantities associated with displacement control, say.
533  Vector<Data*> Solid_data_pt;
534 
535  /// Vector of vectors that store the pinned status of
536  /// solid Data values
537  Vector<std::vector<bool>> Solid_value_is_pinned;
538 
539  /// Vector storing the previous solid values -- used for
540  /// convergence check
541  Vector<double> Previous_solid_value;
542 
543  /// Mesh containing only fluid elements -- the elements in this
544  /// Mesh will be excluded from the assembly process when
545  /// the solid problem is solved
547 
548  /// Mesh containing only solid elements -- the elements in this
549  /// mesh will be excluded from the assembly process when
550  /// the fluid problem is solved
552 
553  /// Backup for the pointers to the submeshes in the original problem
554  Vector<Mesh*> Orig_sub_mesh_pt;
555 
556  /// Vector of changes in Irons and Tuck under-relaxation
557  Vector<double> Del_irons_and_tuck;
558 
559  /// Irons and Tuck relaxation factor
561 
562  /// Vector of Vectors containing up to three previous
563  /// iterates for the solid dofs; used for pointwise Aitken extrapolation
564  Vector<Vector<double>> Pointwise_aitken_solid_value;
565 
566  /// Have we just done a pointwise Aitken step
568 
569  private:
570  /// Extrapolate solid data and update fluid mesh during unsteady run
571  void extrapolate_solid_data();
572 
573  /// Under-relax the most recently computed solid variables, either
574  /// by classical relaxation or by Irons & Tuck
575  void under_relax_solid();
576 
577  /// Only include fluid elements in the Problem's mesh. This is
578  /// called before the segregated fluid solve. The fluid elements are
579  /// identified by the user via the fluid_mesh_pt argument
580  /// in the pure virtual function identify_fluid_and_solid_dofs(...).
581  /// If a NULL pointer is returned by this function (i.e. if the user
582  /// hasn't bothered to identify the fluids elements in a submesh, then
583  /// no stripping of non-fluid elements is performed. The result
584  /// of the computation will be correct but
585  /// it won't be very efficient.
587 
588  /// Only include solid elements in the Problem's mesh. This is
589  /// called before the segregated solid solve. The solid elements are
590  /// identified by the user via the solid_mesh_pt argument
591  /// in the pure virtual function identify_fluid_and_solid_dofs(...).
592  /// If a NULL pointer is returned by this function (i.e. if the user
593  /// hasn't bothered to identify the solid elements in a submesh, then
594  /// no stripping of non-solid elements is performed. The result
595  /// of the computation will be correct but
596  /// it won't be very efficient.
598 
599  /// Pin fluid dofs
600  void pin_fluid_dofs();
601 
602  /// Under-relaxation parameter. (1.0: no under-relaxation;
603  /// 0.0: Freeze wall shape)
604  double Omega_relax;
605 
606  /// Boolean flag to indicate use of Irons and Tuck's extrapolation
607  /// for solid values
609 
610  /// Convergence criterion (enumerated flag)
612 
613  /// Reference time for segregated solve. Can be
614  /// re-initialised whenever total elapsed time has been stored
615  /// (before entering non-essential doc sections of the code)
616  clock_t T_ref;
617 
618  /// Total elapsed time since start of solve, can be
619  /// accumulated by adding bits of time spent in relevant parts of
620  /// code (bypassing sections that only document the progress)
622 
623  /// boolean flag to indicate if timer has been halted
625  };
626 
627 } // namespace oomph
628 
629 
630 #endif
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.
////////////////////////////////////////////////////////////////// //////////////////////////////////...
convergence_criteria
Enumerated flags for convergence criteria.
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 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 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 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 bool &ran_out_of_iterations=false)
Default constructor, does nothing.
bool Ran_out_of_iterations
Boolean indicating if the error occured because we ran out of iterations.