107 this->compute_subset_attributes(fieldSolveType::EXPLICIT);
110 if (this->subset_attributes.empty())
115 this->compute_shared_dependencies();
118 this->system_matrix =
119 std::make_unique<SystemMatrixType>(this->user_inputs, this->subset_attributes);
122 this->set_initial_condition();
125 for (
auto &[pair, vector] : this->solution_handler.solution_set)
127 if (this->subset_attributes.find(pair.first) == this->subset_attributes.end())
131 this->constraint_handler.get_constraint(pair.first).distribute(*vector);
135 this->system_matrix->clear();
136 this->system_matrix->initialize(this->matrix_free_handler.get_matrix_free());
139 for (
const auto &[index, map] :
140 this->subset_attributes.begin()->second.dependency_set_RHS)
142 for (
const auto &[dependency_type, field_type] : map)
144 const auto pair = std::make_pair(index, dependency_type);
146 Assert(this->solution_handler.solution_set.find(pair) !=
147 this->solution_handler.solution_set.end(),
148 dealii::ExcMessage(
"There is no solution vector for the given index = " +
149 std::to_string(index) +
150 " and type = " + to_string(dependency_type)));
152 Assert(this->solution_handler.new_solution_set.find(index) !=
153 this->solution_handler.new_solution_set.end(),
155 "There is no new solution vector for the given index = " +
156 std::to_string(index)));
158 solution_subset.push_back(this->solution_handler.solution_set.at(pair));
159 new_solution_subset.push_back(
160 this->solution_handler.new_solution_set.at(index));
161 global_to_local_solution.emplace(pair, solution_subset.size() - 1);
164 this->system_matrix->add_global_to_local_mapping(global_to_local_solution);
172 if (this->subset_attributes.empty())
178 this->system_matrix->compute_explicit_update(new_solution_subset, solution_subset);
182 for (
auto [index, vector] : this->solution_handler.new_solution_set)
184 if (this->subset_attributes.find(index) != this->subset_attributes.end())
186 vector->scale(this->invm_handler.get_invm(index));
191 this->solution_handler.update(fieldSolveType::EXPLICIT);
194 for (
auto &[pair, vector] : this->solution_handler.solution_set)
196 if (this->subset_attributes.find(pair.first) == this->subset_attributes.end())
200 this->constraint_handler.get_constraint(pair.first).distribute(*vector);
explicitSolver(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_solver.h:86