Fluid structure interaction suite
poisson.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_h
18 #define pdes_serial_poisson_h
19 
20 #include <deal.II/base/function.h>
24 
26 #include <deal.II/dofs/dof_tools.h>
27 
28 #include <deal.II/fe/fe_q.h>
29 #include <deal.II/fe/fe_values.h>
30 
32 #include <deal.II/grid/tria.h>
33 
38 #include <deal.II/lac/solver_cg.h>
40 #include <deal.II/lac/vector.h>
41 
45 
46 #include <fstream>
47 #include <iostream>
48 
49 #include "parsed_lac/amg.h"
52 #include "parsed_tools/constants.h"
54 #include "parsed_tools/data_out.h"
56 #include "parsed_tools/function.h"
59 
60 namespace PDEs
61 {
62  using namespace dealii;
63 
64  namespace Serial
65  {
191  template <int dim, int spacedim = dim>
192  class Poisson : public ParameterAcceptor
193  {
194  public:
204  Poisson();
205 
225  void
226  run();
227 
228  protected:
239  void
240  setup_system();
241 
335  void
336  assemble_system();
337 
379  void
380  solve();
381 
419  void
420  output_results(const unsigned cycle) const;
421 
445  const std::string component_names = "u";
446 
472 
506 
545 
550 
556  std::unique_ptr<Mapping<dim, spacedim>> mapping;
601 
620 
640 
749 
775 
787  unsigned int console_level = 1;
789  };
790  } // namespace Serial
791 } // namespace PDEs
792 #endif
Poisson problem, serial version.
Definition: poisson.h:193
ParsedTools::Constants constants
Constants of the problem.
Definition: poisson.h:600
ParsedTools::FiniteElement< dim, spacedim > finite_element
A wrapper around deal.II FiniteElement classes.
Definition: poisson.h:544
SparsityPattern sparsity_pattern
Definition: poisson.h:564
Vector< double > solution
Definition: poisson.h:566
ParsedLAC::InverseOperator inverse_operator
Definition: poisson.h:568
Vector< double > system_rhs
Definition: poisson.h:567
Triangulation< dim, spacedim > triangulation
The actual triangulation.
Definition: poisson.h:517
std::unique_ptr< Mapping< dim, spacedim > > mapping
According to the Triangulation type, we use a MappingFE or a MappingQ, to make sure we can run the pr...
Definition: poisson.h:556
ParsedTools::BoundaryConditions< spacedim > boundary_conditions
Boundary conditions used in this class.
Definition: poisson.h:702
ParsedTools::GridRefinement grid_refinement
Grid refinement and error estimation.
Definition: poisson.h:505
ParsedLAC::AMGPreconditioner preconditioner
Definition: poisson.h:569
ParsedTools::Function< spacedim > forcing_term
The actual function to use as a forcing term.
Definition: poisson.h:619
SparseMatrix< double > system_matrix
Definition: poisson.h:565
ParsedTools::GridGenerator< dim, spacedim > grid_generator
A wrapper around GridIn, GridOut, and GridGenerator namespace.
Definition: poisson.h:471
DoFHandler< dim, spacedim > dof_handler
The actual DoFHandler class.
Definition: poisson.h:549
ParsedTools::Function< spacedim > exact_solution
The actual function to use as a exact solution when computing the errors.
Definition: poisson.h:639
ParsedTools::DataOut< dim, spacedim > data_out
Wrapper around the DataOut class.
Definition: poisson.h:774
AffineConstraints< double > constraints
Definition: poisson.h:563
ParsedTools::ConvergenceTable error_table
This is a wrapper around the ParsedConvergenceTable class, that allows you to specify what error to c...
Definition: poisson.h:748
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