Solve the Poisson problem, in parallel. More...
#include <poisson.h>
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 |
![]() | |
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... | |
![]() | |
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 ©) |
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... | |
![]() | |
ParameterAcceptor (const std::string §ion_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 ¶meter, 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 |
![]() | |
Subscriptor () | |
Subscriptor (const Subscriptor &) | |
Subscriptor (Subscriptor &&) noexcept | |
virtual | ~Subscriptor () |
Subscriptor & | operator= (const Subscriptor &) |
Subscriptor & | operator= (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 ©) 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 |
![]() | |
const std::string | section_name |
std::vector< std::string > | subsections |
Additional Inherited Members | |
![]() | |
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 ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
![]() | |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
![]() | |
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_index > | dofs_per_block |
Dofs per block. More... | |
std::vector< IndexSet > | locally_owned_dofs |
All degrees of freedom owned by this MPI process. More... | |
std::vector< IndexSet > | locally_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... | |
![]() | |
boost::signals2::signal< void()> | declare_parameters_call_back |
boost::signals2::signal< void()> | parse_parameters_call_back |
![]() | |
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 ParameterHandler | prm |
Solve the Poisson problem, in parallel.
using PDEs::MPI::Poisson< dim, spacedim >::ScratchData = typename LinearProblem<dim, spacedim, LAC::LATrilinos>::ScratchData |
using PDEs::MPI::Poisson< dim, spacedim >::CopyData = typename LinearProblem<dim, spacedim, LAC::LATrilinos>::CopyData |
using PDEs::MPI::Poisson< dim, spacedim >::VectorType = typename LinearProblem<dim, spacedim, LAC::LATrilinos>::VectorType |
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.
|
virtualdefault |
Destroy the Poisson object.
|
overridevirtual |
Build a custom error estimator.
Reimplemented from PDEs::LinearProblem< dim, dim, LAC::LATrilinos >.
Definition at line 87 of file poisson.cc.
References MeshWorker::assemble_own_cells, MeshWorker::assemble_own_interior_faces_both, AssertDimension, deallog, ParsedTools::Components::get_cell_quadrature(), ParsedTools::Components::get_face_quadrature(), Vector< typename Number >::l1_norm(), MeshWorker::mesh_loop(), Utilities::MPI::sum(), triangulation, update_gradients, update_hessians, update_JxW_values, update_normal_vectors, and update_quadrature_points.
|
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().
|
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().
|
protected |