refactor(solver): renamed setupOperator -> setOperatorEssentialTrueDofs to better reflect method job

This commit is contained in:
2025-04-21 09:05:34 -04:00
parent 30a6cb074f
commit 513e90b7a0
3 changed files with 5 additions and 7 deletions

View File

@@ -178,13 +178,13 @@ void PolySolver::solve() const {
// --- Set the initial guess for the solution ---
setInitialGuess();
setupOperator();
setOperatorEssentialTrueDofs();
// It's safer to get the offsets directly from the operator after finalization
const mfem::Array<int>& block_offsets = m_polytropOperator->GetBlockOffsets(); // Assuming a getter exists or accessing member if public/friend
mfem::BlockVector state_vector(block_offsets);
state_vector.GetBlock(0) = static_cast<mfem::Vector>(*m_theta);
state_vector.GetBlock(1) = static_cast<mfem::Vector>(*m_phi);
state_vector.GetBlock(0) = static_cast<mfem::Vector>(*m_theta); // NOLINT(*-slicing)
state_vector.GetBlock(1) = static_cast<mfem::Vector>(*m_phi); // NOLINT(*-slicing)
mfem::Vector zero_rhs(block_offsets.Last());
zero_rhs = 0.0;
@@ -304,7 +304,7 @@ void PolySolver::saveAndViewSolution(const mfem::BlockVector& state_vector) cons
}
}
void PolySolver::setupOperator() const {
void PolySolver::setOperatorEssentialTrueDofs() const {
SSE::MFEMArrayPairSet ess_tdof_pair_set = getEssentialTrueDof();
m_polytropOperator->SetEssentialTrueDofs(ess_tdof_pair_set);