102 this->compute_subset_attributes(fieldSolveType::EXPLICIT_POSTPROCESS);
105 if (this->subset_attributes.empty())
110 this->compute_shared_dependencies();
113 this->system_matrix =
114 std::make_unique<SystemMatrixType>(this->user_inputs, this->subset_attributes);
117 this->system_matrix->clear();
118 this->system_matrix->initialize(this->matrix_free_handler.get_matrix_free());
121 for (
const auto &[index, map] :
122 this->subset_attributes.begin()->second.dependency_set_RHS)
124 for (
const auto &[dependency_type, field_type] : map)
126 const auto pair = std::make_pair(index, dependency_type);
128 Assert(this->solution_handler.solution_set.find(pair) !=
129 this->solution_handler.solution_set.end(),
130 dealii::ExcMessage(
"There is no solution vector for the given index = " +
131 std::to_string(index) +
132 " and type = " + to_string(dependency_type)));
134 Assert(this->solution_handler.new_solution_set.find(index) !=
135 this->solution_handler.new_solution_set.end(),
137 "There is no new solution vector for the given index = " +
138 std::to_string(index)));
140 solution_subset.push_back(this->solution_handler.solution_set.at(pair));
141 new_solution_subset.push_back(
142 this->solution_handler.new_solution_set.at(index));
143 global_to_local_solution.emplace(pair, solution_subset.size() - 1);
147 this->system_matrix->add_global_to_local_mapping(global_to_local_solution);
155 if (this->subset_attributes.empty())
161 this->system_matrix->compute_postprocess_explicit_update(new_solution_subset,
166 for (
auto [index, vector] : this->solution_handler.new_solution_set)
168 if (this->subset_attributes.find(index) != this->subset_attributes.end())
170 vector->scale(this->invm_handler.get_invm(index));
175 this->solution_handler.update(fieldSolveType::EXPLICIT_POSTPROCESS);
This class handles the explicit solves of all postprocessed fields.
Definition explicit_postprocess_solver.h:29
~explicitPostprocessSolver()=default
Destructor.
void solve() override
Solve a single update step.
Definition explicit_postprocess_solver.h:152
explicitPostprocessSolver(const userInputParameters< dim > &_user_inputs, const matrixfreeHandler< dim > &_matrix_free_handler, const invmHandler< dim, degree > &_invm_handler, const constraintHandler< dim > &_constraint_handler, const dofHandler< dim > &_dof_handler, const dealii::MappingQ1< dim > &_mapping, solutionHandler< dim > &_solution_handler)
Constructor.
Definition explicit_postprocess_solver.h:81
void init() override
Initialize system.
Definition explicit_postprocess_solver.h:100