Loading [MathJax]/extensions/tex2jax.js
Fluid structure interaction suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PDEs::MPI::Poisson< dim, spacedim > Class Template Reference

Solve the Poisson problem, in parallel. More...

#include <poisson.h>

Inheritance diagram for PDEs::MPI::Poisson< dim, spacedim >:
[legend]

Public Types

using ScratchData = typename LinearProblem< dim, spacedim, LAC::LATrilinos >::ScratchData
 
using CopyData = typename LinearProblem< dim, spacedim, LAC::LATrilinos >::CopyData
 
using VectorType = typename LinearProblem< dim, spacedim, LAC::LATrilinos >::VectorType
 
- Public Types inherited from PDEs::LinearProblem< dim, dim, LAC::LATrilinos >
using ARKode = typename SUNDIALS::ARKode< typename LacType::BlockVector >
 SUNDIALS time integrator. More...
 
using Triangulation = typename std::conditional< dim==1, parallel::shared::Triangulation< dim, spacedim >, parallel::distributed::Triangulation< dim, spacedim > >::type
 Make sure we can run also in 1d, where parallel distributed triangulations are not available, and we can only use parallel shared ones. More...
 
using CopyData = MeshWorker::CopyData< 1, 1, 1 >
 Default CopyData object, used in the WorkStream class. More...
 
using ScratchData = MeshWorker::ScratchData< dim, spacedim >
 Default ScratchData object, used in the workstream class. More...
 
using BlockVectorType = typename LacType::BlockVector
 Block vector type. More...
 
using VectorType = typename BlockVectorType::BlockType
 Vector type. More...
 
using BlockMatrixType = typename LacType::BlockSparseMatrix
 Block matrix type. More...
 

Public Member Functions

 Poisson ()
 Constructor. More...
 
virtual ~Poisson ()=default
 Destroy the Poisson object. More...
 
virtual void custom_estimator (Vector< float > &error_per_cell) const override
 Build a custom error estimator. More...
 
- Public Member Functions inherited from PDEs::LinearProblem< dim, dim, LAC::LATrilinos >
 LinearProblem (const std::string &component_names="u", const std::string &problem_name="")
 Constructor. More...
 
virtual ~LinearProblem ()=default
 Virtual destructor. More...
 
virtual void run ()
 Main entry point of the problem. More...
 
void run_steady_state ()
 Solve a steady state problem. More...
 
void run_quasi_static ()
 Solve a quasi static problem. More...
 
void run_transient ()
 Solve a dynamic problem. More...
 
virtual void setup_transient (ARKode &arkode)
 Setup the transient problem. More...
 
virtual void copy_one_cell (const CopyData &copy)
 Distribute the data that has been assembled by assemble_system_on_cell() to the global matrix and rhs. More...
 
virtual void estimate (Vector< float > &error_per_cell) const
 Perform a posteriori error estimation, and store the results in the error_per_cell vector. More...
 
void mark (const Vector< float > &error_per_cell)
 According to the chosen strategy, mark some cells for refinement, possibily using the error_per_cell vector. More...
 
void refine ()
 Refine the grid. More...
 
virtual void setup_system ()
 Initial setup: distribute degrees of freedom, make all vectors and matrices of the right size, initialize functions and pointers. More...
 
virtual void assemble_system ()
 Actually loop over cells, and assemble the global system. More...
 
virtual void output_results (const unsigned cycle) const
 Output the solution and the grid in a format that can be read by Paraview or Visit. More...
 
virtual void print_system_info () const
 print some information about the current processes/mpi/ranks/etc. More...
 
- Public Member Functions inherited from ParameterAcceptor
 ParameterAcceptor (const std::string &section_name="")
 
unsigned int get_acceptor_id () const
 
virtual ~ParameterAcceptor () override
 
virtual void declare_parameters (ParameterHandler &prm)
 
virtual void parse_parameters (ParameterHandler &prm)
 
std::string get_section_name () const
 
std::vector< std::string > get_section_path () const
 
void add_parameter (const std::string &entry, ParameterType &parameter, const std::string &documentation="", ParameterHandler &prm_=prm, const Patterns::PatternBase &pattern=*Patterns::Tools::Convert< ParameterType >::to_pattern())
 
void enter_subsection (const std::string &subsection)
 
void leave_subsection ()
 
void enter_my_subsection (ParameterHandler &prm)
 
void leave_my_subsection (ParameterHandler &prm)
 
void serialize (Archive &ar, const unsigned int version)
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void serialize (Archive &ar, const unsigned int version)
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 

Protected Member Functions

virtual void assemble_system_one_cell (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, ScratchData &scratch, CopyData &copy) override
 Explicitly assemble the Poisson problem on a single cell. More...
 
virtual void solve () override
 Make sure we initialize the right type of linear solver. More...
 

