PRISMS-PF Manual
Loading...
Searching...
No Matches
solve_context.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2025 PRISMS Center at the University of Michigan
2// SPDX-License-Identifier: GNU Lesser General Public Version 2.1
3
4#pragma once
5
6#include <deal.II/base/exceptions.h>
7#include <deal.II/base/mg_level_object.h>
8#include <deal.II/fe/mapping_q1.h>
9
16
18
19#include <prismspf/config.h>
20
23
25
34template <unsigned int dim, unsigned int degree, typename number>
36{
37public:
57
61 [[nodiscard]] const std::vector<FieldAttributes> &
63 {
64 return field_attributes;
65 }
66
72 {
73 Assert(user_inputs != nullptr, dealii::ExcNotInitialized());
74 return *user_inputs;
75 }
76
82 {
83 Assert(triangulation_manager != nullptr, dealii::ExcNotInitialized());
85 }
86
92 {
93 Assert(triangulation_manager != nullptr, dealii::ExcNotInitialized());
95 }
96
102 {
103 Assert(dof_manager != nullptr, dealii::ExcNotInitialized());
104 return *dof_manager;
105 }
106
112 {
113 Assert(dof_manager != nullptr, dealii::ExcNotInitialized());
114 return *dof_manager;
115 }
116
122 {
123 Assert(constraint_manager != nullptr, dealii::ExcNotInitialized());
124 return *constraint_manager;
125 }
126
132 {
133 Assert(constraint_manager != nullptr, dealii::ExcNotInitialized());
134 return *constraint_manager;
135 }
136
142 {
143 Assert(solution_indexer != nullptr, dealii::ExcNotInitialized());
144 return *solution_indexer;
145 }
146
152 {
153 return invm_manager;
154 }
155
161 {
162 return invm_manager;
163 }
164
168 [[nodiscard]] const SimulationTimer &
170 {
171 return sim_timer;
172 }
173
179 {
180 return sim_timer;
181 }
182
188 {
189 Assert(pde_operator != nullptr, dealii::ExcNotInitialized());
190 return *pde_operator;
191 }
192
193private:
197 std::vector<FieldAttributes> field_attributes;
198
203
208
213
218
223
228
233
238};
239
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
A little class that computes the element volume for our triangulation.
Definition invm_manager.h:28
This class contains the user implementation of each PDE operator.
Definition pde_operator_base.h:24
Definition simulation_timer.h:13
Class that provides access to solution vectors spread across different groups.
Definition solution_indexer.h:20
This class provides context for a solver with ptrs to all the relevant dependencies.
Definition solve_context.h:36
const PDEOperatorBase< dim, degree, number > * pde_operator
PDE operator.
Definition solve_context.h:237
DoFManager< dim, degree > & get_dof_manager()
Get the dof manager.
Definition solve_context.h:111
ConstraintManager< dim, degree, number > & get_constraint_manager()
Get the constraint manager.
Definition solve_context.h:131
const DoFManager< dim, degree > & get_dof_manager() const
Get the dof manager.
Definition solve_context.h:101
const std::vector< FieldAttributes > & get_field_attributes() const
Get the field attributes.
Definition solve_context.h:62
SimulationTimer sim_timer
Simulation timer.
Definition solve_context.h:232
SimulationTimer & get_simulation_timer()
Get the simulation timer.
Definition solve_context.h:178
SolutionIndexer< dim, number > & get_solution_indexer() const
Get the solution manager.
Definition solve_context.h:141
const UserInputParameters< dim > * user_inputs
User-inputs.
Definition solve_context.h:202
const ConstraintManager< dim, degree, number > & get_constraint_manager() const
Get the constraint manager.
Definition solve_context.h:121
TriangulationManager< dim > & get_triangulation_manager()
Get the triangulation manager.
Definition solve_context.h:91
const UserInputParameters< dim > & get_user_inputs() const
Get the user-inputs.
Definition solve_context.h:71
const PDEOperatorBase< dim, degree, number > & get_pde_operator() const
Get a shared pointer to the pde operator.
Definition solve_context.h:187
TriangulationManager< dim > * triangulation_manager
Triangulation manager.
Definition solve_context.h:207
const SimulationTimer & get_simulation_timer() const
Get the simulation timer.
Definition solve_context.h:169
SolveContext(std::vector< FieldAttributes > _field_attributes, const UserInputParameters< dim > &_user_inputs, TriangulationManager< dim > &_triangulation_manager, DoFManager< dim, degree > &_dof_manager, ConstraintManager< dim, degree, number > &_constraint_manager, SolutionIndexer< dim, number > &_solution_indexer, const PDEOperatorBase< dim, degree, number > &_pde_operator)
Constructor.
Definition solve_context.h:41
SolutionIndexer< dim, number > * solution_indexer
Solution manager.
Definition solve_context.h:222
const InvMManager< dim, degree, number > & get_invm_manager() const
Get the invm manager.
Definition solve_context.h:151
std::vector< FieldAttributes > field_attributes
Field attributes.
Definition solve_context.h:197
InvMManager< dim, degree, number > invm_manager
Solution manager.
Definition solve_context.h:227
ConstraintManager< dim, degree, number > * constraint_manager
Constraint manager.
Definition solve_context.h:217
DoFManager< dim, degree > * dof_manager
DoF manager.
Definition solve_context.h:212
const TriangulationManager< dim > & get_triangulation_manager() const
Get the triangulation manager.
Definition solve_context.h:81
InvMManager< dim, degree, number > & get_invm_manager()
Get the invm manager.
Definition solve_context.h:160
This class handlers the generation and manipulation of triangulations.
Definition triangulation_manager.h:26
Definition user_input_parameters.h:32
@ Value
Use value of the variable as a criterion for refinement.
Definition grid_refiner_criterion.h:31
Definition conditional_ostreams.cc:20
Definition vectorized_operations.h:17