6#include <deal.II/distributed/solution_transfer.h>
7#include <deal.II/lac/affine_constraints.h>
8#include <deal.II/lac/la_parallel_block_vector.h>
9#include <deal.II/lac/la_parallel_vector.h>
10#include <deal.II/matrix_free/matrix_free.h>
19#include <prismspf/config.h>
28template <
typename number>
29using BlockVector = dealii::LinearAlgebra::distributed::BlockVector<number>;
34template <
typename number>
40using dealii::MatrixFree;
59template <
unsigned int dim,
typename number>
70template <
unsigned int dim,
typename number>
74#if DEAL_II_VERSION_MAJOR >= 9 && DEAL_II_VERSION_MINOR >= 7
75 using SolutionTransfer = dealii::SolutionTransfer<dim, SolutionVector<number>>;
78 dealii::parallel::distributed::SolutionTransfer<dim, SolutionVector<number>>;
131 unsigned int relative_level = 0);
139 unsigned int relative_level = 0)
const;
162 [[
nodiscard]]
const MatrixFree<dim, number> &
180 [[
nodiscard]]
const std::vector<unsigned int> &
186 [[
nodiscard]]
const std::vector<unsigned int> &
192 template <
unsigned int degree>
201 template <
unsigned int degree>
241 update(
unsigned int relative_level = 0);
The class handles the generation and application of boundary conditions based on the user-inputs.
Definition constraint_manager.h:50
Class that manages the deal.II DoFHandlers.
Definition dof_manager.h:27
Class that manages solution initialization and swapping with old solutions.
Definition group_solution_handler.h:72
void init(const DoFManager< dim, degree > &dof_manager, const ConstraintManager< dim, degree, number > &constraint_manager, unsigned int num_old_saved)
Initialize the solution set.
Definition group_solution_handler.cc:175
void apply_constraints_to_all(unsigned int relative_level)
Apply the given constraints to all the solution vectors, including old.
Definition group_solution_handler.cc:336
SolutionVector< number > & get_solution_vector(unsigned int global_index, unsigned int relative_level=0)
Get a solution vector of a given field index.
Definition group_solution_handler.cc:54
BlockVector< number > & get_old_solution_full_vector(unsigned int age, unsigned int relative_level=0)
Get the old solution vector set at a given age.
Definition group_solution_handler.cc:74
void update(unsigned int relative_level=0)
Update and propagate the old solutions.
Definition group_solution_handler.cc:387
std::vector< SolutionLevel< dim, number > > solution_levels
Solutions and matrix free of each level.
Definition group_solution_handler.h:280
std::vector< unsigned int > block_to_global_index
Mapping from block index to global field index.
Definition group_solution_handler.h:270
SolutionLevel< dim, number > & get_solution_level(unsigned int relative_level=0)
Get the solutions object at a level.
Definition group_solution_handler.cc:114
std::vector< unsigned int > global_to_block_index
Mapping from global field index to block index.
Definition group_solution_handler.h:275
void update_ghosts(unsigned int relative_level=0) const
Update the ghost values.
Definition group_solution_handler.cc:317
void prepare_for_solution_transfer()
Prepare for solution transfer.
Definition group_solution_handler.cc:274
const std::vector< unsigned int > & get_block_to_global_index() const
Get the global index from the block index.
Definition group_solution_handler.cc:165
void apply_initial_condition_for_old_fields()
Apply initial condition to the old fields. For now, this simply copies the values in the normal field...
Definition group_solution_handler.cc:371
BlockVector< number > & get_solution_full_vector(unsigned int relative_level=0)
Get the solution vector set. This contains all the normal fields and is typically used for output.
Definition group_solution_handler.cc:38
void zero_out_ghosts(unsigned int relative_level=0) const
Zero out the ghost values.
Definition group_solution_handler.cc:329
const SolveGroup & get_solve_group() const
Get the underlying solve group object.
Definition group_solution_handler.cc:151
void execute_solution_transfer()
Transfer solutions.
Definition group_solution_handler.cc:294
void apply_constraints(unsigned int relative_level=0)
Apply the given constraints to a solution vector of a given field index.
Definition group_solution_handler.cc:355
void init_solution_transfer()
Reinit the solution transfer objections.
Definition group_solution_handler.cc:260
dealii::parallel::distributed::SolutionTransfer< dim, SolutionVector< number > > SolutionTransfer
Definition group_solution_handler.h:78
SolutionVector< number > & get_old_solution_vector(unsigned int age, unsigned int global_index, unsigned int relative_level=0)
Get a solution vector of a given field index at a given age.
Definition group_solution_handler.cc:92
void reinit(const DoFManager< dim, degree > &dof_manager, const ConstraintManager< dim, degree, number > &constraint_manager)
Reinitialize the solution set.
Definition group_solution_handler.cc:207
MatrixFree< dim, number > & get_matrix_free(unsigned int relative_level=0)
Get the matrix_free object at a level.
Definition group_solution_handler.cc:128
std::vector< SolutionTransfer > block_solution_transfer
Utility for solution transfer to different mesh (for AMR). Can only work on one block at a time.
Definition group_solution_handler.h:290
SolveGroup solve_group
Information about the solve group this handler is responsible for.
Definition group_solution_handler.h:265
const std::vector< unsigned int > & get_global_to_block_index() const
Get the block index from the global index.
Definition group_solution_handler.cc:158
unsigned int get_block_index(unsigned int global_index) const
Get the block index from the global index.
Definition group_solution_handler.cc:144
Structure to hold the attributes of a solve-group.
Definition solve_group.h:59
@ Value
Use value of the variable as a criterion for refinement.
Definition grid_refiner_criterion.h:31
dealii::LinearAlgebra::distributed::BlockVector< number > BlockVector
Typedef for solution block vector.
Definition group_solution_handler.h:29
BlockVector< number >::BlockType SolutionVector
Typedef for solution vector.
Definition group_solution_handler.h:35
Definition conditional_ostreams.cc:20
The solution vectors and their corresponding matrix free object with respect to some multigrid level.
Definition group_solution_handler.h:61
MatrixFree< dim, number > matrix_free
Definition group_solution_handler.h:64
std::vector< BlockVector< number > > old_solutions
Definition group_solution_handler.h:63
BlockVector< number > solutions
Definition group_solution_handler.h:62