Protected Attributes

ParsedTools::Function< spacedim > coefficient
 
- Protected Attributes inherited from ParameterAcceptor
const std::string section_name
 
std::vector< std::string > subsections
 

Additional Inherited Members

- Static Public Member Functions inherited from ParameterAcceptor
static void initialize (const std::string &filename="", const std::string &output_filename="", const ParameterHandler::OutputStyle output_style_for_output_filename=ParameterHandler::Short, ParameterHandler &prm=ParameterAcceptor::prm, const ParameterHandler::OutputStyle output_style_for_filename=ParameterHandler::DefaultStyle)
 
static void initialize (std::istream &input_stream, ParameterHandler &prm=ParameterAcceptor::prm)
 
static void clear ()
 
static void parse_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm)
 
static void declare_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm)
 
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Public Attributes inherited from PDEs::LinearProblem< dim, dim, LAC::LATrilinos >
boost::signals2::signal< void()> check_consistency_call_back
 Check consistency of the problem. More...
 
boost::signals2::signal< void()> add_constraints_call_back
 A signal that is called at the end of setup_system() More...
 
boost::signals2::signal< void()> setup_system_call_back
 A signal that is called at the end of setup_system() More...
 
boost::signals2::signal< void()> output_results_call_back
 A signal that is called at the end of output_results() More...
 
boost::signals2::signal< void()> assemble_system_call_back
 A signal that is called at the end of assemble_system() More...
 
boost::signals2::signal< void(ParsedTools::DataOut< dim, spacedim > &)> add_data_vector
 Connect to this signal to add data additional vectors to the output system. More...
 
boost::signals2::signal< void(const double &time, const double &time_step, const unsigned int &time_step_number)> advance_time_call_back
 Connect to this signal to receive time information. More...
 
const std::string component_names
 Comma seperated names of components. More...
 
const unsigned int n_components
 Number of components. More...
 
const std::string problem_name
 Name of the problem to solve. More...
 
const std::string section_name
 Name of the section to use within the parameter file. More...
 
MPI_Comm mpi_communicator
 Global mpi communicator. More...
 
const unsigned int mpi_rank
 The mpi rank of this process. More...
 
const unsigned int mpi_size
 The number of mpi processes. More...
 
int number_of_threads
 Number of threads to use for multi-threaded assembly. More...
 
unsigned int verbosity_level
 Verbosity level of deallog. More...
 
ConditionalOStream pcout
 Output stream, only active on process 0. More...
 
TimerOutput timer
 Timing information. More...
 
EvolutionType evolution_type
 Describe the type of time evolution of the problem. More...
 
ParsedTools::GridGenerator< dim, spacedim > grid_generator
 A wrapper around GridIn, GridOut, and GridGenerator namespace. More...
 
ParsedTools::GridRefinement grid_refinement
 Grid refinement and error estimation. More...
 
Triangulation triangulation
 The problem triangulation. More...
 
ParsedTools::FiniteElement< dim, spacedim > finite_element
 A wrapper around deal.II FiniteElement classes. More...
 
std::unique_ptr< Mapping< dim, spacedim > > mapping
 The Mapping between reference and real elements. More...
 
Quadrature< dim > cell_quadrature
 A quadrature used for cell integration. More...
 
Quadrature< dim - 1 > face_quadrature
 A quadrature used for face integration. More...
 
DoFHandler< dim, spacedim > dof_handler
 Handler of degrees of freedom. More...
 
AffineConstraints< double > constraints
 Hanging nodes and essential boundary conditions. More...
 
std::vector< types::global_dof_indexdofs_per_block
 Dofs per block. More...
 
std::vector< IndexSetlocally_owned_dofs
 All degrees of freedom owned by this MPI process. More...
 
std::vector< IndexSetlocally_relevant_dofs
 All degrees of freedom needed for output and error estimation. More...
 
LacType::BlockSparsityPattern sparsity
 System sparsity pattern. More...
 
LacType::BlockSparseMatrix matrix
 System matrix. More...
 
LacType::BlockSparseMatrix mass_matrix
 System matrix. More...
 
LacType::BlockVector locally_relevant_solution
 A read only copy of the solution vector used for output and error estimation. More...
 
LacType::BlockVector solution
 Solution vector. More...
 
LacType::BlockVector rhs
 The system right hand side. More...
 
Vector< float > error_per_cell
 Storage for local error estimator. More...
 
ParsedLAC::InverseOperator inverse_operator
 Inverse operator. More...
 
LacType::AMG preconditioner
 Preconditioner. More...
 
ParsedLAC::InverseOperator mass_inverse_operator
 Inverse operator for the mass matrix. More...
 
LacType::AMG mass_preconditioner
 Preconditioner for the mass matrix. More...
 
