Skip to content
Snippets Groups Projects
Commit 9d496674 authored by Tom Fischer's avatar Tom Fischer
Browse files

Merge branch 'SpeedupDirichletBCsForDeactivatedSubdomains' into 'master'

Speedup Dirichlet BCs for deactivated subdomains

See merge request ogs/ogs!3756
parents deb816da d27ffa06
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,12 @@ void applyKnownSolution(
SpMat AT = A_eigen.transpose();
// Reserve space for at least one value (on the diagonal). For deactivated
// subdomains some rows and columns might end empty (in the A matrix) and so
// no space is reserved for the Dirichlet conditions in the transposed
// matrix. Then the coeffRef call will do costly reallocations.
AT.reserve(Eigen::VectorXi::Constant(A_eigen.rows(), 1));
for (std::size_t ix = 0; ix < vec_knownX_id.size(); ix++)
{
SpMat::Index const row_id = vec_knownX_id[ix];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment