Skip to content

Commit 888877c

Browse files
authored
Merge pull request #6776 from bangerth/move-assertion
Move an assertion.
2 parents 033f231 + 7fdd7e1 commit 888877c

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

include/aspect/postprocess/visualization/spd_factor.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ namespace aspect
5656
void
5757
evaluate_vector_field(const DataPostprocessorInputs::Vector<dim> &input_data,
5858
std::vector<Vector<double>> &computed_quantities) const override;
59-
60-
/**
61-
* Read the parameters this class declares from the parameter file.
62-
*/
63-
void
64-
parse_parameters (ParameterHandler &prm) override;
6559
};
6660
}
6761
}

source/postprocess/visualization/spd_factor.cc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ namespace aspect
4848
evaluate_vector_field(const DataPostprocessorInputs::Vector<dim> &input_data,
4949
std::vector<Vector<double>> &computed_quantities) const
5050
{
51+
Assert(Parameters<dim>::is_defect_correction(this->get_parameters().nonlinear_solver),
52+
ExcMessage("The SPD factor plugin can only be used with defect correction type Stokes or Newton Stokes "
53+
"solvers."));
54+
5155
const unsigned int n_quadrature_points = input_data.solution_values.size();
5256
Assert (computed_quantities.size() == n_quadrature_points, ExcInternalError());
5357
Assert (computed_quantities[0].size() == 1, ExcInternalError());
@@ -76,15 +80,6 @@ namespace aspect
7680
this->get_newton_handler().parameters.SPD_safety_factor);
7781
}
7882
}
79-
80-
template <int dim>
81-
void
82-
SPD_Factor<dim>::parse_parameters (ParameterHandler &/*prm*/)
83-
{
84-
AssertThrow(Parameters<dim>::is_defect_correction(this->get_parameters().nonlinear_solver),
85-
ExcMessage("The SPD factor plugin can only be used with defect correction type Stokes or Newton Stokes "
86-
"solvers."));
87-
}
8883
}
8984
}
9085
}

0 commit comments

Comments
 (0)