fix(poly): fixed numerous bugs related to inconsistent system sizing with the reduced operator
this has restored the symmetry which we relied on before.
This commit is contained in:
@@ -3,9 +3,41 @@
|
||||
#include "mfem.hpp"
|
||||
|
||||
namespace serif::utilities {
|
||||
mfem::SparseMatrix buildReducedMatrix(
|
||||
[[nodiscard]] mfem::SparseMatrix build_reduced_matrix(
|
||||
const mfem::SparseMatrix& matrix,
|
||||
const mfem::Array<int>& trialEssentialDofs,
|
||||
const mfem::Array<int>& testEssentialDofs
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief Generate a vector of 1s and 0s where 1 elemetns cooresponds to queried dofs. Useful for degugging
|
||||
* @param allDofs array, counding from 0, of all dofs in the system
|
||||
* @param highlightDofs the dofs that you want to identify
|
||||
* @return
|
||||
*
|
||||
* *Example Usage:*
|
||||
* One could use this to identify, for example, which dofs are being identified as the central dofs
|
||||
* @code
|
||||
* ...
|
||||
* mfem::Array<int> phiDofs, thetaDofs;
|
||||
* phiDofs.SetSize(m_fePhi->GetNDofs());
|
||||
* thetaDofs.SetSize(m_feTheta->GetNDofs());
|
||||
* const mfem::Vector phiHighlightVector = serif::utilities::build_dof_identification_vector(phiDofs, phiCenterDofs);
|
||||
* const mfem::Vector thetaHighlightVector = serif::utilities::build_dof_identification_vector(thetaDofs, thetaCenterDofs);
|
||||
* Probe::glVisView(
|
||||
* const_cast<mfem::Vector&>(phiHighlightVector),
|
||||
* *m_fePhi,
|
||||
* "Phi Center Dofs"
|
||||
* );
|
||||
* Probe::glVisView(
|
||||
* const_cast<mfem::Vector&>(thetaHighlightVector),
|
||||
* *m_feTheta,
|
||||
* "Theta Center Dofs"
|
||||
* );
|
||||
* @endcode
|
||||
*/
|
||||
mfem::Vector build_dof_identification_vector(
|
||||
const mfem::Array<int>& allDofs,
|
||||
const::mfem::Array<int>& highlightDofs
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user