}
}
-void run (const Triangulation<2>& tr, unsigned int degree)
+void run2d (unsigned int degree)
{
std::ostringstream prefix;
prefix << "d2-p" << degree;
FESystem<2> fe(h1,1,hdiv,1,l2,1);
- test_cochain(tr, fe);
+ if (true)
+ {
+ Triangulation<2> tr;
+ TestGrids::hypercube(tr, 1);
+ test_cochain(tr, fe);
+ }
+
+ if (true)
+ {
+ Triangulation<2> tr;
+ TestGrids::hypercube(tr, 2, true);
+ test_cochain(tr, fe);
+ }
+
+ if (true)
+ {
+ Triangulation<2> tr;
+ TestGrids::hypercube(tr, 3, true);
+ test_cochain(tr, fe);
+ }
+
deallog.pop();
}
-void run (const Triangulation<3>& tr, unsigned int degree)
+void run3d (unsigned int degree)
{
std::ostringstream prefix;
prefix << "d3-p" << degree;
FESystem<3> fe(h1,1,hcurl,1,hdiv,1,l2,1);
- test_cochain(tr, fe);
- deallog.pop();
+ if (true)
+ {
+ Triangulation<3> tr;
+ TestGrids::hypercube(tr, 1);
+ test_cochain(tr, fe);
+ }
+
+ if (true)
+ {
+ Triangulation<3> tr(Triangulation<3>::limit_level_difference_at_vertices);
+ TestGrids::hypercube(tr, 2, true);
+ test_cochain(tr, fe);
+ }
+deallog.pop();
}
const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
std::ofstream logfile(logname.c_str());
deallog.attach(logfile);
-// deallog.depth_console(0);
-// deallog.threshold_double(1.e-10);
-
- Triangulation<2> tr2;
- TestGrids::hypercube(tr2, 1);
- run(tr2, 0);
- run(tr2, 1);
- run(tr2, 2);
+ if (!debugging)
+ {
+ deallog.depth_console(0);
+ deallog.threshold_double(1.e-10);
+ }
+
+ run2d(0);
+ run2d(1);
+ run2d(2);
- Triangulation<3> tr3;
- TestGrids::hypercube(tr3, 1);
- run(tr3, 0);
- run(tr3, 1);
+ run3d(0);
+ run3d(1);
}
--- /dev/null
+
+DEAL:d2-p0::Setup
+DEAL:d2-p0::Triangulation hypercube 2D refinement 1 steps 4 active cells 5 total cells
+DEAL:d2-p0::Form 0
+DEAL:d2-p0::Difference d*d 0
+DEAL:d2-p0::Form 1
+DEAL:d2-p0::d^2 0
+DEAL:d2-p0::d*d^2 0
+DEAL:d2-p0::Difference d*d 0
+DEAL:d2-p0::Triangulation hypercube 2D refinement 2 local steps 7 active cells 9 total cells
+DEAL:d2-p0::Form 0
+DEAL:d2-p0::Difference d*d 0
+DEAL:d2-p0::Form 1
+DEAL:d2-p0::d^2 0
+DEAL:d2-p0::d*d^2 0
+DEAL:d2-p0::Difference d*d 0
+DEAL:d2-p0::Triangulation hypercube 2D refinement 3 local steps 25 active cells 33 total cells
+DEAL:d2-p0::Form 0
+DEAL:d2-p0::Difference d*d 0
+DEAL:d2-p0::Form 1
+DEAL:d2-p0::d^2 0
+DEAL:d2-p0::d*d^2 0
+DEAL:d2-p0::Difference d*d 0
+DEAL:d2-p1::Setup
+DEAL:d2-p1::Triangulation hypercube 2D refinement 1 steps 4 active cells 5 total cells
+DEAL:d2-p1::Form 0
+DEAL:d2-p1::Difference d*d 0
+DEAL:d2-p1::Form 1
+DEAL:d2-p1::d^2 0
+DEAL:d2-p1::d*d^2 0
+DEAL:d2-p1::Difference d*d 0
+DEAL:d2-p1::Triangulation hypercube 2D refinement 2 local steps 7 active cells 9 total cells
+DEAL:d2-p1::Form 0
+DEAL:d2-p1::Difference d*d 0
+DEAL:d2-p1::Form 1
+DEAL:d2-p1::d^2 0
+DEAL:d2-p1::d*d^2 0
+DEAL:d2-p1::Difference d*d 0
+DEAL:d2-p1::Triangulation hypercube 2D refinement 3 local steps 25 active cells 33 total cells
+DEAL:d2-p1::Form 0
+DEAL:d2-p1::Difference d*d 0
+DEAL:d2-p1::Form 1
+DEAL:d2-p1::d^2 0
+DEAL:d2-p1::d*d^2 0
+DEAL:d2-p1::Difference d*d 0
+DEAL:d2-p2::Setup
+DEAL:d2-p2::Triangulation hypercube 2D refinement 1 steps 4 active cells 5 total cells
+DEAL:d2-p2::Form 0
+DEAL:d2-p2::Difference d*d 0
+DEAL:d2-p2::Form 1
+DEAL:d2-p2::d^2 0
+DEAL:d2-p2::d*d^2 0
+DEAL:d2-p2::Difference d*d 0
+DEAL:d2-p2::Triangulation hypercube 2D refinement 2 local steps 7 active cells 9 total cells
+DEAL:d2-p2::Form 0
+DEAL:d2-p2::Difference d*d 0
+DEAL:d2-p2::Form 1
+DEAL:d2-p2::d^2 0
+DEAL:d2-p2::d*d^2 0
+DEAL:d2-p2::Difference d*d 0
+DEAL:d2-p2::Triangulation hypercube 2D refinement 3 local steps 25 active cells 33 total cells
+DEAL:d2-p2::Form 0
+DEAL:d2-p2::Difference d*d 0
+DEAL:d2-p2::Form 1
+DEAL:d2-p2::d^2 0
+DEAL:d2-p2::d*d^2 0
+DEAL:d2-p2::Difference d*d 0
+DEAL:d3-p0::Setup
+DEAL:d3-p0::Triangulation hypercube 3D refinement 1 steps 8 active cells 9 total cells
+DEAL:d3-p0::Form 0
+DEAL:d3-p0::Difference d*d 0
+DEAL:d3-p0::Form 1
+DEAL:d3-p0::d^2 0
+DEAL:d3-p0::d*d^2 0
+DEAL:d3-p0::Difference d*d 0
+DEAL:d3-p0::Form 2
+DEAL:d3-p0::d^2 0
+DEAL:d3-p0::d*d^2 0
+DEAL:d3-p0::Difference d*d 0
+DEAL:d3-p1::Setup
+DEAL:d3-p1::Triangulation hypercube 3D refinement 1 steps 8 active cells 9 total cells
+DEAL:d3-p1::Form 0
+DEAL:d3-p1::Difference d*d 0
+DEAL:d3-p1::Form 1
+DEAL:d3-p1::d^2 0
+DEAL:d3-p1::d*d^2 0
+DEAL:d3-p1::Difference d*d 0
+DEAL:d3-p1::Form 2
+DEAL:d3-p1::d^2 0
+DEAL:d3-p1::d*d^2 0
+DEAL:d3-p1::Difference d*d 0
unsigned int refinement = 0,
bool local = false)
{
- GridGenerator::hyper_cube(tr);
+ GridGenerator::hyper_cube(tr, -1., 1.);
if (refinement && !local)
tr.refine_global(refinement);
if (refinement && local)
bool negative = true;
for (unsigned int d=0;d<dim;++d)
if (p(d) >= 0.)negative = false;
+ if (negative)
+ cell->set_refine_flag();
}
tr.execute_coarsening_and_refinement();
}