pseudo_elastic_fsi_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-2022 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_FSI_PRECONDITIONER
27 #define OOMPH_PSEUDO_ELASTIC_FSI_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 "../navier_stokes/navier_stokes_preconditioners.h"
36 #include "../generic/general_purpose_block_preconditioners.h"
38 
39 namespace oomph
40 {
41  //============================================================================
59  //============================================================================
61  : public BlockPreconditioner<CRDoubleMatrix>
62  {
63  public:
67  PseudoElasticFSIPreconditioner(const unsigned& dim, Problem* problem_pt)
68  : Dim(dim)
69  {
71 
72  // set the number of meshes
73  this->set_nmesh(3);
74 
75  // null pointers
77  Solid_mesh_pt = 0;
79 
80  // create the pseudo solid preconditioner
82 
83  // using Schur complement preconditioner for NS
87 
88  // set defaults
90 
91  // default super lu
93 
94  // create the matrix vector product operatrs
99  }
100 
101  // destructor
103  {
104  // clean the memory
105  this->clean_up_memory();
106 
107  // delete the pseudo solid preconditioner
109 
110  // delete the navier stokes preconditioner
113 
114  // delete the solid preconditioner if default
116  {
118  }
119 
120  // delete the matrix vector product operators
122  delete Solid_fluid_matvec_pt;
125  }
126 
129  delete;
130 
132  // Commented out broken assignment operator because this can lead to a
133  // conflict warning when used in the virtual inheritence hierarchy.
134  // Essentially the compiler doesn't realise that two separate
135  // implementations of the broken function are the same and so, quite
136  // rightly, it shouts.
137  /*void operator=(const PseudoElasticFSIPreconditioner&) =
138  delete;*/
139 
141  void clean_up_memory();
142 
144  void setup();
145 
148 
151  {
153  }
154 
157  {
159  }
160 
163  {
165  }
166 
170  {
172  {
174  }
175  Solid_preconditioner_pt = prec_pt;
177  }
178 
181  {
183  }
184 
187  {
189  }
190 
194  {
196  }
197 
201  {
203  }
204 
205  private:
208 
211 
215 
218 
222 
226 
229 
232 
235 
236  // lagrange onto solid matric vector product
238 
241 
244 
247 
249  unsigned Dim;
250 
255 
256  }; // end of class FSILagrangeMultiplierPreconditioner
257 
258 } // namespace oomph
259 #endif
Definition: block_preconditioner.h:422
const Mesh * mesh_pt(const unsigned &i) const
Definition: block_preconditioner.h:1782
void set_nmesh(const unsigned &n)
Definition: block_preconditioner.h:2851
Definition: double_vector.h:58
Definition: matrix_vector_product.h:51
Definition: mesh.h:67
Definition: navier_stokes_preconditioners.h:607
Definition: preconditioner.h:54
Definition: problem.h:151
Definition: pseudo_elastic_fsi_preconditioner.h:62
MatrixVectorProduct * Solid_pseudo_elastic_matvec_pt
solid onto pseudo solid matrix vector operatio
Definition: pseudo_elastic_fsi_preconditioner.h:234
Mesh * Lagrange_multiplier_mesh_pt
Mesh containing the lagrange multiplier elements.
Definition: pseudo_elastic_fsi_preconditioner.h:246
MatrixVectorProduct * Lagrange_solid_matvec_pt
Definition: pseudo_elastic_fsi_preconditioner.h:237
void enable_navier_stokes_schur_complement_preconditioner()
Definition: pseudo_elastic_fsi_preconditioner.h:193
void clean_up_memory()
Broken assignment operator.
Definition: pseudo_elastic_fsi_preconditioner.cc:34
Preconditioner * Solid_preconditioner_pt
pointer to the solid preconditioner
Definition: pseudo_elastic_fsi_preconditioner.h:217
NavierStokesSchurComplementPreconditioner * Navier_stokes_schur_complement_preconditioner_pt
Navier Stokes Schur complement preconditioner.
Definition: pseudo_elastic_fsi_preconditioner.h:214
void setup()
Setup the precoonditioner.
Definition: pseudo_elastic_fsi_preconditioner.cc:52
NavierStokesSchurComplementPreconditioner *const navier_stokes_schur_complement_preconditioner_pt()
Access function to the Navier Stokes Schur complement preconditioner.
Definition: pseudo_elastic_fsi_preconditioner.h:186
Preconditioner * Navier_stokes_preconditioner_pt
pointer to the navier stokes precondtioner
Definition: pseudo_elastic_fsi_preconditioner.h:210
MatrixVectorProduct * Fluid_pseudo_elastic_matvec_pt
fluid onto pseudosolid matrix vector operator
Definition: pseudo_elastic_fsi_preconditioner.h:228
MatrixVectorProduct * Solid_fluid_matvec_pt
solid onto fluid matrix vector operatio
Definition: pseudo_elastic_fsi_preconditioner.h:231
void set_fluid_and_pseudo_elastic_mesh_pt(Mesh *mesh_pt)
specify the mesh containing the combined fluid/pseudo solid elements
Definition: pseudo_elastic_fsi_preconditioner.h:150
virtual ~PseudoElasticFSIPreconditioner()
Definition: pseudo_elastic_fsi_preconditioner.h:102
void set_solid_preconditioner(Preconditioner *prec_pt)
Definition: pseudo_elastic_fsi_preconditioner.h:169
Mesh * Fluid_and_pseudo_elastic_mesh_pt
Mesh containing the combined fluid and pseudo solid element.
Definition: pseudo_elastic_fsi_preconditioner.h:240
PseudoElasticFSIPreconditioner(const unsigned &dim, Problem *problem_pt)
Definition: pseudo_elastic_fsi_preconditioner.h:67
bool Solid_preconditioner_is_block_preconditioner
Definition: pseudo_elastic_fsi_preconditioner.h:225
bool Use_navier_stokes_schur_complement_preconditioner
Definition: pseudo_elastic_fsi_preconditioner.h:254
bool Using_default_solid_preconditioner
Definition: pseudo_elastic_fsi_preconditioner.h:221
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Apply the preconditioner.
Definition: pseudo_elastic_fsi_preconditioner.cc:280
void set_lagrange_multiplier_mesh_pt(Mesh *mesh_pt)
specify the mesh containing the lagrange multiplier elements
Definition: pseudo_elastic_fsi_preconditioner.h:162
unsigned Dim
the dimension of the fluid
Definition: pseudo_elastic_fsi_preconditioner.h:249
PseudoElasticPreconditioner *const pseudo_elastic_preconditioner_pt()
Access function to the pseudo elastic subsidiary preconditioner.
Definition: pseudo_elastic_fsi_preconditioner.h:180
void disable_navier_stokes_schur_complement_preconditioner()
Definition: pseudo_elastic_fsi_preconditioner.h:200
void set_solid_mesh_pt(Mesh *mesh_pt)
specify the mesh containing the solid elements
Definition: pseudo_elastic_fsi_preconditioner.h:156
PseudoElasticFSIPreconditioner(const PseudoElasticFSIPreconditioner &)=delete
Broken copy constructor.
PseudoElasticPreconditioner * Pseudo_elastic_preconditioner_pt
pointer to the pseudo solid preconditioner
Definition: pseudo_elastic_fsi_preconditioner.h:207
Mesh * Solid_mesh_pt
Mesh containing the solid elements.
Definition: pseudo_elastic_fsi_preconditioner.h:243
Definition: pseudo_elastic_preconditioner.h:100
An interface to allow SuperLU to be used as an (exact) Preconditioner.
Definition: SuperLU_preconditioner.h:40
r
Definition: UniformPSDSelfTest.py:20
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10