template <int dim>
void PoissonProblem<dim>::clear () {
+ if (dof != 0) {
+ delete dof;
+ dof = 0;
+ };
+
if (tria != 0) {
delete tria;
tria = 0;
};
- if (dof != 0) {
- delete dof;
- dof = 0;
- };
// make it known to the underlying
// ProblemBase that tria and dof
cout << endl;
+ const unsigned int n_dofs = dof->n_dofs();
+ // release the lock that the dof object
+ // has to the finite element object
+ dof->clear ();
+
delete fe;
delete quadrature;
delete boundary_quadrature;
- return dof->n_dofs();
+ return n_dofs;
};
template <int dim>
void PoissonProblem<dim>::clear () {
+ if (dof != 0) {
+ delete dof;
+ dof = 0;
+ };
+
if (tria != 0) {
delete tria;
tria = 0;
};
- if (dof != 0) {
- delete dof;
- dof = 0;
- };
// make it known to the underlying
// ProblemBase that tria and dof
cout << endl;
+ const unsigned int n_dofs = dof->n_dofs();
+ // release the lock that the dof object
+ // has to the finite element object
+ dof->clear ();
+
delete fe;
delete quadrature;
delete boundary_quadrature;
- return dof->n_dofs();
+ return n_dofs;
};
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams