const Table<2,Coupling> &int_mask,
const Table<2,Coupling> &flux_mask)
{
- const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof.get_fe();
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension>
+ &fe = dof.get_fe();
- std::vector<types::global_dof_index> dofs_on_this_cell(fe.dofs_per_cell);
- std::vector<types::global_dof_index> dofs_on_other_cell(fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs_on_this_cell (fe.dofs_per_cell);
+ std::vector<types::global_dof_index> dofs_on_other_cell (fe.dofs_per_cell);
const Table<2,Coupling>
- int_dof_mask = dof_couplings_from_component_couplings(fe, int_mask),
- flux_dof_mask = dof_couplings_from_component_couplings(fe, flux_mask);
+ int_dof_mask = dof_couplings_from_component_couplings (fe, int_mask),
+ flux_dof_mask = dof_couplings_from_component_couplings (fe, flux_mask);
- Table<2,bool> support_on_face(fe.dofs_per_cell,
- GeometryInfo<DoFHandlerType::dimension>::faces_per_cell);
+ Table<2,bool> support_on_face
+ (fe.dofs_per_cell, GeometryInfo<DoFHandlerType::dimension>::faces_per_cell);
for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
for (unsigned int f=0; f<GeometryInfo<DoFHandlerType::dimension>::faces_per_cell; ++f)
support_on_face(i,f) = fe.has_support_on_face(i,f);
- typename DoFHandlerType::active_cell_iterator cell = dof.begin_active(),
- endc = dof.end();
+ typename DoFHandlerType::active_cell_iterator cell = dof.begin_active (),
+ endc = dof.end ();
for (; cell!=endc; ++cell)
- if (cell->is_locally_owned())
+ if (cell->is_locally_owned ())
{
cell->get_dof_indices (dofs_on_this_cell);
// make sparsity pattern for this cell
for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
for (unsigned int j=0; j<fe.dofs_per_cell; ++j)
- if (int_dof_mask(i,j) != none)
+ if (int_dof_mask (i,j) != none)
sparsity.add (dofs_on_this_cell[i],
dofs_on_this_cell[j]);
++face_n)
{
const typename DoFHandlerType::face_iterator
- cell_face = cell->face(face_n);
+ cell_face = cell->face (face_n);
if (cell_face->user_flag_set ())
continue;
- if (cell->at_boundary (face_n) )
+ if (cell->at_boundary (face_n))
{
for (unsigned int i=0; i<fe.dofs_per_cell; ++i)
{
{
const bool j_non_zero_i = support_on_face (j, face_n);
- if ((flux_dof_mask(i,j) == always)
+ if (flux_dof_mask (i,j) == always
||
- (flux_dof_mask(i,j) == nonzero
+ (flux_dof_mask (i,j) == nonzero
&&
i_non_zero_i
&&
else
{
typename DoFHandlerType::level_cell_iterator
- neighbor = cell->neighbor(face_n);
- // Refinement edges are taken care of by coarser
- // cells
- if (cell->neighbor_is_coarser(face_n))
+ neighbor = cell->neighbor (face_n);
+ // Refinement edges are taken care of by coarser cells
+ if (cell->neighbor_is_coarser (face_n))
continue;
const unsigned int
- neighbor_face_n = cell->neighbor_of_neighbor(face_n);
+ neighbor_face_n = cell->neighbor_of_neighbor (face_n);
- if (cell_face->has_children())
+ if (cell_face->has_children ())
{
for (unsigned int sub_nr = 0;
- sub_nr != cell_face->n_children();
+ sub_nr != cell_face->n_children ();
++sub_nr)
{
const typename DoFHandlerType::level_cell_iterator
const bool j_non_zero_i = support_on_face (j, face_n);
const bool j_non_zero_e = support_on_face (j, neighbor_face_n);
- if (flux_dof_mask(i,j) == always)
+ if (flux_dof_mask (i,j) == always)
{
sparsity.add (dofs_on_this_cell[i],
dofs_on_other_cell[j]);
sparsity.add (dofs_on_other_cell[i],
dofs_on_other_cell[j]);
}
- else if (flux_dof_mask(i,j) == nonzero)
+ else if (flux_dof_mask (i,j) == nonzero)
{
if (i_non_zero_i && j_non_zero_e)
sparsity.add (dofs_on_this_cell[i],
dofs_on_other_cell[j]);
}
- if (flux_dof_mask(j,i) == always)
+ if (flux_dof_mask (j,i) == always)
{
sparsity.add (dofs_on_this_cell[j],
dofs_on_other_cell[i]);
sparsity.add (dofs_on_other_cell[j],
dofs_on_other_cell[i]);
}
- else if (flux_dof_mask(j,i) == nonzero)
+ else if (flux_dof_mask (j,i) == nonzero)
{
if (j_non_zero_i && i_non_zero_e)
sparsity.add (dofs_on_this_cell[j],
{
const bool j_non_zero_i = support_on_face (j, face_n);
const bool j_non_zero_e = support_on_face (j, neighbor_face_n);
- if (flux_dof_mask(i,j) == always)
+ if (flux_dof_mask (i,j) == always)
{
sparsity.add (dofs_on_this_cell[i],
dofs_on_other_cell[j]);
sparsity.add (dofs_on_other_cell[i],
dofs_on_other_cell[j]);
}
- if (flux_dof_mask(i,j) == nonzero)
+ if (flux_dof_mask (i,j) == nonzero)
{
if (i_non_zero_i && j_non_zero_e)
sparsity.add (dofs_on_this_cell[i],
dofs_on_other_cell[j]);
}
- if (flux_dof_mask(j,i) == always)
+ if (flux_dof_mask (j,i) == always)
{
sparsity.add (dofs_on_this_cell[j],
dofs_on_other_cell[i]);
sparsity.add (dofs_on_other_cell[j],
dofs_on_other_cell[i]);
}
- if (flux_dof_mask(j,i) == nonzero)
+ if (flux_dof_mask (j,i) == nonzero)
{
if (j_non_zero_i && i_non_zero_e)
sparsity.add (dofs_on_this_cell[j],
}
}
}
- neighbor->face(neighbor_face_n)->set_user_flag ();
+ neighbor->face (neighbor_face_n)->set_user_flag ();
}
}
}