#include <fstream>
+template <class TRIA>
+void check (TRIA & tr)
+{
+ typename TRIA::cell_iterator cell = tr.begin(),
+ endc = tr.end();
+
+ for (; cell!=endc; ++cell)
+ {
+ deallog << "cell level=" << cell->level() << " index=" << cell->index();
+ if (!cell->has_children())
+ deallog << " subdomain: " << cell->subdomain_id();
+ deallog << std::endl;
+ }
+
+ deallog << "OK" << std::endl;
+}
+
template<int dim>
void test()
deallog << "Checksum: "
<< checksum
<< std::endl;
- }
+
+ check(tr);
+ }
+
if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
int main(int argc, char *argv[])
{
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
+ MPILogInitAll log(__FILE__);
- unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
-
-
- deallog.push(Utilities::int_to_string(myid));
-
- if (myid == 0)
- {
- std::ofstream logfile(output_file_for_mpi("p4est_2d_refine_02").c_str());
- deallog.attach(logfile);
- deallog.depth_console(0);
- deallog.threshold_double(1.e-10);
-
- deallog.push("2d");
- test<2>();
- deallog.pop();
- }
- else
- test<2>();
+ deallog.push("2d");
+ test<2>();
+ deallog.pop();
}
DEAL:0:2d::hyper_cube
DEAL:0:2d::#cells = 7
DEAL:0:2d::Checksum: 426967244
+DEAL:0:2d::cell level=0 index=0 subdomain: 4294967294
DEAL:0:2d::OK
+DEAL:0:2d::OK
+
+DEAL:1:2d::Checksum: 0
+DEAL:1:2d::cell level=0 index=0
+DEAL:1:2d::cell level=1 index=0
+DEAL:1:2d::cell level=1 index=1 subdomain: 7
+DEAL:1:2d::cell level=1 index=2 subdomain: 8
+DEAL:1:2d::cell level=1 index=3 subdomain: 9
+DEAL:1:2d::cell level=2 index=0 subdomain: 1
+DEAL:1:2d::cell level=2 index=1 subdomain: 1
+DEAL:1:2d::cell level=2 index=2 subdomain: 1
+DEAL:1:2d::cell level=2 index=3 subdomain: 1
+DEAL:1:2d::OK
+
+
+DEAL:2:2d::Checksum: 0
+DEAL:2:2d::cell level=0 index=0 subdomain: 4294967294
+DEAL:2:2d::OK
+
+
+DEAL:3:2d::Checksum: 0
+DEAL:3:2d::cell level=0 index=0 subdomain: 4294967294
+DEAL:3:2d::OK
+
+
+DEAL:4:2d::Checksum: 0
+DEAL:4:2d::cell level=0 index=0 subdomain: 4294967294
+DEAL:4:2d::OK
+
+
+DEAL:5:2d::Checksum: 0
+DEAL:5:2d::cell level=0 index=0 subdomain: 4294967294
+DEAL:5:2d::OK
+
+
+DEAL:6:2d::Checksum: 0
+DEAL:6:2d::cell level=0 index=0 subdomain: 4294967294
+DEAL:6:2d::OK
+
+
+DEAL:7:2d::Checksum: 0
+DEAL:7:2d::cell level=0 index=0
+DEAL:7:2d::cell level=1 index=0
+DEAL:7:2d::cell level=1 index=1 subdomain: 7
+DEAL:7:2d::cell level=1 index=2 subdomain: 8
+DEAL:7:2d::cell level=1 index=3 subdomain: 9
+DEAL:7:2d::cell level=2 index=0 subdomain: 4294967294
+DEAL:7:2d::cell level=2 index=1 subdomain: 1
+DEAL:7:2d::cell level=2 index=2 subdomain: 4294967294
+DEAL:7:2d::cell level=2 index=3 subdomain: 1
+DEAL:7:2d::OK
+
+
+DEAL:8:2d::Checksum: 0
+DEAL:8:2d::cell level=0 index=0
+DEAL:8:2d::cell level=1 index=0
+DEAL:8:2d::cell level=1 index=1 subdomain: 7
+DEAL:8:2d::cell level=1 index=2 subdomain: 8
+DEAL:8:2d::cell level=1 index=3 subdomain: 9
+DEAL:8:2d::cell level=2 index=0 subdomain: 4294967294
+DEAL:8:2d::cell level=2 index=1 subdomain: 4294967294
+DEAL:8:2d::cell level=2 index=2 subdomain: 1
+DEAL:8:2d::cell level=2 index=3 subdomain: 1
+DEAL:8:2d::OK
+
+
+DEAL:9:2d::Checksum: 0
+DEAL:9:2d::cell level=0 index=0
+DEAL:9:2d::cell level=1 index=0
+DEAL:9:2d::cell level=1 index=1 subdomain: 7
+DEAL:9:2d::cell level=1 index=2 subdomain: 8
+DEAL:9:2d::cell level=1 index=3 subdomain: 9
+DEAL:9:2d::cell level=2 index=0 subdomain: 4294967294
+DEAL:9:2d::cell level=2 index=1 subdomain: 4294967294
+DEAL:9:2d::cell level=2 index=2 subdomain: 4294967294
+DEAL:9:2d::cell level=2 index=3 subdomain: 1
+DEAL:9:2d::OK
+
DEAL:0:2d::hyper_cube
DEAL:0:2d::#cells = 7
DEAL:0:2d::Checksum: 426967244
+DEAL:0:2d::cell level=0 index=0 subdomain: 4294967294
DEAL:0:2d::OK
+DEAL:0:2d::OK
+
+DEAL:1:2d::Checksum: 0
+DEAL:1:2d::cell level=0 index=0
+DEAL:1:2d::cell level=1 index=0
+DEAL:1:2d::cell level=1 index=1 subdomain: 2
+DEAL:1:2d::cell level=1 index=2 subdomain: 3
+DEAL:1:2d::cell level=1 index=3 subdomain: 3
+DEAL:1:2d::cell level=2 index=0 subdomain: 1
+DEAL:1:2d::cell level=2 index=1 subdomain: 1
+DEAL:1:2d::cell level=2 index=2 subdomain: 1
+DEAL:1:2d::cell level=2 index=3 subdomain: 1
+DEAL:1:2d::OK
+
+
+DEAL:2:2d::Checksum: 0
+DEAL:2:2d::cell level=0 index=0
+DEAL:2:2d::cell level=1 index=0
+DEAL:2:2d::cell level=1 index=1 subdomain: 2
+DEAL:2:2d::cell level=1 index=2 subdomain: 3
+DEAL:2:2d::cell level=1 index=3 subdomain: 3
+DEAL:2:2d::cell level=2 index=0 subdomain: 4294967294
+DEAL:2:2d::cell level=2 index=1 subdomain: 1
+DEAL:2:2d::cell level=2 index=2 subdomain: 4294967294
+DEAL:2:2d::cell level=2 index=3 subdomain: 1
+DEAL:2:2d::OK
+
+
+DEAL:3:2d::Checksum: 0
+DEAL:3:2d::cell level=0 index=0
+DEAL:3:2d::cell level=1 index=0
+DEAL:3:2d::cell level=1 index=1 subdomain: 2
+DEAL:3:2d::cell level=1 index=2 subdomain: 3
+DEAL:3:2d::cell level=1 index=3 subdomain: 3
+DEAL:3:2d::cell level=2 index=0 subdomain: 4294967294
+DEAL:3:2d::cell level=2 index=1 subdomain: 4294967294
+DEAL:3:2d::cell level=2 index=2 subdomain: 1
+DEAL:3:2d::cell level=2 index=3 subdomain: 1
+DEAL:3:2d::OK
+