Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions kernel/include/Operators/OperatorBase.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ OperatorBase<T, DIM>::OperatorBase(const std::vector<std::string>& integrators,
: mfem::Operator(this->compute_total_height(spatials), this->compute_total_width(spatials)),
params_(default_params_),
RHS(NULL),
rhs_solver_(nullptr),
current_dt_(0.0),
current_time_(0.0),
height_(height),
Expand Down Expand Up @@ -241,6 +242,7 @@ OperatorBase<T, DIM>::OperatorBase(const std::vector<std::string>& integrators,
: mfem::Operator(this->compute_total_height(spatials), this->compute_total_width(spatials)),
params_(default_params_),
RHS(NULL),
rhs_solver_(nullptr),
current_dt_(0.0),
current_time_(0.0),
height_(height),
Expand Down
5 changes: 2 additions & 3 deletions kernel/include/Operators/TransientOperator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ class TransientOperator : public OperatorBase<T, DIM>, public mfem::TimeDependen
/// Left-Hand-Side
mfem::ParBlockNonlinearForm* LHS;

// CCI
mfem::HypreParMatrix* Mmat;
// CCI
std::vector<mfem::HypreParMatrix*> Mmat_;

void build_mass_matrix(const std::vector<mfem::Vector>& u_vect);
void build_lhs_nonlinear_form(const double dt, const std::vector<mfem::Vector>& u);
bool constant_mass_matrix_{true};
Expand Down
17 changes: 13 additions & 4 deletions kernel/include/Operators/TransientOperator.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ void TransientOperator<T, DIM>::build_mass_matrix(const std::vector<mfem::Vector
}

this->M_solver_.clear();

for (auto* mat : this->Mmat_) {
delete mat;
}
this->Mmat_.clear();
for (unsigned int i = 0; i < u_vect.size(); i++) {
if (M != nullptr) {
delete M;
Expand All @@ -306,12 +309,13 @@ void TransientOperator<T, DIM>::build_mass_matrix(const std::vector<mfem::Vector
M->Assemble(0);
M->Finalize(0);

Mmat = M->ParallelAssemble();
std::unique_ptr<mfem::HypreParMatrix> Me(Mmat->EliminateRowsCols(this->ess_tdof_list_[i]));
this->Mmat_.emplace_back(M->ParallelAssemble());
std::unique_ptr<mfem::HypreParMatrix> Me(
this->Mmat_[i]->EliminateRowsCols(this->ess_tdof_list_[i]));

this->mass_matrix_solver_ =
std::make_shared<LSolver>(this->mass_solver_, this->mass_solver_params_,
this->mass_precond_, this->mass_precond_params_, *Mmat);
this->mass_precond_, this->mass_precond_params_, *this->Mmat_[i]);
this->M_solver_.emplace_back(this->mass_matrix_solver_->get_solver());
}
}
Expand Down Expand Up @@ -700,6 +704,11 @@ void TransientOperator<T, DIM>::free_memory() {
this->LHS = nullptr;
delete this->reduced_oper;
this->reduced_oper = nullptr;

for (auto* mat : this->Mmat_) {
delete mat;
}
this->Mmat_.clear();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion kernel/include/PostProcessing/postprocessing.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void PostProcessing<T, DC, DIM>::get_parameters() {
this->enable_compute_energies_ =
this->params_.template get_param_value_or_default<bool>("enable_compute_energies", true);
this->enable_save_specialized_at_iter_ = this->params_.template get_param_value_or_default<bool>(
"enable_save_specialized_at_iter", false);
"enable_save_specialized_at_iter", true);
this->force_clean_output_dir_ =
this->params_.template get_param_value_or_default<bool>("force_clean_output_dir", false);
if (this->params_.has_parameter("iso_val_to_compute")) {
Expand Down
Loading