PRISMS-PF  v2.1
markBoundaries.cc
Go to the documentation of this file.
1 //methods to mark boundaries
2 
3 #include "../../include/matrixFreePDE.h"
4 #include "../../include/initialConditions.h"
5 
6 //methods to mark boundaries
7 //methods to mark boundaries
8 template <int dim, int degree>
9 void MatrixFreePDE<dim,degree>::markBoundaries(parallel::distributed::Triangulation<dim> & tria) const{
10 
11  typename Triangulation<dim>::cell_iterator
12  cell = tria.begin (),
13  endc = tria.end();
14 
15  for (; cell!=endc; ++cell){
16 
17  // Mark all of the faces
18  for (unsigned int face_number=0; face_number<GeometryInfo<dim>::faces_per_cell;++face_number){
19  for (unsigned int i=0; i<dim; i++){
20  if ( std::fabs(cell->face(face_number)->center()(i) - (0)) < 1e-12 ){
21  cell->face(face_number)->set_boundary_id (2*i);
22  }
23  else if (std::fabs(cell->face(face_number)->center()(i) - (userInputs.domain_size[i])) < 1e-12){
24  cell->face(face_number)->set_boundary_id (2*i+1);
25  }
26 
27  }
28  }
29  }
30 }
31 
32 #include "../../include/matrixFreePDE_template_instantiations.h"
void markBoundaries(parallel::distributed::Triangulation< dim > &) const