'new' hasn't done that since C++98 but instead throws a std::bad_alloc itself. Consequently,
the assertion would never have failed.
const unsigned int dof_number,
const types::global_dof_index index);
- /**
- * Exception.
- */
- DeclException0 (ExcNoMemory);
-
private:
/**
* Coarsest level for which this object stores DoF indices.
const unsigned int n_indices = n_levels * dofs_per_vertex;
indices = new types::global_dof_index[n_indices];
- Assert (indices != nullptr, ExcNoMemory ());
-
for (unsigned int i = 0; i < n_indices; ++i)
indices[i] = DoFHandler<dim, spacedim>::invalid_dof_index;
indices_offset = new types::global_dof_index[n_levels];
- Assert (indices != nullptr, ExcNoMemory ());
-
for (unsigned int i = 0; i < n_levels; ++i)
indices_offset[i] = i * dofs_per_vertex;
}
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