--- /dev/null
+Deprecated: The autopartition parameter has been removed from
+parallel::DistributedTriangulationBase::load() and all inheriting
+classes.
+<br>
+(Marc Fehling, 2021/07/24)
* in with notify_ready_to_unpack() after calling load().
*/
virtual void
- load(const std::string &filename,
- const bool autopartition = false) override;
+ load(const std::string &filename) override;
+
+ /**
+ * @copydoc load()
+ *
+ * @deprecated The autopartition parameter has been removed.
+ */
+ DEAL_II_DEPRECATED_EARLY
+ virtual void
+ load(const std::string &filename, const bool autopartition) override;
private:
virtual unsigned int
* be read in with
* DistributedTriangulationBase::DataTransfer::notify_ready_to_unpack()
* after calling load().
+ */
+ virtual void
+ load(const std::string &filename) override;
+
+ /**
+ * @copydoc load()
*
- * The @p autopartition flag tells p4est to ignore the partitioning that
- * the triangulation had when it was saved and make it uniform upon
- * loading. If @p autopartition is set to true, the triangulation will
- * always be repartitioned. If set to false, it is only repartitioned if
- * needed (i.e., if a different number of MPI processes is encountered).
+ * @deprecated The autopartition parameter has been removed.
*/
+ DEAL_II_DEPRECATED_EARLY
virtual void
- load(const std::string &filename,
- const bool autopartition = true) override;
+ load(const std::string &filename, const bool autopartition) override;
/**
* Load the refinement information from a given parallel forest. This
* compiler.
*/
virtual void
- load(const std::string &filename,
- const bool autopartition = true) override;
+ load(const std::string &filename) override;
+
+ /**
+ * This function is not implemented, but needs to be present for the
+ * compiler.
+ */
+ DEAL_II_DEPRECATED_EARLY
+ virtual void
+ load(const std::string &filename, const bool autopartition) override;
/**
* This function is not implemented, but needs to be present for the
* this class.
*/
virtual void
+ load(const std::string & /*filename*/) override
+ {}
+
+ /**
+ * Dummy replacement to allow for better error messages when compiling
+ * this class.
+ */
+ DEAL_II_DEPRECATED_EARLY
+ virtual void
load(const std::string & /*filename*/,
- const bool /*autopartition*/ = true) override
+ const bool /*autopartition*/) override
{}
/**
* notify_ready_to_unpack() after calling load().
*/
virtual void
- load(const std::string &filename, const bool autopartition = true) = 0;
+ load(const std::string &filename) = 0;
+
+ /**
+ * @copydoc load()
+ *
+ * @deprecated The autopartition parameter has been removed.
+ */
+ DEAL_II_DEPRECATED_EARLY
+ virtual void
+ load(const std::string &filename, const bool autopartition) = 0;
/**
* Register a function that can be used to attach data of fixed size
template <int dim, int spacedim>
void
- Triangulation<dim, spacedim>::load(const std::string &filename,
- const bool autopartition)
+ Triangulation<dim, spacedim>::load(const std::string &filename)
{
#ifdef DEAL_II_WITH_MPI
- AssertThrow(
- autopartition == false,
- ExcMessage(
- "load() only works if run with the same number of MPI processes used for saving the triangulation, hence autopartition is disabled."));
-
Assert(this->n_cells() == 0,
ExcMessage("load() only works if the Triangulation is empty!"));
this->update_number_cache();
#else
(void)filename;
- (void)autopartition;
AssertThrow(false, ExcNeedsMPI());
#endif
+ template <int dim, int spacedim>
+ void
+ Triangulation<dim, spacedim>::load(const std::string &filename,
+ const bool autopartition)
+ {
+ (void)autopartition;
+ load(filename);
+ }
+
+
+
template <int dim, int spacedim>
void
Triangulation<dim, spacedim>::update_number_cache()
template <int dim, int spacedim>
void
- Triangulation<dim, spacedim>::load(const std::string &filename,
- const bool autopartition)
+ Triangulation<dim, spacedim>::load(const std::string &filename)
{
Assert(
this->n_cells() > 0,
this->mpi_communicator,
0,
0,
- static_cast<int>(autopartition),
+ 1,
0,
this,
&connectivity);
- if (numcpus != Utilities::MPI::n_mpi_processes(this->mpi_communicator))
- {
- // We are changing the number of CPUs so we need to repartition.
- // Note that p4est actually distributes the cells between the changed
- // number of CPUs and so everything works without this call, but
- // this command changes the distribution for some reason, so we
- // will leave it in here.
- dealii::internal::p4est::functions<dim>::partition(
- parallel_forest,
- /* prepare coarsening */ 1,
- /* weight_callback */ nullptr);
- }
+ // We partition the p4est mesh that it conforms to the requirements of the
+ // deal.II mesh, i.e., partition for coarsening.
+ // This function call is optional.
+ dealii::internal::p4est::functions<dim>::partition(
+ parallel_forest,
+ /* prepare coarsening */ 1,
+ /* weight_callback */ nullptr);
try
{
+ template <int dim, int spacedim>
+ void
+ Triangulation<dim, spacedim>::load(const std::string &filename,
+ const bool autopartition)
+ {
+ (void)autopartition;
+ load(filename);
+ }
+
+
+
template <int dim, int spacedim>
void
Triangulation<dim, spacedim>::load(
+ template <int spacedim>
+ void
+ Triangulation<1, spacedim>::load(const std::string &)
+ {
+ Assert(false, ExcNotImplemented());
+ }
+
+
+
template <int spacedim>
void
Triangulation<1, spacedim>::load(const std::string &, const bool)
DEAL:0:2d::reading
DEAL:0:2d::cellid=0_1:0 parentid=0
DEAL:0:2d::cellid=0_1:1 parentid=0
+DEAL:0:2d::cellid=0_1:2 parentid=0
+DEAL:0:2d::cellid=0_1:3 parentid=0
DEAL:0:2d::OK
DEAL:0:3d::writing
DEAL:0:3d::cellid=0_1:0 parentid=0
DEAL:1:2d::writing
DEAL:1:2d::reading
-DEAL:1:2d::cellid=0_1:2 parentid=0
-DEAL:1:2d::cellid=0_1:3 parentid=0
DEAL:1:2d::OK
DEAL:1:3d::writing
DEAL:1:3d::cellid=1_1:0 parentid=1
DEAL:2:2d::reading
DEAL:2:2d::cellid=1_1:0 parentid=1
DEAL:2:2d::cellid=1_1:1 parentid=1
+DEAL:2:2d::cellid=1_1:2 parentid=1
+DEAL:2:2d::cellid=1_1:3 parentid=1
DEAL:2:2d::OK
DEAL:2:3d::writing
DEAL:2:3d::cellid=2_1:0 parentid=2
DEAL:3:2d::writing
DEAL:3:2d::reading
-DEAL:3:2d::cellid=1_1:2 parentid=1
-DEAL:3:2d::cellid=1_1:3 parentid=1
DEAL:3:2d::OK
DEAL:3:3d::writing
DEAL:3:3d::cellid=3_1:0 parentid=3
DEAL:4:2d::reading
DEAL:4:2d::cellid=2_1:0 parentid=2
DEAL:4:2d::cellid=2_1:1 parentid=2
+DEAL:4:2d::cellid=2_1:2 parentid=2
+DEAL:4:2d::cellid=2_1:3 parentid=2
DEAL:4:2d::OK
DEAL:4:3d::writing
DEAL:4:3d::cellid=4_1:0 parentid=4
DEAL:5:2d::writing
DEAL:5:2d::reading
-DEAL:5:2d::cellid=2_1:2 parentid=2
-DEAL:5:2d::cellid=2_1:3 parentid=2
DEAL:5:2d::OK
DEAL:5:3d::writing
DEAL:5:3d::cellid=5_1:0 parentid=5
DEAL:6:2d::reading
DEAL:6:2d::cellid=3_1:0 parentid=3
DEAL:6:2d::cellid=3_1:1 parentid=3
+DEAL:6:2d::cellid=3_1:2 parentid=3
+DEAL:6:2d::cellid=3_1:3 parentid=3
DEAL:6:2d::OK
DEAL:6:3d::writing
DEAL:6:3d::cellid=6_1:0 parentid=6
DEAL:7:2d::writing
DEAL:7:2d::reading
-DEAL:7:2d::cellid=3_1:2 parentid=3
-DEAL:7:2d::cellid=3_1:3 parentid=3
DEAL:7:2d::OK
DEAL:7:3d::writing
DEAL:7:3d::cellid=7_1:0 parentid=7
DEAL:0:2d::reading
DEAL:0:2d::cellid=0_1:0 fe_index=0
DEAL:0:2d::cellid=0_1:1 fe_index=1
-DEAL:0:2d::cellid=0_1:2 fe_index=2 ghost
-DEAL:0:2d::cellid=0_1:3 fe_index=3 ghost
+DEAL:0:2d::cellid=0_1:2 fe_index=2
+DEAL:0:2d::cellid=0_1:3 fe_index=3
DEAL:0:2d::cellid=1_1:0 fe_index=0 ghost
DEAL:0:2d::cellid=1_1:2 fe_index=2 ghost
+DEAL:0:2d::cellid=2_1:0 fe_index=0 ghost
+DEAL:0:2d::cellid=2_1:1 fe_index=1 ghost
+DEAL:0:2d::cellid=3_1:0 fe_index=0 ghost
DEAL:0:2d::OK
DEAL:0:3d::writing
DEAL:0:3d::cellid=0_1:0 fe_index=0
DEAL:1:2d::writing
DEAL:1:2d::reading
-DEAL:1:2d::cellid=0_1:0 fe_index=0 ghost
-DEAL:1:2d::cellid=0_1:1 fe_index=1 ghost
-DEAL:1:2d::cellid=0_1:2 fe_index=2
-DEAL:1:2d::cellid=0_1:3 fe_index=3
-DEAL:1:2d::cellid=1_1:0 fe_index=0 ghost
-DEAL:1:2d::cellid=1_1:2 fe_index=2 ghost
-DEAL:1:2d::cellid=2_1:0 fe_index=0 ghost
-DEAL:1:2d::cellid=2_1:1 fe_index=1 ghost
-DEAL:1:2d::cellid=3_1:0 fe_index=0 ghost
DEAL:1:2d::OK
DEAL:1:3d::writing
DEAL:1:3d::cellid=1_1:0 fe_index=0
DEAL:2:2d::cellid=0_1:3 fe_index=3 ghost
DEAL:2:2d::cellid=1_1:0 fe_index=0
DEAL:2:2d::cellid=1_1:1 fe_index=1
-DEAL:2:2d::cellid=1_1:2 fe_index=2 ghost
-DEAL:2:2d::cellid=1_1:3 fe_index=3 ghost
+DEAL:2:2d::cellid=1_1:2 fe_index=2
+DEAL:2:2d::cellid=1_1:3 fe_index=3
+DEAL:2:2d::cellid=2_1:1 fe_index=1 ghost
+DEAL:2:2d::cellid=3_1:0 fe_index=0 ghost
+DEAL:2:2d::cellid=3_1:1 fe_index=1 ghost
DEAL:2:2d::OK
DEAL:2:3d::writing
DEAL:2:3d::cellid=2_1:0 fe_index=0
DEAL:3:2d::writing
DEAL:3:2d::reading
-DEAL:3:2d::cellid=0_1:1 fe_index=1 ghost
-DEAL:3:2d::cellid=0_1:3 fe_index=3 ghost
-DEAL:3:2d::cellid=1_1:0 fe_index=0 ghost
-DEAL:3:2d::cellid=1_1:1 fe_index=1 ghost
-DEAL:3:2d::cellid=1_1:2 fe_index=2
-DEAL:3:2d::cellid=1_1:3 fe_index=3
-DEAL:3:2d::cellid=2_1:1 fe_index=1 ghost
-DEAL:3:2d::cellid=3_1:0 fe_index=0 ghost
-DEAL:3:2d::cellid=3_1:1 fe_index=1 ghost
DEAL:3:2d::OK
DEAL:3:3d::writing
DEAL:3:3d::cellid=3_1:0 fe_index=0
DEAL:4:2d::cellid=1_1:2 fe_index=2 ghost
DEAL:4:2d::cellid=2_1:0 fe_index=0
DEAL:4:2d::cellid=2_1:1 fe_index=1
-DEAL:4:2d::cellid=2_1:2 fe_index=2 ghost
-DEAL:4:2d::cellid=2_1:3 fe_index=3 ghost
+DEAL:4:2d::cellid=2_1:2 fe_index=2
+DEAL:4:2d::cellid=2_1:3 fe_index=3
DEAL:4:2d::cellid=3_1:0 fe_index=0 ghost
DEAL:4:2d::cellid=3_1:2 fe_index=2 ghost
DEAL:4:2d::OK
DEAL:5:2d::writing
DEAL:5:2d::reading
-DEAL:5:2d::cellid=2_1:0 fe_index=0 ghost
-DEAL:5:2d::cellid=2_1:1 fe_index=1 ghost
-DEAL:5:2d::cellid=2_1:2 fe_index=2
-DEAL:5:2d::cellid=2_1:3 fe_index=3
-DEAL:5:2d::cellid=3_1:0 fe_index=0 ghost
-DEAL:5:2d::cellid=3_1:2 fe_index=2 ghost
DEAL:5:2d::OK
DEAL:5:3d::writing
DEAL:5:3d::cellid=5_1:0 fe_index=0
DEAL:6:2d::cellid=2_1:3 fe_index=3 ghost
DEAL:6:2d::cellid=3_1:0 fe_index=0
DEAL:6:2d::cellid=3_1:1 fe_index=1
-DEAL:6:2d::cellid=3_1:2 fe_index=2 ghost
-DEAL:6:2d::cellid=3_1:3 fe_index=3 ghost
+DEAL:6:2d::cellid=3_1:2 fe_index=2
+DEAL:6:2d::cellid=3_1:3 fe_index=3
DEAL:6:2d::OK
DEAL:6:3d::writing
DEAL:6:3d::cellid=6_1:0 fe_index=0
DEAL:7:2d::writing
DEAL:7:2d::reading
-DEAL:7:2d::cellid=2_1:1 fe_index=1 ghost
-DEAL:7:2d::cellid=2_1:3 fe_index=3 ghost
-DEAL:7:2d::cellid=3_1:0 fe_index=0 ghost
-DEAL:7:2d::cellid=3_1:1 fe_index=1 ghost
-DEAL:7:2d::cellid=3_1:2 fe_index=2
-DEAL:7:2d::cellid=3_1:3 fe_index=3
DEAL:7:2d::OK
DEAL:7:3d::writing
DEAL:7:3d::cellid=7_1:0 fe_index=0