default:
Assert(false, ExcNotImplemented());
- };
+ }
// then the contents of the subsection
enter_subsection(demangle(p->first));
overall_indent_level -= 1;
out << std::setw(overall_indent_level * 2) << ""
<< "end" << std::endl;
- };
+ }
break;
}
uc.create_new(run_no + 1);
fill_entry_values(run_no);
uc.run(*this);
- };
+ }
}
different_values.push_back(
prefix + std::string(multiple, 0, multiple.find('|')) + postfix);
multiple.erase(0, multiple.find('|') + 1);
- };
+ }
// make up the last selection ("while" broke
// because there was no '|' any more
different_values.push_back(prefix + multiple + postfix);
return true;
tmp.erase(0, tmp.find('|') + 1);
- };
+ }
// remove whitespace at the end
while ((tmp.length() != 0) && (std::isspace(*(tmp.end() - 1))))
name.erase(name.length() - 1, 1);
split_names.push_back(name);
- };
+ }
// check the different possibilities
// need it anymore.
string_found = true;
break;
- };
+ }
tmp.erase(0, tmp.find('|') + 1);
- };
+ }
// check last choice, not finished by |
if (!string_found)
if (*test_string == tmp)
if (!string_found)
return false;
- };
+ }
return true;
}
{
values[0] = value(x);
return;
- };
+ }
// if there are derivatives needed, then do it properly by the full Horner
// scheme
// coefficients array
recursive_coefficients[k] =
std_cxx14::make_unique<const std::vector<double>>(std::move(ck));
- };
- };
+ }
+ }
}
{
v(d, i).resize(v_size, 0.);
polynomials[i].value(p(d), v(d, i));
- };
+ }
if (update_values)
{
weights[present_index] = q1.weight(i1) * q2.weight(i2);
++present_index;
- };
+ }
#ifdef DEBUG
if (size() > 0)
break;
default:
Assert(false, ExcInternalError());
- };
+ }
}
default:
Assert(false, ExcInternalError());
- };
+ }
}
break;
default:
Assert(false, ExcInternalError());
- };
+ }
break;
case 1:
switch (subface_no)
break;
default:
Assert(false, ExcInternalError());
- };
+ }
break;
case 2:
switch (subface_no)
break;
default:
Assert(false, ExcInternalError());
- };
+ }
break;
case 3:
switch (subface_no)
break;
default:
Assert(false, ExcInternalError());
- };
+ }
break;
default:
Assert(false, ExcInternalError());
- };
+ }
}
{
project_to_subface(quadrature, face, subface, help);
std::copy(help.begin(), help.end(), std::back_inserter(q_points));
- };
+ }
// next copy over weights
std::vector<double> weights;
{
project_to_subface(quadrature, face, subface, help);
std::copy(help.begin(), help.end(), std::back_inserter(q_points));
- };
+ }
// next copy over weights
std::vector<double> weights;
// dst.weights[next_point]
// = base_quadrature.weight(q_point) / n_copies;
// ++next_point;
-// };
+// }
// }
// else
// // skip doubly available points
// {
// double_point_weight += base_quadrature.weight(i);
// ++n_end_points;
-// };
+// }
// // scale the weight correctly
// double_point_weight /= n_copies;
// n_copies;
// ++next_point;
-// };
-// };
+// }
+// }
// #if DEBUG
// double sum_of_weights = 0;
base_quadrature.weight(q_point) / n_copies;
++next_point;
- };
+ }
}
else
// skip doubly available points
{
double_point_weight += base_quadrature.weight(i);
++n_end_points;
- };
+ }
// scale the weight correctly
double_point_weight /= n_copies;
base_quadrature.weight(q_point) / n_copies;
++next_point;
- };
- };
+ }
+ }
#if DEBUG
double sum_of_weights = 0;
{
this->quadrature_points[i] = Point<1>(xpts[i]);
this->weights[i] = wts[i];
- };
+ }
}
{
this->quadrature_points[i] = Point<1>(xpts[i]);
this->weights[i] = wts[i];
- };
+ }
}
{
this->quadrature_points[i] = Point<1>(xpts[i]);
this->weights[i] = wts[i];
- };
+ }
}
{
this->quadrature_points[i] = Point<1>(xpts[i]);
this->weights[i] = wts[i];
- };
+ }
}
{
v[d][i].resize(n_values_and_derivatives, 0.);
polynomials[d][i].value(p(d), v[d][i]);
- };
+ }
}
for (unsigned int i = 0; i < n_tensor_pols; ++i)
{
std::abort();
return 1;
- };
+ }
# endif
}
}
else
return_values[i].second = end;
- };
+ }
return return_values;
}
} // namespace Threads
{
new_indices[i] = next_selected;
++next_selected;
- };
+ }
Assert(next_unselected == n_selected_dofs, ExcInternalError());
Assert(next_selected == n_dofs, ExcInternalError());
}
{
new_indices[i] = next_selected;
++next_selected;
- };
+ }
Assert(next_unselected == n_selected_dofs, ExcInternalError());
Assert(next_selected == n_dofs, ExcInternalError());
}
cell->get_dof_indices(local_dof_indices);
for (unsigned int i = 0; i < dofs_per_cell; ++i)
selected_dofs[local_dof_indices[i]] = true;
- };
+ }
}
if ((index != numbers::invalid_dof_index) && (index > max_element))
max_element = index;
AssertDimension(max_element, sparsity.n_rows() - 1);
- };
+ }
#endif
std::vector<types::global_dof_index> dofs_on_this_face;
sparsity.add_entries(boundary_dof_boundary_indices[i],
boundary_dof_boundary_indices.begin(),
boundary_dof_boundary_indices.end());
- };
+ }
return;
}
if ((index != numbers::invalid_dof_index) && (index > max_element))
max_element = index;
AssertDimension(max_element, sparsity.n_rows() - 1);
- };
+ }
#endif
std::vector<types::global_dof_index> dofs_on_this_face;
this->dofs_per_face);
default:
Assert(false, ExcNotImplemented());
- };
+ }
return TableIndices<2>(numbers::invalid_unsigned_int,
numbers::invalid_unsigned_int);
}
default:
return true;
- };
- };
+ }
+ }
default: // other rt_order
return true;
- };
+ }
return true;
}
// second on face 1:
return (((shape_index == 0) && (face_index == 0)) ||
((shape_index == this->degree) && (face_index == 1)));
- };
+ }
case 2:
{
if (face_index == 3 && shape_index >= this->dofs_per_cell - n)
return true;
return false;
- };
+ }
case 3:
{
if (face_index == 5 && shape_index >= this->dofs_per_cell - n2)
return true;
return false;
- };
+ }
default:
Assert(false, ExcNotImplemented());
p(2) = .5;
}
this->generalized_support_points[index_map_inverse[k++]] = p;
- };
+ }
}
p(2) = .5;
}
this->generalized_face_support_points[face_renumber[k++]] = p;
- };
+ }
}
default:
return true;
- };
- };
+ }
+ }
default: // other rt_order
return true;
- };
+ }
return true;
}
// should be of size zero)
Assert(false, ExcInternalError());
break;
- };
+ }
case 2:
{
base_element(m_index.first.first).dofs_per_line *
sub_line +
tmp2;
- };
+ }
break;
- };
+ }
case 3:
{
base_element(m_index.first.first).dofs_per_quad *
sub_quad +
tmp2;
- };
+ }
break;
- };
+ }
default:
Assert(false, ExcNotImplemented());
- };
+ }
// now that we gathered all information: use it to build the
// matrix. note that if n and m belong to different base elements or
this->interface_constraints(m, n) =
(base_element(n_index.first.first)
.constraints()(m_index.second, n_index.second));
- };
+ }
}
real_point *= h;
real_point += line->vertex(0);
a.push_back(real_point);
- };
+ }
}
else
// not at boundary, so just use scaled Gauss-Lobatto points (i.e., use
// vertices_indices[i] is automatically
// created upon first usage
vertex_indices[vertex_number] = vertex;
- };
+ }
// set up array of cells
std::vector<CellData<dim>> cells;
// no such vertex index
AssertThrow(false, ExcInvalidVertexIndex(cell, vertex));
vertex = numbers::invalid_unsigned_int;
- };
+ }
}
else if ((cell_type == "quad") && (dim == 3))
// boundary info
// no such vertex index
Assert(false, ExcInvalidVertexIndex(cell, vertex));
vertex = numbers::invalid_unsigned_int;
- };
+ }
}
else
// cannot read this
AssertThrow(false, ExcUnknownIdentifier(cell_type));
- };
+ }
// check that no forbidden arrays are used
in >> vertices[vertex][d];
// read Ref phi_i, whatever that may be
in >> dummy;
- };
+ }
AssertThrow(in, ExcInvalidDBMeshFormat());
skip_empty_lines(in);
in >> dummy >> dummy;
// read Ref phi_i, whatever that may be
in >> dummy;
- };
+ }
AssertThrow(in, ExcInvalidDBMeshFormat());
skip_empty_lines(in);
in >> dummy >> dummy;
// read Ref phi_i, whatever that may be
in >> dummy;
- };
+ }
AssertThrow(in, ExcInvalidDBMeshFormat());
skip_empty_lines(in);
ExcInvalidVertexIndex(cell, cells.back().vertices[i]));
--cells.back().vertices[i];
- };
+ }
// read and discard Ref phi_i
in >> dummy;
- };
+ }
AssertThrow(in, ExcInvalidDBMeshFormat());
skip_empty_lines(in);
for (unsigned int &vertex : cells[cell].vertices)
in >> vertex;
- };
+ }
// store vertex
for (unsigned int d = 0; d < 2; ++d)
vertices[vertex](d) = x[d];
- };
+ }
AssertThrow(in, ExcIO());
// do some clean-up on vertices...
for (unsigned int i = 0; i < 8; i++)
cells[cell].vertices[i] = xda_ordered_nodes[xda_to_dealII_map[i]];
- };
+ }
// store vertex
for (unsigned int d = 0; d < 3; ++d)
vertices[vertex](d) = x[d];
- };
+ }
AssertThrow(in, ExcIO());
// do some clean-up on vertices...
ExcInvalidVertexIndex(cell_per_entity,
vertex));
vertex = numbers::invalid_unsigned_int;
- };
+ }
}
else if ((cell_type == 3) && (dim == 3))
// boundary info
min_y = p(1);
if (p(1) > max_y)
max_y = p(1);
- };
+ }
out << "# cell " << i << std::endl;
Point<2> center;
<< vertices[cells[i].vertices[f]](0) << ','
<< vertices[cells[i].vertices[f]](1) << std::endl;
out << std::endl;
- };
+ }
out << std::endl
<< vertices[cell.vertices[7]] << std::endl
<< std::endl
<< std::endl;
- };
+ }
}
if ((*pi == true) && (*pj == true) &&
((vertices[i] - vertices[j]).norm_square() > max_distance_sqr))
max_distance_sqr = (vertices[i] - vertices[j]).norm_square();
- };
+ }
return std::sqrt(max_distance_sqr);
}
// zero-based index, but we need the
// number of cells, which is one larger
mapping[level].resize(n_cells + 1, destination_grid.end());
- };
+ }
// now make up the mapping
// loop over all cells and set the user
return ((boundary_lines.size() == 0) && (boundary_quads.size() == 0));
case 2:
return (boundary_quads.size() == 0);
- };
+ }
return true;
}
// outside
if ((-face[1] * to_p[0] + face[0] * to_p[1]) < 0)
return false;
- };
+ }
// if we arrived here, then the
// point is inside for all four
this->tria->levels[this->present_level]
->neighbors[this->present_index * GeometryInfo<dim>::faces_per_cell + i]
.second = -1;
- };
+ }
}
neighbors.insert(neighbors.end(),
total_cells * (2 * dimension) - neighbors.size(),
std::make_pair(-1, -1));
- };
+ }
}
neighbors.insert(neighbors.end(),
total_cells * (2 * dimension) - neighbors.size(),
std::make_pair(-1, -1));
- };
+ }
}
default:
Assert(false, ExcNotImplemented());
max_couplings = 0;
- };
+ }
return std::min(max_couplings, dof_handler.n_dofs());
}
SparsityPatternBase *sp = sub_objects[i][j];
sub_objects[i][j] = nullptr;
delete sp;
- };
+ }
sub_objects.reinit(0, 0);
// then set new sizes
if (this_row > max_entries)
max_entries = this_row;
- };
+ }
return max_entries;
}
else
out << std::setw(width) << zero_string << ' ';
out << std::endl;
- };
+ }
AssertThrow(out, ExcIO());
// reset output format
false,
ExcMessage(
"ParaSails parameter symmetric can only be equal to 0, 1, 2!"));
- };
+ }
set_option_value("-pc_hypre_parasails_sym", ssStream.str());
sum1 += *ptr++;
sum2 += *ptr++;
sum3 += *ptr++;
- };
+ }
// add up remaining elements
while (ptr != start_ptr + size())
sum0 += *ptr++;
// row given to this constructor
Assert(next_free_slot <= &colnums[rowstart[row + 1]],
ExcNotEnoughSpace(0, rowstart[row + 1] - rowstart[row]));
- };
+ }
}
&new_colnums[next_row_start]) ==
&new_colnums[next_row_start]),
ExcInternalError());
- };
+ }
// assert that we have used all allocated space, no more and no less
Assert(next_free_entry == nonzero_elements, ExcInternalError());
Assert(max_vec_len == 0, ExcInternalError());
return true;
- };
+ }
return false;
}
{
colnums[k] = j;
return;
- };
- };
+ }
+ }
// if we came thus far, something went wrong: there was not enough space in
// this line
// would not harm, only take time to check up)
if (colnums[k] != row)
add(colnums[k], row);
- };
+ }
}
if ((icomp == jcomp) && selected[icomp])
prolongation_sparsities[level]->add(
dof_indices_child[i], dof_indices_parent[j]);
- };
- };
- };
+ }
+ }
+ }
prolongation_sparsities[level]->compress();
prolongation_matrices[level]->reinit(*prolongation_sparsities[level]);
if ((icomp == jcomp) && mg_component_mask[icomp])
prolongation_sparsities[level]->add(
dof_indices_child[i], dof_indices_parent[j]);
- };
- };
- };
+ }
+ }
+ }
prolongation_sparsities[level]->compress();
prolongation_matrices[level]->reinit(*prolongation_sparsities[level]);
my_patches[angle].vertices[3] = r2 * angle_directions[angle + 1];
break;
- };
+ }
case 2:
{
.vertices[vertex +
GeometryInfo<dimension>::vertices_per_cell][0] =
v(1);
- };
+ }
break;
- };
+ }
default:
Assert(false, ExcNotImplemented());
- };
+ }
// then fill in data
if (data.n_datasets > 0)
++data_set)
for (unsigned int i = 0; i < data_set->names.size(); ++i)
Assert(*name != data_set->names[i], ExcNameAlreadyUsed(*name));
- };
+ }
switch (vector_type)
{
cell_data.emplace_back();
cell_data.back().names = names;
break;
- };
+ }
}
data_vector->data.reinit(vec.size());
std::copy(vec.begin(), vec.end(), data_vector->data.begin());
return;
- };
+ }
// ok. not found. there is a
// slight chance that
data_vector->data.reinit(vec.size());
std::copy(vec.begin(), vec.end(), data_vector->data.begin());
return;
- };
+ }
Assert(false, ExcVectorNotDeclared(names[0]));
- };
+ }
// we have either return or Assert
// statements above, so shouldn't
default:
Assert(false, ExcNotImplemented());
- };
+ }
// now fill in the data values.
fe_values.get_fe().n_components()));
fe_values.get_function_gradients(solution, values);
return ProjectedDerivative(values[0][component]);
- };
+ }
}
EE[0] = am + R * std::cos(theta);
EE[1] = am + R * std::cos(theta + 2. / 3. * numbers::PI);
EE[2] = am + R * std::cos(theta + 4. / 3. * numbers::PI);
- };
- };
+ }
+ }
return std::max(std::fabs(EE[0]),
std::max(std::fabs(EE[1]), std::fabs(EE[2])));
{
const double s = (d[i][j] + d[j][i]) / 2;
d[i][j] = d[j][i] = s;
- };
+ }
}
fe_values.get_fe().n_components()));
fe_values.get_function_hessians(solution, values);
return ProjectedDerivative(values[0][component]);
- };
+ }
}
projected_finite_difference /= distance;
projected_derivative += outer_product(y, projected_finite_difference);
- };
+ }
// can we determine an
// approximation of the
max_value =
std::max(max_value,
*std::max_element(values[i].begin(), values[i].end()));
- };
+ }
break;
- };
+ }
case logarithmic:
{
min_value + (n + 1) * delta);
break;
- };
+ }
case logarithmic:
{
(n + 1) * delta));
break;
- };
+ }
default:
Assert(false, ExcInternalError());
- };
+ }
// fill the other lists of intervals
for (unsigned int i = 1; i < values.size(); ++i)
{
++intervals[i][n].content;
break;
- };
- };
+ }
+ }
}
<< intervals[i][n].content << std::endl;
out << std::endl;
- };
+ }
AssertThrow(out, ExcIO());
}
AssertThrow(false, ExcInvalidName(name));
return linear;
- };
+ }
}
{
timesteps[step]->set_timestep_no(step);
timesteps[step]->set_sweep_no(sweep_no);
- };
+ }
for (unsigned int step = 0; step < timesteps.size(); ++step)
timesteps[step]->start_sweep();
// if (static_cast<unsigned int>(cell->level()) >=
// flags.max_refinement_level)
// cell->clear_refine_flag();
- // };
+ // }
tria->execute_coarsening_and_refinement();
- };
+ }
}
old_cell->clear_coarsen_flag();
old_cell->set_refine_flag();
- };
+ }
return;
- };
+ }
if (old_cell->has_children() && new_cell->has_children())
{
grids_changed |=
dealii::adapt_grid_cells<dim>(cell1->child(c), cell2->child(c));
return grids_changed;
- };
+ }
if (!cell1->has_children() && !cell2->has_children())
{
cell1->clear_coarsen_flag();
return true;
- };
+ }
return false;
- };
+ }
if (cell1->has_children() && !cell2->has_children())
{
cell2->clear_coarsen_flag();
changed_grid = true;
- };
+ }
if (!cell2->refine_flag_set())
for (unsigned int c = 0; c < cell1->n_children(); ++c)
cell2->set_refine_flag();
changed_grid = true;
break;
- };
+ }
return changed_grid;
- };
+ }
if (!cell1->has_children() && cell2->has_children())
// same thing, other way round...
{
cell1->clear_coarsen_flag();
changed_grid = true;
- };
+ }
if (!cell1->refine_flag_set())
for (unsigned int c = 0; c < cell2->n_children(); ++c)
cell1->set_refine_flag();
changed_grid = true;
break;
- };
+ }
return changed_grid;
- };
+ }
Assert(false, ExcInternalError());
return false;
std::upper_bound(sorted_criteria.begin(),
sorted_criteria.end(),
static_cast<float>(coarsening_threshold));
- };
+ }
// actually flag cells the first time
delta_up *= relaxations[r].second;
delta_down *= relaxations[r].second;
break;
- };
+ }
// now, if the number of estimated
// cells exceeds the number of cells
Assert(p_coarsening_threshold != p_refinement_threshold,
ExcInternalError());
--p_refinement_threshold;
- };
+ }
coarsening_threshold = *p_coarsening_threshold;
refinement_threshold = *p_refinement_threshold;
{
cell->clear_refine_flag();
cell->clear_coarsen_flag();
- };
+ }
// flag cells finally
GridRefinement::refine(*tria, criteria, refinement_threshold);
GridRefinement::coarsen(*tria, criteria, coarsening_threshold);
- };
+ }
// if step number is greater than
// one: adapt this and the previous
endc = tria->end(0);
for (; new_cell != endc; ++new_cell, ++old_cell)
dealii::mirror_refinement_flags<dim>(new_cell, old_cell);
- };
+ }
tria->prepare_coarsening_and_refinement();
previous_tria->prepare_coarsening_and_refinement();
// to have cells refined twice more
// than the present one and vica versa.
dealii::adapt_grids<dim>(*previous_tria, *tria);
- };
+ }
}