Fluid structure interaction suite
poisson_nitsche_interface.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 
17 #ifndef pdes_serial_poisson_nitsche_h
18 #define pdes_serial_poisson_nitsche_h
19 
20 #include <deal.II/base/function.h>
24 #include <deal.II/base/timer.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 
36 #include <deal.II/grid/tria.h>
37 
42 #include <deal.II/lac/solver_cg.h>
44 #include <deal.II/lac/vector.h>
45 
49 
50 #include <fstream>
51 #include <iostream>
52 
56 #include "parsed_lac/amg.h"
59 #include "parsed_tools/constants.h"
61 #include "parsed_tools/data_out.h"
63 #include "parsed_tools/function.h"
66 
67 namespace PDEs
68 {
69  using namespace dealii;
70 
71  namespace Serial
72  {
106  template <int dim, int spacedim = dim>
108  {
109  public:
111 
112 
113  void
114  run();
115 
116  protected:
117  void
118  generate_grids();
119 
120 
131  void
132 
133  setup_system();
134 
135 
136  void
137  assemble_system();
138 
139 
140  void
141  solve();
142 
143 
144  void
145  output_results(const unsigned cycle) const;
146 
147 
148  const std::string component_names = "u";
149 
150 
152 
154 
156 
166 
173  std::unique_ptr<GridTools::Cache<spacedim, spacedim>> space_cache;
174  std::unique_ptr<GridTools::Cache<dim, spacedim>> embedded_cache;
175 
185  std::vector<std::tuple<
186  typename dealii::Triangulation<spacedim, spacedim>::cell_iterator,
187  typename dealii::Triangulation<dim, spacedim>::cell_iterator,
188  dealii::Quadrature<spacedim>>>
190 
191 
193 
198 
204  std::unique_ptr<Mapping<spacedim, spacedim>> mapping;
227 
232 
233 
239 
240 
247 
253 
254 
256 
263 
264 
266 
267 
268 
284 
289  unsigned int console_level = 1;
290 
291 
292 
299  double penalty = 100.0;
300 
301 
302 
304  };
305  } // namespace Serial
306 } // namespace PDEs
307 #endif
Imposing an interaface condition in Poisson problem, serial version.
ParsedTools::Function< spacedim > forcing_term
The actual function to use as a forcing term.
DoFHandler< spacedim, spacedim > space_dh
The actual DoFHandler class.
ParsedTools::Function< spacedim > nitsche_coefficient
The coefficient in front of the Nitsche contribution to the stiffness matrix.
ParsedTools::GridGenerator< spacedim, spacedim > grid_generator
ParsedTools::DataOut< spacedim, spacedim > data_out
Choosing as embedded space the square and as embedding space the square , with embedded value the fu...
std::unique_ptr< GridTools::Cache< spacedim, spacedim > > space_cache
GridTools::Cache objects are used to cache all the necessary information about a given triangulation,...
Triangulation< spacedim, spacedim > space_triangulation
The actual triangulations.
Triangulation< dim, spacedim > embedded_triangulation
std::unique_ptr< GridTools::Cache< dim, spacedim > > embedded_cache
std::unique_ptr< Mapping< spacedim, spacedim > > mapping
According to the Triangulation type, we use a MappingFE or a MappingQ, to make sure we can run the pr...
ParsedTools::GridGenerator< dim, spacedim > embedded_grid_generator
ParsedTools::Function< spacedim > embedded_value
This is the value we want to impose on the embedded domain.
ParsedTools::BoundaryConditions< spacedim > boundary_conditions
ParsedTools::Function< spacedim > exact_solution
The actual function to use as a exact solution when computing the errors.
ParsedTools::FiniteElement< spacedim, spacedim > space_fe
std::vector< std::tuple< typename Triangulation< spacedim, spacedim >::cell_iterator, typename Triangulation< dim, spacedim >::cell_iterator, Quadrature< spacedim > > > cells_and_quads
The coupling between the two grids is ultimately encoded in this vector.
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 boundary conditions.
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.
A proxy ParameterAcceptor wrapper for classes that have a member function add_parameters,...
Definition: proxy.h:33
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