Fluid structure interaction suite
stokes.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2022 by Luca Heltai
4 //
5 // This file is part of the FSI-suite platform, based on the deal.II library.
6 //
7 // The FSI-suite platform is free software; you can use it, redistribute it,
8 // and/or modify it under the terms of the GNU Lesser General Public License as
9 // published by the Free Software Foundation; either version 3.0 of the License,
10 // or (at your option) any later version. The full text of the license can be
11 // found in the file LICENSE at the top level of the FSI-suite platform
12 // distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef pdes_serial_stokes_h
17 #define pdes_serial_stokes_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/function.h>
25 
27 #include <deal.II/dofs/dof_tools.h>
28 
29 #include <deal.II/fe/fe_q.h>
30 #include <deal.II/fe/fe_values.h>
31 
33 #include <deal.II/grid/tria.h>
34 
41 #include <deal.II/lac/solver_cg.h>
42 
46 
47 #include <fstream>
48 #include <iostream>
49 
50 #include "parsed_lac/amg.h"
51 #include "parsed_lac/ilu.h"
54 #include "parsed_tools/constants.h"
55 #include "parsed_tools/data_out.h"
57 #include "parsed_tools/function.h"
60 
61 namespace PDEs
62 {
63  using namespace dealii;
64 
65  namespace Serial
66  {
75  template <int dim>
76  class Stokes : public ParameterAcceptor
77  {
78  public:
79  Stokes();
80 
81  void
82  run();
83 
84  protected:
85  void
86  setup_system();
87 
88  void
89  assemble_system();
90 
91  void
92  solve();
93 
94  void
95  output_results(const unsigned cycle) const;
96 
100  const std::string component_names;
101 
102  // Grid classes
106 
107  // FE and dofs classes
110  std::unique_ptr<Mapping<dim>> mapping;
111 
115  std::vector<types::global_dof_index> dofs_per_block;
116 
117  // Linear algebra classes
126 
127  // Forcing terms and boundary conditions
132 
133  // Error convergence tables
135 
136  // Output class
138 
139  // Console level
140  unsigned int console_level = 1;
141 
142  // Extractor for vector components
145  };
146  } // namespace Serial
147 } // namespace PDEs
148 #endif
std::vector< types::global_dof_index > dofs_per_block
Dofs per block.
Definition: stokes.h:115
ParsedTools::GridRefinement grid_refinement
Definition: stokes.h:104
ParsedConvergenceTable error_table
Definition: stokes.h:134
BlockSparseMatrix< double > system_matrix
Definition: stokes.h:120
ParsedTools::BoundaryConditions< dim > boundary_conditions
Definition: stokes.h:131
BlockVector< double > solution
Definition: stokes.h:121
ParsedTools::Function< dim > exact_solution
Definition: stokes.h:130
std::unique_ptr< Mapping< dim > > mapping
Definition: stokes.h:110
BlockSparsityPattern sparsity_pattern
Definition: stokes.h:119
const FEValuesExtractors::Vector velocity
Definition: stokes.h:143
BlockVector< double > system_rhs
Definition: stokes.h:122
Triangulation< dim > triangulation
Definition: stokes.h:105
const FEValuesExtractors::Scalar pressure
Definition: stokes.h:144
ParsedTools::FiniteElement< dim > finite_element
Definition: stokes.h:108
const std::string component_names
How we identify the component names.
Definition: stokes.h:100
DoFHandler< dim > dof_handler
Definition: stokes.h:109
ParsedLAC::InverseOperator inverse_operator
Definition: stokes.h:123
ParsedTools::Constants constants
Definition: stokes.h:128
ParsedLAC::AMGPreconditioner schur_preconditioner
Definition: stokes.h:125
ParsedTools::DataOut< dim > data_out
Definition: stokes.h:137
ParsedTools::GridGenerator< dim > grid_generator
Definition: stokes.h:103
ParsedLAC::AMGPreconditioner velocity_preconditioner
Definition: stokes.h:124
AffineConstraints< double > constraints
Definition: stokes.h:118
ParsedTools::Function< dim > forcing_term
Definition: stokes.h:129
A parsed AMG preconditioner which uses parameter files to choose between different options.
Definition: amg.h:37
A factory that can generate inverse operators according to parameter files.
A wrapper for physical constants to be shared among functions and classes.
Definition: constants.h:44
Parsed FiniteElement.
A wrapper for the FunctionParser class.
Definition: function.h:30
GridGenerator class.
A wrapper for refinement strategies.
PDEs::Stokes< dim, LAC::LAdealii > Stokes
Definition: stokes.h:86
We collect in this namespace all PDEs that are relevant to Fluid Structure Interaction Problems.
void run(char **argv, const std::string &input_parameter_file, const std::string &output_parameter_file)
Setup parameters from the command line, and call the Class::run() method.
Definition: runner.h:219