]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reindent files according to our usual style.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 14 Jul 2014 22:59:39 +0000 (22:59 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 14 Jul 2014 22:59:39 +0000 (22:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@33176 0785d39b-7218-0410-832d-ea1e28bc413d

tests/manifold/manifold_id_01.cc
tests/manifold/manifold_id_02.cc
tests/manifold/manifold_id_03.cc
tests/manifold/manifold_id_04.cc
tests/manifold/manifold_id_05.cc
tests/manifold/manifold_id_06.cc
tests/manifold/manifold_id_07.cc

index 12b4fb9a05b9398848bbbbbb3d90c18db6b31420..257f7ef0640878ab4312abfa3e8684d6852b12f2 100644 (file)
 
 // Helper function
 template <int dim, int spacedim>
-void test(unsigned int ref=1){
+void test(unsigned int ref=1)
+{
   deallog << "Testing dim=" << dim
-         << ", spacedim="<< spacedim << std::endl;
-  
+          << ", spacedim="<< spacedim << std::endl;
+
   Triangulation<dim,spacedim> tria;
   GridGenerator::hyper_cube (tria);
 
   typename Triangulation<dim,spacedim>::active_cell_iterator cell;
-       
+
   tria.refine_global(ref);
 
-  for(cell = tria.begin_active(); cell != tria.end(); ++cell) {
-    deallog << "C: " << cell 
-           << ", mid: " << (int)cell->manifold_id() << std::endl;
-         for(unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
-      deallog << "f: " << cell->face(f) 
-             << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
-          
-  }
+  for (cell = tria.begin_active(); cell != tria.end(); ++cell)
+    {
+      deallog << "C: " << cell
+              << ", mid: " << (int)cell->manifold_id() << std::endl;
+      for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+        deallog << "f: " << cell->face(f)
+                << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
+
+    }
 }
 
-int main () 
+int main ()
 {
   std::ofstream logfile("output");
   deallog.attach(logfile);
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
-  
+
   test<1,1>();
   test<1,2>();
   test<2,2>();
@@ -63,4 +65,4 @@ int main ()
 
   return 0;
 }
-                  
+
index 71fe3d375a2e34d002b7e0dff273d92411b229a1..77fbdccdec79e59d9215360422f6d36c7b530fd1 100644 (file)
 
 // Helper function
 template <int dim, int spacedim>
-void test(unsigned int ref=1){
+void test(unsigned int ref=1)
+{
   deallog << "Testing dim=" << dim
-         << ", spacedim="<< spacedim << std::endl;
-  
+          << ", spacedim="<< spacedim << std::endl;
+
   Triangulation<dim,spacedim> tria;
   GridGenerator::hyper_cube (tria);
   Point<spacedim> center;
-  for(unsigned int i=0;i<dim;++i)
+  for (unsigned int i=0; i<dim; ++i)
     center[i] = .25;
 
-                                  // const HyperBallBoundary<dim,spacedim> boundary(center,center.norm());
-                                  // triangulation.set_boundary (0, boundary_description);
+  // const HyperBallBoundary<dim,spacedim> boundary(center,center.norm());
+  // triangulation.set_boundary (0, boundary_description);
 
   typename Triangulation<dim,spacedim>::active_cell_iterator cell;
-       
+
   tria.begin_active()->set_all_manifold_ids(1);
   tria.refine_global(ref);
 
-  for(cell = tria.begin_active(); cell != tria.end(); ++cell) {
-    deallog << "C: " << cell 
-           << ", mid: " << (int)cell->manifold_id() << std::endl;
-    for(unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
-      deallog << "f: " << cell->face(f) 
-             << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
-  }
-  
+  for (cell = tria.begin_active(); cell != tria.end(); ++cell)
+    {
+      deallog << "C: " << cell
+              << ", mid: " << (int)cell->manifold_id() << std::endl;
+      for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+        deallog << "f: " << cell->face(f)
+                << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
+    }
+
 }
 
-int main () 
+int main ()
 {
   std::ofstream logfile("output");
   deallog.attach(logfile);
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
-  
+
   test<1,1>();
   test<1,2>();
   test<2,2>();
@@ -71,4 +73,4 @@ int main ()
 
   return 0;
 }
-                  
+
index e5109da0653f47ac3404b6de8fdd9acb9d6ddb46..e0384602bbb4cfaf674482ae591ff4ce4dee2a24 100644 (file)
 
 // Helper function
 template <int dim, int spacedim>
-void test(unsigned int ref=1){
-       deallog << "Testing dim=" << dim
-       << ", spacedim="<< spacedim << std::endl;
-
-       Triangulation<dim,spacedim> tria;
-       GridGenerator::hyper_cube (tria);
-       Point<spacedim> center;
-       
-       typename Triangulation<dim,spacedim>::active_cell_iterator cell;
-       
-       
-       tria.begin_active()->set_manifold_id(1);
-       
-       tria.refine_global(1);
-       
-       for(cell = tria.begin_active(); cell != tria.end(); ++cell) {
-               deallog << "C: " << cell 
-           << ", mid: " << (int)cell->manifold_id() << std::endl;
-               for(unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
-                       deallog << "f: " << cell->face(f) 
-                       << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
-       }
-       
+void test(unsigned int ref=1)
+{
+  deallog << "Testing dim=" << dim
+          << ", spacedim="<< spacedim << std::endl;
+
+  Triangulation<dim,spacedim> tria;
+  GridGenerator::hyper_cube (tria);
+  Point<spacedim> center;
+
+  typename Triangulation<dim,spacedim>::active_cell_iterator cell;
+
+
+  tria.begin_active()->set_manifold_id(1);
+
+  tria.refine_global(1);
+
+  for (cell = tria.begin_active(); cell != tria.end(); ++cell)
+    {
+      deallog << "C: " << cell
+              << ", mid: " << (int)cell->manifold_id() << std::endl;
+      for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+        deallog << "f: " << cell->face(f)
+                << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
+    }
+
 }
 
-int main () 
+int main ()
 {
-       std::ofstream logfile("output");
-       deallog.attach(logfile);
-       deallog.depth_console(0);
-       deallog.threshold_double(1.e-10);
-       
-       test<1,1>();
-       test<1,2>();
-       test<2,2>();
-       test<2,3>();
-       test<3,3>();
-       
-       return 0;
+  std::ofstream logfile("output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test<1,1>();
+  test<1,2>();
+  test<2,2>();
+  test<2,3>();
+  test<3,3>();
+
+  return 0;
 }
 
index 57583a33d62e6648f3d5ede2ed198fac6c0bb4fe..608421ecafc17c2735fa556609ac02756d871ef6 100644 (file)
 
 // Helper function
 template <int dim, int spacedim>
-void test(unsigned int ref=1){
-       deallog << "Testing dim=" << dim
-       << ", spacedim="<< spacedim << std::endl;
-
-       Triangulation<dim,spacedim> tria;
-       GridGenerator::hyper_cube (tria);
-       Point<spacedim> center;
-       
-       typename Triangulation<dim,spacedim>::active_cell_iterator cell;
-       
-       
-       tria.begin_active()->set_manifold_id(3);
-       for(unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
-               tria.begin_active()->face(f)->set_manifold_id(2);
-
-       tria.refine_global(1);
-       
-       for(cell = tria.begin_active(); cell != tria.end(); ++cell) {
-               deallog << "C: " << cell 
-           << ", mid: " << (int)cell->manifold_id() << std::endl;
-               for(unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
-                       deallog << "f: " << cell->face(f) 
-                       << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
-       }
-       
+void test(unsigned int ref=1)
+{
+  deallog << "Testing dim=" << dim
+          << ", spacedim="<< spacedim << std::endl;
+
+  Triangulation<dim,spacedim> tria;
+  GridGenerator::hyper_cube (tria);
+  Point<spacedim> center;
+
+  typename Triangulation<dim,spacedim>::active_cell_iterator cell;
+
+
+  tria.begin_active()->set_manifold_id(3);
+  for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+    tria.begin_active()->face(f)->set_manifold_id(2);
+
+  tria.refine_global(1);
+
+  for (cell = tria.begin_active(); cell != tria.end(); ++cell)
+    {
+      deallog << "C: " << cell
+              << ", mid: " << (int)cell->manifold_id() << std::endl;
+      for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+        deallog << "f: " << cell->face(f)
+                << ", mid: " << (int)cell->face(f)->manifold_id() << std::endl;
+    }
+
 }
 
-int main () 
+int main ()
 {
-       std::ofstream logfile("output");
-       deallog.attach(logfile);
-       deallog.depth_console(1);
-       deallog.threshold_double(1.e-10);
-       
-       test<1,1>();
-       test<1,2>();
-       test<2,2>();
-       test<2,3>();
-       test<3,3>();
-       
-       return 0;
+  std::ofstream logfile("output");
+  deallog.attach(logfile);
+  deallog.depth_console(1);
+  deallog.threshold_double(1.e-10);
+
+  test<1,1>();
+  test<1,2>();
+  test<2,2>();
+  test<2,3>();
+  test<3,3>();
+
+  return 0;
 }
 
index 5a4ca3e063aeb7586c89160270fafa38f1d0bcc1..b191e64673925579232ebe5f839e69b0052ec45e 100644 (file)
 
 // Helper function
 template <int dim, int spacedim>
-void test(unsigned int ref=1){
-       deallog << "Testing dim=" << dim
-       << ", spacedim="<< spacedim << std::endl;
-
-       Point<spacedim> center;
-       for(unsigned int i=0; i<dim; ++i)
-         center[i] = .5;
-
-       HyperBallBoundary<dim,spacedim> boundary(center, .5*std::sqrt((double)dim));
-       Triangulation<dim,spacedim> tria;
-       GridGenerator::hyper_cube (tria);
-       typename Triangulation<dim,spacedim>::active_cell_iterator cell;
-       
-       tria.begin_active()->face(0)->set_manifold_id(1);
-       tria.set_manifold(1,boundary);
-       
-       tria.refine_global(2);
-
-       for(cell=tria.begin_active(); cell!=tria.end(); ++cell)
-         {
-           deallog << "C: " << cell << std::endl;
-           for(unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell;++f)
-             deallog << "F: " << cell->face(f) << ", mid: " 
-                     << (int) cell->face(f)->manifold_id() << std::endl;
-         }
-       
-
-       GridOut gridout;
-       gridout.write_msh(tria, deallog.get_file_stream());
-       char fname[30];
-       sprintf(fname, "/tmp/id_5_mesh_%d_%d.msh",
-               dim, spacedim);
-       std::ofstream ofile(fname);
-       gridout.write_msh(tria,ofile);
+void test(unsigned int ref=1)
+{
+  deallog << "Testing dim=" << dim
+          << ", spacedim="<< spacedim << std::endl;
+
+  Point<spacedim> center;
+  for (unsigned int i=0; i<dim; ++i)
+    center[i] = .5;
+
+  HyperBallBoundary<dim,spacedim> boundary(center, .5*std::sqrt((double)dim));
+  Triangulation<dim,spacedim> tria;
+  GridGenerator::hyper_cube (tria);
+  typename Triangulation<dim,spacedim>::active_cell_iterator cell;
+
+  tria.begin_active()->face(0)->set_manifold_id(1);
+  tria.set_manifold(1,boundary);
+
+  tria.refine_global(2);
+
+  for (cell=tria.begin_active(); cell!=tria.end(); ++cell)
+    {
+      deallog << "C: " << cell << std::endl;
+      for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+        deallog << "F: " << cell->face(f) << ", mid: "
+                << (int) cell->face(f)->manifold_id() << std::endl;
+    }
+
+
+  GridOut gridout;
+  gridout.write_msh(tria, deallog.get_file_stream());
+  char fname[30];
+  sprintf(fname, "/tmp/id_5_mesh_%d_%d.msh",
+          dim, spacedim);
+  std::ofstream ofile(fname);
+  gridout.write_msh(tria,ofile);
 }
 
-int main () 
+int main ()
 {
-       std::ofstream logfile("output");
-       deallog.attach(logfile);
-       deallog.depth_console(0);
-       deallog.threshold_double(1.e-10);
-       
-       test<1,1>();
-       test<1,2>();
-       test<2,2>();
-       test<2,3>();
-       test<3,3>();
-       
-       return 0;
+  std::ofstream logfile("output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test<1,1>();
+  test<1,2>();
+  test<2,2>();
+  test<2,3>();
+  test<3,3>();
+
+  return 0;
 }
 
index 442a291da0d342952c73041d9458a89dad7548cb..e6d7c70af429f788d71418431e5d2a356e1e57c2 100644 (file)
 
 // Helper function
 template <int dim, int spacedim>
-void test(unsigned int ref=1){
-       deallog << "Testing dim=" << dim
-       << ", spacedim="<< spacedim << std::endl;
-
-       Point<spacedim> center;
-       for(unsigned int i=0; i<spacedim; ++i)
-         center[i] = .25;
-
-       double radius=center.norm();
-       
-       HyperBallBoundary<dim,spacedim> boundary(center, .25*std::sqrt((double)spacedim));      
-       Triangulation<dim,spacedim> tria;
-       GridGenerator::hyper_cube (tria);
-       typename Triangulation<dim,spacedim>::active_cell_iterator cell;
-
-       tria.refine_global(1);
-       
-       for(cell=tria.begin_active(); cell!=tria.end(); ++cell)
-         if(dim<spacedim && cell->center().distance(center)<radius)
-           cell->set_all_manifold_ids(1);
-         else
-           for(unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell;++f)
-             if(cell->face(f)->center().distance(center)< radius)
-               cell->face(f)->set_all_manifold_ids(1);
-
-       tria.set_manifold(1,boundary);
-       tria.refine_global(2);
-
-       GridOut gridout;
-       gridout.write_msh(tria, deallog.get_file_stream());
-       char fname[30];
-       sprintf(fname, "/tmp/id_6_mesh_%d_%d.msh",
-               dim, spacedim);
-       std::ofstream ofile(fname);
-       gridout.write_msh(tria,ofile);
+void test(unsigned int ref=1)
+{
+  deallog << "Testing dim=" << dim
+          << ", spacedim="<< spacedim << std::endl;
+
+  Point<spacedim> center;
+  for (unsigned int i=0; i<spacedim; ++i)
+    center[i] = .25;
+
+  double radius=center.norm();
+
+  HyperBallBoundary<dim,spacedim> boundary(center, .25*std::sqrt((double)spacedim));
+  Triangulation<dim,spacedim> tria;
+  GridGenerator::hyper_cube (tria);
+  typename Triangulation<dim,spacedim>::active_cell_iterator cell;
+
+  tria.refine_global(1);
+
+  for (cell=tria.begin_active(); cell!=tria.end(); ++cell)
+    if (dim<spacedim && cell->center().distance(center)<radius)
+      cell->set_all_manifold_ids(1);
+    else
+      for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+        if (cell->face(f)->center().distance(center)< radius)
+          cell->face(f)->set_all_manifold_ids(1);
+
+  tria.set_manifold(1,boundary);
+  tria.refine_global(2);
+
+  GridOut gridout;
+  gridout.write_msh(tria, deallog.get_file_stream());
+  char fname[30];
+  sprintf(fname, "/tmp/id_6_mesh_%d_%d.msh",
+          dim, spacedim);
+  std::ofstream ofile(fname);
+  gridout.write_msh(tria,ofile);
 }
 
-int main () 
+int main ()
 {
-       std::ofstream logfile("output");
-       deallog.attach(logfile);
-       deallog.depth_console(0);
-       deallog.threshold_double(1.e-10);
-       
-       test<1,1>();
-       test<1,2>();
-       test<2,2>();
-       test<2,3>();
-       test<3,3>();
-       
-       return 0;
+  std::ofstream logfile("output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test<1,1>();
+  test<1,2>();
+  test<2,2>();
+  test<2,3>();
+  test<3,3>();
+
+  return 0;
 }
 
index 204f66e0e25926a39ec469ea3814e35812b516c4..96635f1862c465edeeb01c0d688636ef4e9f38a6 100644 (file)
@@ -10,9 +10,9 @@
 
 
 // Set a manifold id on one of the boundary face, and attach the
-// boundary description to it. Refine globally twice and output the mesh. 
-// Do this building first the Tria, then the manifold, and setting the 
-// manifold at the end as well, to check proper destruction of the classes. 
+// boundary description to it. Refine globally twice and output the mesh.
+// Do this building first the Tria, then the manifold, and setting the
+// manifold at the end as well, to check proper destruction of the classes.
 
 #include "../tests.h"
 #include <fstream>
 
 // Helper function
 template <int dim, int spacedim>
-void test(unsigned int ref=1){
-       deallog << "Testing dim=" << dim
-       << ", spacedim="<< spacedim << std::endl;
-
-       Point<spacedim> center;
-       for(unsigned int i=0; i<dim; ++i)
-         center[i] = .5;
-
-       Triangulation<dim,spacedim> tria;
-       HyperBallBoundary<dim,spacedim> boundary(center,.5*std::sqrt((double)dim));     
-       GridGenerator::hyper_cube (tria);
-       typename Triangulation<dim,spacedim>::active_cell_iterator cell;
-       
-       tria.begin_active()->face(0)->set_manifold_id(1);
-       tria.set_manifold(1,boundary);
-       
-       tria.refine_global(2);
-
-       for(cell=tria.begin_active(); cell!=tria.end(); ++cell)
-         {
-           deallog << "C: " << cell << std::endl;
-           for(unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell;++f)
-             deallog << "F: " << cell->face(f) << ", mid: " 
-                     << (int) cell->face(f)->manifold_id() << std::endl;
-         }
-       
-
-       GridOut gridout;
-       gridout.write_msh(tria, deallog.get_file_stream());
-       char fname[30];
-       sprintf(fname, "/tmp/id_7_mesh_%d_%d.msh",
-               dim, spacedim);
-       std::ofstream ofile(fname);
-       gridout.write_msh(tria,ofile);
-       tria.set_manifold(1);
+void test(unsigned int ref=1)
+{
+  deallog << "Testing dim=" << dim
+          << ", spacedim="<< spacedim << std::endl;
+
+  Point<spacedim> center;
+  for (unsigned int i=0; i<dim; ++i)
+    center[i] = .5;
+
+  Triangulation<dim,spacedim> tria;
+  HyperBallBoundary<dim,spacedim> boundary(center,.5*std::sqrt((double)dim));
+  GridGenerator::hyper_cube (tria);
+  typename Triangulation<dim,spacedim>::active_cell_iterator cell;
+
+  tria.begin_active()->face(0)->set_manifold_id(1);
+  tria.set_manifold(1,boundary);
+
+  tria.refine_global(2);
+
+  for (cell=tria.begin_active(); cell!=tria.end(); ++cell)
+    {
+      deallog << "C: " << cell << std::endl;
+      for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+        deallog << "F: " << cell->face(f) << ", mid: "
+                << (int) cell->face(f)->manifold_id() << std::endl;
+    }
+
+
+  GridOut gridout;
+  gridout.write_msh(tria, deallog.get_file_stream());
+  char fname[30];
+  sprintf(fname, "/tmp/id_7_mesh_%d_%d.msh",
+          dim, spacedim);
+  std::ofstream ofile(fname);
+  gridout.write_msh(tria,ofile);
+  tria.set_manifold(1);
 }
 
-int main () 
+int main ()
 {
-       std::ofstream logfile("output");
-       deallog.attach(logfile);
-       deallog.depth_console(0);
-       deallog.threshold_double(1.e-10);
-       
-       test<1,1>();
-       test<1,2>();
-       test<2,2>();
-       test<2,3>();
-       test<3,3>();
-       
-       return 0;
+  std::ofstream logfile("output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test<1,1>();
+  test<1,2>();
+  test<2,2>();
+  test<2,3>();
+  test<3,3>();
+
+  return 0;
 }
 

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


Typeset in Trocchi and Trocchi Bold Sans Serif.