pseudo_elastic_preconditioner.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-2025 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_PSEUDO_ELASTIC_SUBSIDIARY_PRECONDITIONER
27#define OOMPH_PSEUDO_ELASTIC_SUBSIDIARY_PRECONDITIONER
28
29// includes
30#include "generic/problem.h"
31#include "generic/block_preconditioner.h"
32#include "generic/preconditioner.h"
33#include "generic/SuperLU_preconditioner.h"
34#include "generic/matrix_vector_product.h"
35#include "generic/general_purpose_preconditioners.h"
36#include "generic/general_purpose_block_preconditioners.h"
37#ifdef OOMPH_HAS_HYPRE
38#include "generic/hypre_solver.h"
39#endif
40#ifdef OOMPH_HAS_TRILINOS
41#include "generic/trilinos_solver.h"
42#endif
43namespace oomph
44{
45 //=============================================================================
46 /// Functions to create instances of optimal subsidiary operators for
47 /// the PseudoElasticPreconditioner. By default we use hypre for the
48 /// the elastic blocks but can use Trilinos ML too.
49 //=============================================================================
50 namespace Pseudo_Elastic_Preconditioner_Subsidiary_Operator_Helper
51 {
52#ifdef OOMPH_HAS_HYPRE
53
54 /// Hypre AMG w/ GS smoothing for the augmented elastic
55 /// subsidiary linear systems
56 Preconditioner* get_elastic_preconditioner_hypre();
57
58 /// AMG w/ GS smoothing for the augmented elastic subsidiary linear
59 /// systems -- calls Hypre version to stay consistent with previous default
60 Preconditioner* get_elastic_preconditioner();
61
62#endif
63
64#ifdef OOMPH_HAS_TRILINOS
65
66 /// TrilinosML smoothing for the augmented elastic
67 /// subsidiary linear systems
69
70 /// CG with diagonal preconditioner for the lagrange multiplier
71 /// subsidiary linear systems.
73#endif
74 } // namespace Pseudo_Elastic_Preconditioner_Subsidiary_Operator_Helper
75
76
77 ///////////////////////////////////////////////////////////////////////////////
78 ///////////////////////////////////////////////////////////////////////////////
79 ///////////////////////////////////////////////////////////////////////////////
80
81
82 //=============================================================================
83 /// A subsidiary preconditioner for the pseudo-elastic FSI
84 /// preconditioner. Also a stand-alone preconditioner for the problem of
85 /// non-linear elasticity subject to prescribed displacement by Lagrange
86 /// multiplier.
87 /// \b Enumeration of Elastic DOF types in the Pseudo-Elastic Elements
88 /// The method get_dof_types_for_unknowns() must be implemented such that
89 /// DOFs subject be Lagrange multiplier and DOFs NOT subject to Lagrange
90 /// multiplier have different labels. For example in a 3D problem there are
91 /// 6 DOF types and the following labelling must be implemented:
92 /// 0 - x displacement (without lagr mult traction)
93 /// 1 - y displacement (without lagr mult traction)
94 /// 2 - z displacement (without lagr mult traction)
95 /// 4 - x displacement (with lagr mult traction)
96 /// 5 - y displacement (with lagr mult traction)
97 /// 6 - z displacement (with lagr mult traction)
98 //=============================================================================
99 class PseudoElasticPreconditioner : public BlockPreconditioner<CRDoubleMatrix>
100 {
101 /// PseudoElasticFSIPreconditioner is a friend to access the private
102 /// *_preconditioner_solve(...) method
104
105 public:
106 /// This preconditioner includes the option to use subsidiary
107 /// operators other than ExactPreconditioner for this problem.
108 /// This is the typedef of a function that should return an instance
109 /// of a subsidiary preconditioning operator. This preconditioner is
110 /// responsible for the destruction of the subsidiary preconditioners.
111 typedef Preconditioner* (*SubsidiaryPreconditionerFctPt)();
112
113 /// The augmented elasticity system can be preconditioned in one
114 /// of four ways.
115 /// 0 - Exact preconditioner
116 /// 1 - Block diagonal preconditioning
117 /// 2 - Block upper triangular preconditioner
118 /// 3 - Block lower triangular preconditioner
119 /// We group together the different components of the displacement vector
120 /// field for the block decomposition.
128
129 /// Default (and only) constructor.
145
146 /// destructor
148 {
149 this->clean_up_memory();
150 }
151
152 /// Broken copy constructor
154
155 /// Broken assignment operator
156 // Commented out broken assignment operator because this can lead to a
157 // conflict warning when used in the virtual inheritence hierarchy.
158 // Essentially the compiler doesn't realise that two separate
159 // implementations of the broken function are the same and so, quite
160 // rightly, it shouts.
161 /*void operator=
162 (const PseudoElasticPreconditioner&) = delete;*/
163
164 /// Setup method for the PseudoElasticPreconditioner.
165 void setup();
166
167 /// Apply the preconditioner. Method implemented in two
168 /// other methods (elastic and lagrange multiplier subsidiary
169 /// preocnditioner) for the PseudoElasticFSIPreconditioner
170 void preconditioner_solve(const DoubleVector& r, DoubleVector& z)
171 {
174 }
175
176 /// Access function to mesh containing the block-preconditionable
177 /// elastic elements
178 void set_elastic_mesh(Mesh* mesh_pt)
179 {
180 Elastic_mesh_pt = mesh_pt;
181 }
182
183 /// Access function to mesh containing the block-preconditionable
184 /// lagrange multiplier elements
186 {
188 }
189
190 /// Call to use the inf norm of S as scaling
195
196 /// Call to use no scaling
201
202 /// By default the Lagrange multiplier subsidiary systems are
203 /// preconditioner with ExactPreconditioner. For a different
204 /// preconditioner, pass a function to this
205 /// method returning a different subsidiary operator.
211
212 /// By default the elastic subsidiary systems are
213 /// preconditioner with ExactPreconditioner. For a different
214 /// preconditioner, pass a function to this
215 /// method returning a different subsidiary operator.
221
222 /// Set the type of preconditioner applied to the elastic:
223 /// 0 - Exact preconditioner
224 /// 1 - Block diagonal preconditioning
225 /// 2 - Block upper triangular preconditioner
226 /// 3 - Block lower triangular preconditioner
227 /// We group together the different components of the displacement vector
228 /// field for the block decomposition.
233
234 /// Clears the memory.
235 void clean_up_memory();
236
237 private:
238 /// Apply the elastic subsidiary preconditioner.
239 void elastic_preconditioner_solve(const DoubleVector& r, DoubleVector& z);
240
241 /// Apply the lagrange multiplier subsidiary preconditioner.
242 void lagrange_multiplier_preconditioner_solve(const DoubleVector& r,
243 DoubleVector& z);
244
245 /// The scaling. Defaults to infinity norm of S.
246 double Scaling;
247
248 /// boolean indicating whether the inf-norm of S should be used as
249 /// scaling. Default = true;
251
252 /// An unsigned indicating which method should be used for
253 /// preconditioning the solid component.
255
256 /// the dimension of the problem
257 unsigned Dim;
258
259 /// storage for the preconditioner for the solid system
261
262 /// lagrange multiplier preconditioner pt
264
265 /// The Lagrange multiplier subsidiary preconditioner function pointer
268
269 /// The solid subsidiary preconditioner function pointer
271
272 /// Pointer to the mesh containing the solid elements
274
275 /// Pointer to the mesh containing the Lagrange multiplier elements
277 };
278
279 ///////////////////////////////////////////////////////////////////////////////
280 ///////////////////////////////////////////////////////////////////////////////
281 ///////////////////////////////////////////////////////////////////////////////
282
283
284 //=============================================================================
285 /// A subsidiary preconditioner for the pseudo-elastic FSI
286 /// preconditioner. Also a stand-alone preconditioner for the problem of
287 /// non-linear elasticity subject to prescribed displacement by Lagrange
288 /// multiplier..
289 /// \b Enumeration of Elastic DOF types in the Pseudo-Elastic Elements
290 /// The method get_dof_types_for_unknowns() must be implemented such that
291 /// DOFs subject be Lagrange multiplier and DOFs NOT subject to Lagrange
292 /// multiplier have different labels. For example in a 3D problem there are
293 /// 6 DOF types and the following labelling must be implemented:
294 /// 0 - x displacement (without lagr mult traction)
295 /// 1 - y displacement (without lagr mult traction)
296 /// 2 - z displacement (without lagr mult traction)
297 /// 4 - x displacement (with lagr mult traction)
298 /// 5 - y displacement (with lagr mult traction)
299 /// 6 - z displacement (with lagr mult traction)
300 //=============================================================================
302 : public BlockPreconditioner<CRDoubleMatrix>
303 {
304 /// PseudoElasticFSIPreconditioner is a friend to access the private
305 /// *_preconditioner_solve(...) method
307
308 public:
309 /// This preconditioner includes the option to use subsidiary
310 /// operators other than ExactPreconditioner for this problem.
311 /// This is the typedef of a function that should return an instance
312 /// of a subsidiary preconditioning operator. This preconditioner is
313 /// responsible for the destruction of the subsidiary preconditioners.
314 typedef Preconditioner* (*SubsidiaryPreconditionerFctPt)();
315
316 /// The augmented elasticity system can be preconditioned in one
317 /// of four ways.
318 /// 0 - Exact preconditioner
319 /// 1 - Block diagonal preconditioning
320 /// 2 - Block upper triangular preconditioner
321 /// 3 - Block lower triangular preconditioner
322 /// We group together the different components of the displacement vector
323 /// field for the block decomposition.
331
332 /// Default (and only) constructor.
348
349 /// destructor
351 {
352 this->clean_up_memory();
353 }
354
355 /// Broken copy constructor
357 delete;
358
359 /// Broken assignment operator
360 /*void operator=(const PseudoElasticPreconditionerOld&) = delete;*/
361
362 /// Setup method for the PseudoElasticPreconditionerOld.
363 void setup();
364
365 /// Apply the preconditioner. Method implemented in two
366 /// other methods (elastic and lagrange multiplier subsidiary
367 /// preocnditioner) for the PseudoElasticFSIPreconditioner
368 void preconditioner_solve(const DoubleVector& r, DoubleVector& z)
369 {
372 }
373
374 /// Access function to mesh containing the block-preconditionable
375 /// elastic elements
376 void set_elastic_mesh(Mesh* mesh_pt)
377 {
378 Elastic_mesh_pt = mesh_pt;
379 }
380
381 /// Access function to mesh containing the block-preconditionable
382 /// lagrange multiplier elements
384 {
386 }
387
388 /// Call to use the inf norm of S as scaling
393
394 /// Call to use no scaling
399
400 /// By default the Lagrange multiplier subsidiary systems are
401 /// preconditioner with ExactPreconditioner. For a different
402 /// preconditioner, pass a function to this
403 /// method returning a different subsidiary operator.
409
410 /// By default the elastic subsidiary systems are
411 /// preconditioner with ExactPreconditioner. For a different
412 /// preconditioner, pass a function to this
413 /// method returning a different subsidiary operator.
419
420 /// Set the type of preconditioner applied to the elastic:
421 /// 0 - Exact preconditioner
422 /// 1 - Block diagonal preconditioning
423 /// 2 - Block upper triangular preconditioner
424 /// 3 - Block lower triangular preconditioner
425 /// We group together the different components of the displacement vector
426 /// field for the block decomposition.
431
432 /// Clears the memory.
433 void clean_up_memory();
434
435 private:
436 /// Apply the elastic subsidiary preconditioner.
437 void elastic_preconditioner_solve(const DoubleVector& r, DoubleVector& z);
438
439 /// Apply the lagrange multiplier subsidiary preconditioner.
440 void lagrange_multiplier_preconditioner_solve(const DoubleVector& r,
441 DoubleVector& z);
442
443 /// The scaling. Defaults to infinity norm of S.
444 double Scaling;
445
446 /// boolean indicating whether the inf-norm of S should be used as
447 /// scaling. Default = true;
449
450 /// An unsigned indicating which method should be used for
451 /// preconditioning the solid component.
453
454 /// the dimension of the problem
455 unsigned Dim;
456
457 /// storage for the preconditioner for the solid system
459
460 /// lagrange multiplier preconditioner pt
462
463 /// The Lagrange multiplier subsidary preconditioner function pointer
466
467 /// The solid subsidiary preconditioner function pointer
469
470 /// Pointer to the mesh containing the solid elements
472
473 /// Pointer to the mesh containing the Lagrange multiplier elements
475 };
476
477
478 ////////////////////////////////////////////////////////////////////////////////
479 ////////////////////////////////////////////////////////////////////////////////
480 ////////////////////////////////////////////////////////////////////////////////
481
482
483 //=============================================================================
484 /// Subsidiary helper preconditioner for the PseudoElasticPreconditioner.
485 /// Required to construct the augmented elastic system prior to
486 /// preconditioning.
487 /// NOTE:
488 /// 1. This is only intended to be used as a subsidiary preconditioner within
489 /// the PseudoElasticPreconditioner.
490 /// 2. If this preconditioner has N DOF types then the first N/2 are assumed
491 /// to be ordinary solid DOF types, and the second N/2 are the solid DOF types
492 /// with lagrange multiplier tractions applied.
493 /// 3. By default this preconditioner uses a superlu preconditioner.
494 //=============================================================================
496 : public BlockPreconditioner<CRDoubleMatrix>
497 {
498 public:
499 /// typedef for a function that allows other preconditioners to be
500 /// emplyed to solve the subsidiary linear systems.
501 /// The function should return a pointer to the requred subsidiary
502 /// preconditioner generated using new. This preconditioner is responsible
503 /// for the destruction of the subsidiary preconditioners.
504 typedef Preconditioner* (*SubsidiaryPreconditionerFctPt)();
505
506 /// Constructor
513
514 /// Destructor
519
520 /// Broken copy constructor
523
524 /// Broken assignment operator
525 /*void operator=(const
526 PseudoElasticPreconditionerSubsidiaryPreconditionerOld&) = delete;*/
527
528 // Setup the preconditioner
529 void setup();
530
531 // Apply the preconditioner
532 void preconditioner_solve(const DoubleVector& r, DoubleVector& z);
533
534 /// Specify the scaling. Default is 1.0 Must be called before
535 /// setup(...).
536 double& scaling()
537 {
538 return Scaling;
539 }
540
541 /// access function to set the subsidiary preconditioner function.
547
548 private:
549 /// clears the memory
551 {
552 delete Preconditioner_pt;
554 }
555
556 // the augmentation scaling
557 double Scaling;
558
559 /// the preconditioner pt
560 Preconditioner* Preconditioner_pt;
561
562 /// the SubisidaryPreconditionerFctPt
564 }; // end of PseudoElasticPreconditionerSubsidiaryPreconditionerOld
565
566
567 ////////////////////////////////////////////////////////////////////////////////
568 ////////////////////////////////////////////////////////////////////////////////
569 ////////////////////////////////////////////////////////////////////////////////
570
571
572 //=============================================================================
573 /// Subsidiary helper preconditioner for the PseudoElasticPreconditioner.
574 /// Required for block preconditioner of the augmented elastic subsidiary
575 /// problem.
576 /// NOTE:
577 /// 1. This is only intended to be used as a subsidiary preconditioner within
578 /// the PseudoElasticPreconditioner.
579 /// 2. If this preconditioner has N DOF types then the first N/2 are assumed
580 /// to be ordinary solid DOF types, and the second N/2 are the solid DOF types
581 /// with lagrange multiplier tractions applied.
582 /// 3. By default this preconditioner uses a superlu preconditioner.
583 //=============================================================================
585 : public BlockPreconditioner<CRDoubleMatrix>
586 {
587 public:
588 /// This preconditioner includes the option to use subsidiary
589 /// operators other than ExactPreconditioner for this problem.
590 /// This is the typedef of a function that should return an instance
591 /// of a subsidiary preconditioning operator. This preconditioner is
592 /// responsible for the destruction of the subsidiary preconditioners.
593 typedef Preconditioner* (*SubsidiaryPreconditionerFctPt)();
594
595 /// Constructor. (By default this preconditioner is upper triangular).
597 : BlockPreconditioner<CRDoubleMatrix>()
598 {
599 // null the subsidiary preconditioner function pointer
601
602 // default to block diagonal
603 Method = 0;
604
605 // default scaling = 1.0
606 Scaling = 1.0;
607 };
608
609 /// Destructor
614
615 /// Broken copy constructor
618 delete;
619
620 /// Broken assignment operator
621 /*void operator=
622 (const PseudoElasticPreconditionerSubsidiaryBlockPreconditionerOld&) =
623 delete;*/
624
625 /// clean up the memory
626 void clean_up_memory();
627
628 /// Setup the preconditioner
629 void setup();
630
631 /// Apply preconditioner to r
632 void preconditioner_solve(const DoubleVector& res, DoubleVector& z);
633
634 /// access function to set the subsidiary preconditioner function.
640
641 /// use as a block diagonal preconditioner
643 {
644 Method = 0;
645 }
646
647 /// Use as an upper triangular preconditioner
649 {
650 Method = 1;
651 }
652
653 /// Use as a lower triangular preconditioner
655 {
656 Method = 2;
657 }
658
659 /// Specify the scaling. Default is 1.0 Must be set before
660 /// setup(...).
661 double& scaling()
662 {
663 return Scaling;
664 }
665
666 private:
667 /// Vector of SuperLU preconditioner pointers for storing the
668 /// preconditioners for each diagonal block
669 Vector<PseudoElasticPreconditionerSubsidiaryPreconditionerOld*>
671
672 /// Matrix of matrix vector product operators for the off diagonals
673 DenseMatrix<MatrixVectorProduct*> Off_diagonal_matrix_vector_products;
674
675 /// the preconditioning method.
676 /// 0 - block diagonal
677 /// 1 - upper triangular
678 /// 2 - lower triangular
679 unsigned Method;
680
681 /// The SubisidaryPreconditionerFctPt
683
684 /// The scaling. default 1.0.
685 double Scaling;
686 };
687
688
689 ///////////////////////////////////////////////////////////////////////////////
690 ///////////////////////////////////////////////////////////////////////////////
691 ///////////////////////////////////////////////////////////////////////////////
692
693
694 // /*
695 //=============================================================================
696 /// A helper class for PseudoElasticPreconditioner.
697 /// Note that this is NOT actually a functioning preconditioner.
698 /// We simply derive from this class to get access to the blocks.
699 //=============================================================================
701 : public BlockPreconditioner<CRDoubleMatrix>
702 {
703 public:
704 /// The constructor.
705 /// NOTE:
706 /// 1. master_prec_pt should point to the
707 /// PseudoElasticPreconditioner.
708 /// 2. matrix_pt should point to the jacobian.
709 /// 3. The vector dof_list should contain the full list of
710 /// DOFS associated with the solid subsidiary system.
711 /// 4. "solid_mesh_pt" should be a pointer to the solid mesh used in the
712 /// master preconditioner.
714 BlockPreconditioner<CRDoubleMatrix>* master_prec_pt,
715 CRDoubleMatrix* matrix_pt,
716 Vector<unsigned>& dof_list,
717 const Mesh* const solid_mesh_pt,
718 const OomphCommunicator* comm_pt)
719 {
720 // turn into a subisiary preconditioner
721 this->turn_into_subsidiary_block_preconditioner(master_prec_pt, dof_list);
722
723 // all dofs are of the same block type
724 Vector<unsigned> dof_to_block_map(dof_list.size(), 0);
725
726 // store the matrix_pt
727 set_matrix_pt(matrix_pt);
728
729 // set the mesh
730 this->set_nmesh(1);
731 this->set_mesh(0, solid_mesh_pt);
732
733 // set the communicator pointer
734 this->set_comm_pt(comm_pt);
735
736 // call block_setup(...)
737 this->block_setup(dof_to_block_map);
738 }
739
740 /// Destructor.
742 {
743 this->clear_block_preconditioner_base();
744 }
745
746 /// Broken copy constructor
749
750 /// Broken assignment operator
751 /*void operator=(const PseudoElasticPreconditionerScalingHelperOld&) =
752 * delete;*/
753
754 /// returns the infinite norm of S
755 double s_inf_norm()
756 {
757 CRDoubleMatrix* m_pt = new CRDoubleMatrix;
758 this->get_block(0, 0, *m_pt);
759 double s_inf_norm = m_pt->inf_norm();
760 delete m_pt;
761 return s_inf_norm;
762 }
763
764 // broken preconditioner setup
765 void setup()
766 {
767 std::ostringstream error_message;
768 error_message << "This method is intentionally broken. This class is not "
769 "a functioning "
770 << "preconditioner.";
771 throw OomphLibError(
772 error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
773 }
774
775 // broken preconditioner solve
776 void preconditioner_solve(const DoubleVector& r, DoubleVector& z)
777 {
778 std::ostringstream error_message;
779 error_message << "This method is intentionally broken. This class is not "
780 "a functioning "
781 << "preconditioner.";
782 throw OomphLibError(
783 error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
784 }
785
786
787 }; // end of PseudoElasticPreconditionerScalingHelperOld
788 // */
789
790} // namespace oomph
791#endif
Preconditioner for FSI problems with pseudo-elastic fluid node updates. Note: NavierStokesSchurComple...
A subsidiary preconditioner for the pseudo-elastic FSI preconditioner. Also a stand-alone preconditio...
void lagrange_multiplier_preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply the lagrange multiplier subsidiary preconditioner.
Preconditioner * Elastic_preconditioner_pt
storage for the preconditioner for the solid system
Vector< Preconditioner * > Lagrange_multiplier_preconditioner_pt
lagrange multiplier preconditioner pt
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply the preconditioner. Method implemented in two other methods (elastic and lagrange multiplier su...
Preconditioner *(* SubsidiaryPreconditionerFctPt)()
This preconditioner includes the option to use subsidiary operators other than ExactPreconditioner fo...
void set_lagrange_multiplier_mesh(Mesh *mesh_pt)
Access function to mesh containing the block-preconditionable lagrange multiplier elements.
bool Use_inf_norm_of_s_scaling
boolean indicating whether the inf-norm of S should be used as scaling. Default = true;
SubsidiaryPreconditionerFctPt Elastic_subsidiary_preconditioner_function_pt
The solid subsidiary preconditioner function pointer.
Elastic_preconditioner_type E_preconditioner_type
An unsigned indicating which method should be used for preconditioning the solid component.
void enable_inf_norm_of_s_scaling()
Call to use the inf norm of S as scaling.
void elastic_preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply the elastic subsidiary preconditioner.
double Scaling
The scaling. Defaults to infinity norm of S.
void disable_inf_norm_of_s_scaling()
Call to use no scaling.
PseudoElasticPreconditionerOld()
Default (and only) constructor.
Elastic_preconditioner_type
The augmented elasticity system can be preconditioned in one of four ways. 0 - Exact preconditioner 1...
Elastic_preconditioner_type & elastic_preconditioner_type()
Set the type of preconditioner applied to the elastic: 0 - Exact preconditioner 1 - Block diagonal pr...
void set_elastic_mesh(Mesh *mesh_pt)
Access function to mesh containing the block-preconditionable elastic elements.
void set_elastic_subsidiary_preconditioner(SubsidiaryPreconditionerFctPt prec_fn)
By default the elastic subsidiary systems are preconditioner with ExactPreconditioner....
SubsidiaryPreconditionerFctPt Lagrange_multiplier_subsidiary_preconditioner_function_pt
The Lagrange multiplier subsidary preconditioner function pointer.
void set_lagrange_multiplier_subsidiary_preconditioner(SubsidiaryPreconditionerFctPt prec_fn)
By default the Lagrange multiplier subsidiary systems are preconditioner with ExactPreconditioner....
Mesh * Elastic_mesh_pt
Pointer to the mesh containing the solid elements.
Mesh * Lagrange_multiplier_mesh_pt
Pointer to the mesh containing the Lagrange multiplier elements.
PseudoElasticPreconditionerOld(const PseudoElasticPreconditionerOld &)=delete
Broken copy constructor.
A helper class for PseudoElasticPreconditioner. Note that this is NOT actually a functioning precondi...
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
PseudoElasticPreconditionerScalingHelperOld(BlockPreconditioner< CRDoubleMatrix > *master_prec_pt, CRDoubleMatrix *matrix_pt, Vector< unsigned > &dof_list, const Mesh *const solid_mesh_pt, const OomphCommunicator *comm_pt)
The constructor. NOTE:
PseudoElasticPreconditionerScalingHelperOld(const PseudoElasticPreconditionerScalingHelperOld &)=delete
Broken copy constructor.
Subsidiary helper preconditioner for the PseudoElasticPreconditioner. Required for block precondition...
PseudoElasticPreconditionerSubsidiaryBlockPreconditionerOld()
Constructor. (By default this preconditioner is upper triangular).
void preconditioner_solve(const DoubleVector &res, DoubleVector &z)
Apply preconditioner to r.
SubsidiaryPreconditionerFctPt Subsidiary_preconditioner_function_pt
The SubisidaryPreconditionerFctPt.
void use_upper_triangular_approximation()
Use as an upper triangular preconditioner.
PseudoElasticPreconditionerSubsidiaryBlockPreconditionerOld(const PseudoElasticPreconditionerSubsidiaryBlockPreconditionerOld &)=delete
Broken copy constructor.
Vector< PseudoElasticPreconditionerSubsidiaryPreconditionerOld * > Diagonal_block_preconditioner_pt
Vector of SuperLU preconditioner pointers for storing the preconditioners for each diagonal block.
void use_lower_triangular_approximation()
Use as a lower triangular preconditioner.
unsigned Method
the preconditioning method. 0 - block diagonal 1 - upper triangular 2 - lower triangular
void set_subsidiary_preconditioner_function(SubsidiaryPreconditionerFctPt sub_prec_fn)
access function to set the subsidiary preconditioner function.
DenseMatrix< MatrixVectorProduct * > Off_diagonal_matrix_vector_products
Matrix of matrix vector product operators for the off diagonals.
Preconditioner *(* SubsidiaryPreconditionerFctPt)()
This preconditioner includes the option to use subsidiary operators other than ExactPreconditioner fo...
double & scaling()
Specify the scaling. Default is 1.0 Must be set before setup(...).
Subsidiary helper preconditioner for the PseudoElasticPreconditioner. Required to construct the augme...
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply the preconditioner.
SubsidiaryPreconditionerFctPt Subsidiary_preconditioner_function_pt
the SubisidaryPreconditionerFctPt
Preconditioner *(* SubsidiaryPreconditionerFctPt)()
typedef for a function that allows other preconditioners to be emplyed to solve the subsidiary linear...
void set_subsidiary_preconditioner_function(SubsidiaryPreconditionerFctPt sub_prec_fn)
access function to set the subsidiary preconditioner function.
PseudoElasticPreconditionerSubsidiaryPreconditionerOld(const PseudoElasticPreconditionerSubsidiaryPreconditionerOld &)=delete
Broken copy constructor.
double & scaling()
Specify the scaling. Default is 1.0 Must be called before setup(...).
A subsidiary preconditioner for the pseudo-elastic FSI preconditioner. Also a stand-alone preconditio...
SubsidiaryPreconditionerFctPt Lagrange_multiplier_subsidiary_preconditioner_function_pt
The Lagrange multiplier subsidiary preconditioner function pointer.
void disable_inf_norm_of_s_scaling()
Call to use no scaling.
void lagrange_multiplier_preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply the lagrange multiplier subsidiary preconditioner.
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply the preconditioner. Method implemented in two other methods (elastic and lagrange multiplier su...
bool Use_inf_norm_of_s_scaling
boolean indicating whether the inf-norm of S should be used as scaling. Default = true;
double Scaling
The scaling. Defaults to infinity norm of S.
void set_lagrange_multiplier_mesh(Mesh *mesh_pt)
Access function to mesh containing the block-preconditionable lagrange multiplier elements.
void set_lagrange_multiplier_subsidiary_preconditioner(SubsidiaryPreconditionerFctPt prec_fn)
By default the Lagrange multiplier subsidiary systems are preconditioner with ExactPreconditioner....
Vector< Preconditioner * > Lagrange_multiplier_preconditioner_pt
lagrange multiplier preconditioner pt
void set_elastic_subsidiary_preconditioner(SubsidiaryPreconditionerFctPt prec_fn)
By default the elastic subsidiary systems are preconditioner with ExactPreconditioner....
void enable_inf_norm_of_s_scaling()
Call to use the inf norm of S as scaling.
void elastic_preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply the elastic subsidiary preconditioner.
Mesh * Lagrange_multiplier_mesh_pt
Pointer to the mesh containing the Lagrange multiplier elements.
SubsidiaryPreconditionerFctPt Elastic_subsidiary_preconditioner_function_pt
The solid subsidiary preconditioner function pointer.
PseudoElasticPreconditioner()
Default (and only) constructor.
Mesh * Elastic_mesh_pt
Pointer to the mesh containing the solid elements.
Elastic_preconditioner_type E_preconditioner_type
An unsigned indicating which method should be used for preconditioning the solid component.
Elastic_preconditioner_type
The augmented elasticity system can be preconditioned in one of four ways. 0 - Exact preconditioner 1...
void set_elastic_mesh(Mesh *mesh_pt)
Access function to mesh containing the block-preconditionable elastic elements.
PseudoElasticPreconditioner(const PseudoElasticPreconditioner &)=delete
Broken copy constructor.
Preconditioner * Elastic_preconditioner_pt
storage for the preconditioner for the solid system
Preconditioner *(* SubsidiaryPreconditionerFctPt)()
This preconditioner includes the option to use subsidiary operators other than ExactPreconditioner fo...
unsigned Dim
the dimension of the problem
Elastic_preconditioner_type & elastic_preconditioner_type()
Set the type of preconditioner applied to the elastic: 0 - Exact preconditioner 1 - Block diagonal pr...
Preconditioner * get_lagrange_multiplier_preconditioner()
CG with diagonal preconditioner for the lagrange multiplier subsidiary linear systems.
Preconditioner * get_elastic_preconditioner()
AMG w/ GS smoothing for the augmented elastic subsidiary linear systems – calls Hypre version to stay...
Preconditioner * get_elastic_preconditioner_trilinos_ml()
TrilinosML smoothing for the augmented elastic subsidiary linear systems.
Preconditioner * get_elastic_preconditioner_hypre()
AMG w/ GS smoothing for the augmented elastic subsidiary linear systems.