ParsedTools::Function< spacedim > forcing_term
 The actual function to use as a forcing term. More...
 
ParsedTools::Function< spacedim > exact_solution
 The actual function to use as a exact solution when computing the errors. More...
 
ParsedTools::Function< spacedim > initial_value
 Only used for transient problems. More...
 
ParsedTools::BoundaryConditions< spacedim > boundary_conditions
 Boundary conditions used in this class. More...
 
ParsedTools::ConvergenceTable error_table
 This is a wrapper around the ParsedConvergenceTable class, that allows you to specify what error to computes, and how to compute them. More...
 
ParsedTools::DataOut< dim, spacedim > data_out
 Wrapper around the DataOut class. More...
 
double start_time
 Initial time for transient and quasi stati simulations. More...
 
double end_time
 Final time for transient and quasi-static simulations. More...
 
double desired_start_step_size
 Initial step size for transient and quasi-static simulations. More...
 
unsigned int output_frequency
 How often to output the solution. More...
 
ParsedTools::Proxy< typename SUNDIALS::ARKode< typename LacType::BlockVector >::AdditionalData > ark_ode_data
 Configuration used to setup transient simulations. More...
 
boost::signals2::signal< void(ARKode &)> setup_arkode_call_back
 Signal that is triggered after creating the arkode object. More...
 
- Public Attributes inherited from ParameterAcceptor
boost::signals2::signal< void()> declare_parameters_call_back
 
boost::signals2::signal< void()> parse_parameters_call_back
 
- Static Public Attributes inherited from PDEs::LinearProblem< dim, dim, LAC::LATrilinos >
static constexpr bool lac_is_dealii
 True if we are using deal.II Linear Algebra Classes. More...
 
static constexpr bool lac_is_petsc
 True if we are using PETSc Linear Algebra Classes. More...
 
static constexpr bool lac_is_trilinos
 True if we are using Trilinos Linear Algebra Classes. More...
 
- Static Public Attributes inherited from ParameterAcceptor
static ParameterHandler prm
 

Detailed Description

template<int dim, int spacedim = dim>
class PDEs::MPI::Poisson< dim, spacedim >

Solve the Poisson problem, in parallel.

Definition at line 30 of file poisson.h.

Member Typedef Documentation

◆ ScratchData

template<int dim, int spacedim = dim>
using PDEs::MPI::Poisson< dim, spacedim >::ScratchData = typename LinearProblem<dim, spacedim, LAC::LATrilinos>::ScratchData

Definition at line 50 of file poisson.h.

◆ CopyData

template<int dim, int spacedim = dim>
using PDEs::MPI::Poisson< dim, spacedim >::CopyData = typename LinearProblem<dim, spacedim, LAC::LATrilinos>::CopyData

Definition at line 53 of file poisson.h.

◆ VectorType

template<int dim, int spacedim = dim>
using PDEs::MPI::Poisson< dim, spacedim >::VectorType = typename LinearProblem<dim, spacedim, LAC::LATrilinos>::VectorType

Definition at line 56 of file poisson.h.

Constructor & Destructor Documentation

◆ Poisson()

template<int dim, int spacedim>
PDEs::MPI::Poisson< dim, spacedim >::Poisson

Constructor.

Initialize all parameters, including the base class, and make sure the class is ready to run.

Definition at line 27 of file poisson.cc.

◆ ~Poisson()

template<int dim, int spacedim = dim>
virtual PDEs::MPI::Poisson< dim, spacedim >::~Poisson ( )
virtualdefault

Destroy the Poisson object.

Member Function Documentation

◆ custom_estimator()

◆ assemble_system_one_cell()

template<int dim, int spacedim>
void PDEs::MPI::Poisson< dim, spacedim >::assemble_system_one_cell ( const typename DoFHandler< dim, spacedim >::active_cell_iterator &  cell,
ScratchData scratch,
CopyData copy 
)
overrideprotectedvirtual

Explicitly assemble the Poisson problem on a single cell.

Reimplemented from PDEs::LinearProblem< dim, dim, LAC::LATrilinos >.

Definition at line 36 of file poisson.cc.

References DoFHandler< int dim, int spacedim >::reinit().

◆ solve()

template<int dim, int spacedim>
void PDEs::MPI::Poisson< dim, spacedim >::solve
overrideprotectedvirtual

Make sure we initialize the right type of linear solver.

Reimplemented from PDEs::LinearProblem< dim, dim, LAC::LATrilinos >.

Definition at line 72 of file poisson.cc.

References inverse_operator().

Member Data Documentation

◆ coefficient

template<int dim, int spacedim = dim>
ParsedTools::Function<spacedim> PDEs::MPI::Poisson< dim, spacedim >::coefficient
protected

Definition at line 75 of file poisson.h.


The documentation for this class was generated from the following files: