feat(cpp-object-oriented-modular-refactoring): step 20 - analysis-hierarchy
This commit is contained in:
@@ -57,13 +57,6 @@ Result<SparseMatrix> ExtractBlock(const SparseMatrix& full,
|
||||
std::move(contributions), pattern);
|
||||
}
|
||||
|
||||
void RequireDofOrder(const DofManager& dof_manager) {
|
||||
if (!dof_manager.ValidateInvariants().IsOk()) {
|
||||
throw std::invalid_argument{
|
||||
"DofManager constraint dimensions or order are invalid."};
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Result<PartitionedStiffness> EssentialConstraintPolicy::Partition(
|
||||
@@ -114,7 +107,6 @@ Result<PartitionedStiffness> EssentialConstraintPolicy::Partition(
|
||||
|
||||
Vector EssentialConstraintPolicy::GatherFree(
|
||||
const Vector& full_values, const DofManager& dof_manager) const {
|
||||
RequireDofOrder(dof_manager);
|
||||
if (full_values.Size() != dof_manager.FullDofCount()) {
|
||||
throw std::invalid_argument{
|
||||
"Full vector size must match the DofManager full dimension."};
|
||||
@@ -129,7 +121,6 @@ Vector EssentialConstraintPolicy::GatherFree(
|
||||
|
||||
Vector EssentialConstraintPolicy::GatherConstrained(
|
||||
const Vector& full_values, const DofManager& dof_manager) const {
|
||||
RequireDofOrder(dof_manager);
|
||||
if (full_values.Size() != dof_manager.FullDofCount()) {
|
||||
throw std::invalid_argument{
|
||||
"Full vector size must match the DofManager full dimension."};
|
||||
@@ -145,7 +136,6 @@ Vector EssentialConstraintPolicy::GatherConstrained(
|
||||
Vector EssentialConstraintPolicy::ReconstructFull(
|
||||
const Vector& free_values, const Vector& constrained_values,
|
||||
const DofManager& dof_manager) const {
|
||||
RequireDofOrder(dof_manager);
|
||||
if (free_values.Size() != dof_manager.FreeDofCount() ||
|
||||
constrained_values.Size() != dof_manager.ConstrainedDofCount()) {
|
||||
throw std::invalid_argument{
|
||||
|
||||
Reference in New Issue
Block a user