* that are owned by other processors. In other words, for each element
* there is a clear owner among all of the processors and those elements
* that the current processor stores but does not own (i.e., the
- * "ghost elements") are simply mirror images of a master value somewhere
+ * "ghost elements") are simply mirror images of a primary value somewhere
* else -- thus, the name "ghost". This is also the case for the
* parallel::distributed::Vector class.
*
* the name "ghost element" may be misleading since in this view,
* every element we have available locally may or may not be stored
* somewhere else as well, but even if it is, the local element is not
- * a mirror value of a master location as there is no owner of each
+ * a mirror value of a primary location as there is no owner of each
* element.
*
* @note The @ref distributed documentation module provides a brief
word <code>end</code>) of the
file <code>contrib/utilities/dotgdbinit.py</code> into the directory from
the first step. Rename this file to <code>deal.py</code> so that we can
- import it into the master GDB file in the next step.
+ import it into the principal GDB configuration file in the next step.
<li> Add the following to your <code>.gdbinit</code> file, which also
resides in your home directory:
<pre class="sample">
// The <code>main()</code> works the same way as most of the main
// functions in the other example programs, i.e., it delegates work to
-// the <code>run</code> function of a master object, and only wraps
+// the <code>run</code> function of a managing object, and only wraps
// everything into some code to catch exceptions:
int main(int argc, char **argv)
{
// The function also writes a record files (with suffix `.pvd`) for Paraview
// that describes how all of these output files combine into the data for
// this single time step:
- const std::string pvtu_master_filename =
- data_out.write_vtu_with_pvtu_record(
- "./", "solution", timestep_no, mpi_communicator, 4);
+ const std::string pvtu_filename = data_out.write_vtu_with_pvtu_record(
+ "./", "solution", timestep_no, mpi_communicator, 4);
// The record files must be written only once and not by each processor,
// so we do this on processor 0:
// from the previous timesteps.
static std::vector<std::pair<double, std::string>> times_and_names;
times_and_names.push_back(
- std::pair<double, std::string>(present_time, pvtu_master_filename));
+ std::pair<double, std::string>(present_time, pvtu_filename));
std::ofstream pvd_output("solution.pvd");
DataOutBase::write_pvd_record(pvd_output, times_and_names);
}
// output files. We then do the same again for the competitor of
// Paraview, the VisIt visualization program, by creating a matching
// <code>.visit</code> file.
- const std::string master_name = data_out.write_vtu_with_pvtu_record(
+ const std::string pvtu_filename = data_out.write_vtu_with_pvtu_record(
output_dir, "solution", current_refinement_cycle, mpi_communicator, 2);
- pcout << master_name << std::endl;
+ pcout << pvtu_filename << std::endl;
TrilinosWrappers::MPI::Vector tmp(solution);
tmp *= -1;
data_out.build_patches();
- const std::string master = data_out.write_vtu_with_pvtu_record(
+ const std::string pvtu_filename = data_out.write_vtu_with_pvtu_record(
"", "solution", cycle, mpi_communicator, 2 /*n_digits*/, 1 /*n_groups*/);
- pcout << " Wrote " << master << std::endl;
+ pcout << " Wrote " << pvtu_filename << std::endl;
}
// class. The structure of deal.II, as many modern numerical libraries, is
// organized following a Directed Acyclic Graph (DAG). A DAG is a directed graph
// with topological ordering: each node structurally represents an object, and
-// is connected to child nodes by one (or more) oriented edges, from the parent
-// to the child. The most significant example of this structure is the
+// is connected to non-root nodes by one (or more) oriented edges, from the
+// parent to the child. The most significant example of this structure is the
// Triangulation and its Triangulation::cell_iterator structure. From a
// Triangulation (the main node), we can access each cell (children nodes of the
// triangulation). From the cells themselves we can access over all vertices of
// than the standard library's `std::ofstream` variants used in most other
// tutorial programs. A particularly nice feature of the
// `write_vtu_in_parallel()` function is the fact that it can combine output
- // from all MPI ranks into a single file, obviating a VTU master file (the
- // "pvtu" file).
+ // from all MPI ranks into a single file, making it unnecessary to have a
+ // central record of all such files (namely, the "pvtu" file).
//
// For parallel programs, it is often instructive to look at the partitioning
// of cells among processors. To this end, one can pass a vector of numbers
* Some visualization programs, such as ParaView, can read several separate
* VTU files to parallelize visualization. In that case, you need a
* <code>.pvtu</code> file that describes which VTU files form a group. The
- * DataOutInterface::write_pvtu_record() function can generate such a master
- * record. Likewise, DataOutInterface::write_visit_record() does the same
- * for VisIt (although VisIt can also read <code>pvtu</code> records since
- * version 2.5.1). Finally, for time dependent problems, you may also want
- * to look at DataOutInterface::write_pvd_record()
+ * DataOutInterface::write_pvtu_record() function can generate such a
+ * centralized record. Likewise, DataOutInterface::write_visit_record() does
+ * the same for VisIt (although VisIt can also read <code>pvtu</code> records
+ * since version 2.5.1). Finally, for time dependent problems, you may also
+ * want to look at DataOutInterface::write_pvd_record()
*
* The use of this function is explained in step-40.
*/
* parallelize visualization. In that case, you need a
* <code>.pvtu</code> file that describes which VTU files (written, for
* example, through the DataOutInterface::write_vtu() function) form a group.
- * The current function can generate such a master record.
+ * The current function can generate such a centralized record.
*
* This function is typically not called by itself from user space, but
* you may want to call it through DataOutInterface::write_pvtu_record()
* would have to provide to the current function by hand.
*
* In any case, whether this function is called directly or via
- * DataOutInterface::write_pvtu_record(), the master record file so
+ * DataOutInterface::write_pvtu_record(), the central record file so
* written contains a list of (scalar or vector) fields that describes which
* fields can actually be found in the individual files that comprise the set
* of parallel VTU files along with the names of these files. This function
* piece_names[2].emplace_back("subdomain_01.time_step_2.vtk");
* piece_names[2].emplace_back("subdomain_02.time_step_2.vtk");
*
- * std::ofstream visit_output ("master_file.visit");
+ * std::ofstream visit_output ("solution.visit");
*
* DataOutBase::write_visit_record(visit_output, piece_names);
* @endcode
* times_and_piece_names[2].second.emplace_back("subdomain_01.time_step_2.vtk");
* times_and_piece_names[2].second.emplace_back("subdomain_02.time_step_2.vtk");
*
- * std::ofstream visit_output ("master_file.visit");
+ * std::ofstream visit_output ("solution.visit");
*
* DataOutBase::write_visit_record(visit_output, times_and_piece_names);
* @endcode
* Some visualization programs, such as ParaView, can read several separate
* VTU files to parallelize visualization. In that case, you need a
* <code>.pvtu</code> file that describes which VTU files form a group. The
- * DataOutInterface::write_pvtu_record() function can generate such a master
- * record. Likewise, DataOutInterface::write_visit_record() does the same
- * for older versions of VisIt (although VisIt can also read
+ * DataOutInterface::write_pvtu_record() function can generate such a
+ * centralized record. Likewise, DataOutInterface::write_visit_record() does
+ * the same for older versions of VisIt (although VisIt can also read
* <code>pvtu</code> records since version 2.5.1). Finally,
* DataOutInterface::write_pvd_record() can be used to group together the
* files that jointly make up a time dependent simulation.
* parallelize visualization. In that case, you need a
* <code>.pvtu</code> file that describes which VTU files (written, for
* example, through the DataOutInterface::write_vtu() function) form a group.
- * The current function can generate such a master record.
+ * The current function can generate such a centralized record.
*
- * The master record file generated by this function
+ * The central record file generated by this function
* contains a list of (scalar or vector) fields that describes which
* fields can actually be found in the individual files that comprise the set
* of parallel VTU files along with the names of these files. This function
* generate the .pvtu file, where processor zero is chosen to take over this
* job.
*
- * The return value is the filename of the master file for the pvtu record.
+ * The return value is the filename of the centralized file for the pvtu
+ * record.
*
* @note The code simply combines the strings @p directory and
* @p filename_without_extension, i.e., the user has to make sure that
/**
* We record the thread id of the thread creating this object. We need
- * this information to "steal" the current prefix from this "master"
+ * this information to "steal" the current prefix from this "parent"
* thread on first use of deallog on a new thread.
*/
- std::thread::id master_thread;
+ std::thread::id parent_thread;
/**
* Default stream, where the output is to go to. This stream defaults to
}
// write pvtu record
- const std::string filename_master =
+ const std::string pvtu_filename =
filename_without_extension + "_" +
Utilities::int_to_string(counter, n_digits_for_counter) + ".pvtu";
filename_vector.emplace_back(filename);
}
- std::ofstream master_output((directory + filename_master).c_str());
- this->write_pvtu_record(master_output, filename_vector);
+ std::ofstream pvtu_output((directory + pvtu_filename).c_str());
+ this->write_pvtu_record(pvtu_output, filename_vector);
}
- return filename_master;
+ return pvtu_filename;
}
LogStream::LogStream()
- : master_thread(std::this_thread::get_id())
+ : parent_thread(std::this_thread::get_id())
, std_out(&std::cout)
, file(nullptr)
, std_depth(0)
// from the initial thread that created logstream.
if (!exists)
{
- auto it = prefixes.data.find(master_thread);
+ auto it = prefixes.data.find(parent_thread);
if (it != prefixes.data.end())
local_prefixes = it->second;
}
global_min_and_max.second};
adjust_interesting_range(interesting_range);
- const unsigned int master_mpi_rank = 0;
- unsigned int iteration = 0;
+ const unsigned int root_mpi_rank = 0;
+ unsigned int iteration = 0;
do
{
int ierr = MPI_Bcast(interesting_range,
2,
MPI_DOUBLE,
- master_mpi_rank,
+ root_mpi_rank,
mpi_communicator);
AssertThrowMPI(ierr);
// now adjust the range. if we have too many cells, we take the
// upper half of the previous range, otherwise the lower half.
// if we have hit the right number, then set the range to the
- // exact value. slave nodes also update their own
+ // exact value. non-root nodes also update their own
// interesting_range, however their results are not significant
// since the values will be overwritten by MPI_Bcast from the
- // master node in next loop.
+ // root node in next loop.
if (total_count > n_target_cells)
interesting_range[0] = test_threshold;
else if (total_count < n_target_cells)
global_min_and_max.second};
adjust_interesting_range(interesting_range);
- const unsigned int master_mpi_rank = 0;
- unsigned int iteration = 0;
+ const unsigned int root_mpi_rank = 0;
+ unsigned int iteration = 0;
do
{
int ierr = MPI_Bcast(interesting_range,
2,
MPI_DOUBLE,
- master_mpi_rank,
+ root_mpi_rank,
mpi_communicator);
AssertThrowMPI(ierr);
ierr = MPI_Bcast(&final_threshold,
1,
MPI_DOUBLE,
- master_mpi_rank,
+ root_mpi_rank,
mpi_communicator);
AssertThrowMPI(ierr);
1,
MPI_DOUBLE,
MPI_SUM,
- master_mpi_rank,
+ root_mpi_rank,
mpi_communicator);
AssertThrowMPI(ierr);
// now adjust the range. if we have too many cells, we take the
// upper half of the previous range, otherwise the lower half.
// if we have hit the right number, then set the range to the
- // exact value. slave nodes also update their own
+ // exact value. non-root nodes also update their own
// interesting_range, however their results are not significant
// since the values will be overwritten by MPI_Bcast from the
- // master node in next loop.
+ // root node in next loop.
if (total_error > target_error)
interesting_range[0] = test_threshold;
else if (total_error < target_error)
[other_fe_index];
for (const auto &identity : identities)
{
- const types::global_dof_index master_dof_index =
+ const types::global_dof_index primary_dof_index =
dealii::internal::DoFAccessorImplementation::
Implementation::get_dof_index(
dof_handler,
most_dominating_fe_index,
identity.first,
std::integral_constant<int, 0>());
- const types::global_dof_index slave_dof_index =
- dealii::internal::DoFAccessorImplementation::
- Implementation::get_dof_index(
- dof_handler,
- 0,
- vertex_index,
- other_fe_index,
- identity.second,
- std::integral_constant<int, 0>());
+ const types::global_dof_index
+ dependent_dof_index =
+ dealii::internal::DoFAccessorImplementation::
+ Implementation::get_dof_index(
+ dof_handler,
+ 0,
+ vertex_index,
+ other_fe_index,
+ identity.second,
+ std::integral_constant<int, 0>());
// on subdomain boundaries, we will
// encounter invalid DoFs on ghost cells,
// to overwrite a valid DoF. we will skip
// constraining invalid DoFs for now, and
// consider them later in Phase 5.
- if (slave_dof_index != numbers::invalid_dof_index)
+ if (dependent_dof_index !=
+ numbers::invalid_dof_index)
{
// if the DoF indices of both elements
// are already distributed, i.e., both
// should either not have a dof_identity
// yet, or it must come out here to be
// exactly as we had computed before
- if (master_dof_index !=
+ if (primary_dof_index !=
numbers::invalid_dof_index)
- Assert((dof_identities.find(
- master_dof_index) ==
- dof_identities.end()) ||
- (dof_identities[slave_dof_index] ==
- master_dof_index),
- ExcInternalError());
-
- dof_identities[slave_dof_index] =
- master_dof_index;
+ Assert(
+ (dof_identities.find(primary_dof_index) ==
+ dof_identities.end()) ||
+ (dof_identities[dependent_dof_index] ==
+ primary_dof_index),
+ ExcInternalError());
+
+ dof_identities[dependent_dof_index] =
+ primary_dof_index;
}
}
}
++j)
{
const types::global_dof_index
- master_dof_index = line->dof_index(
+ primary_dof_index = line->dof_index(
j, dominating_fe_index);
const types::global_dof_index
- slave_dof_index =
+ dependent_dof_index =
line->dof_index(j, other_fe_index);
// on subdomain boundaries, we will
// will skip constraining invalid DoFs
// for now, and consider them later in
// Phase 5.
- if (slave_dof_index !=
+ if (dependent_dof_index !=
numbers::invalid_dof_index)
{
- if (master_dof_index !=
+ if (primary_dof_index !=
numbers::invalid_dof_index)
{
- // if master dof was already
+ // if primary dof was already
// constrained, constrain to
// that one, otherwise constrain
- // slave to master
+ // dependent to primary
if (dof_identities.find(
- master_dof_index) !=
+ primary_dof_index) !=
dof_identities.end())
{
// if the DoF indices of
Assert(
dof_identities.find(
dof_identities
- [master_dof_index]) ==
+ [primary_dof_index]) ==
dof_identities.end(),
ExcInternalError());
dof_identities
- [slave_dof_index] =
+ [dependent_dof_index] =
dof_identities
- [master_dof_index];
+ [primary_dof_index];
}
else
{
// assertion
Assert(
(dof_identities.find(
- master_dof_index) ==
+ primary_dof_index) ==
dof_identities.end()) ||
(dof_identities
- [slave_dof_index] ==
- master_dof_index),
+ [dependent_dof_index] ==
+ primary_dof_index),
ExcInternalError());
dof_identities
- [slave_dof_index] =
- master_dof_index;
+ [dependent_dof_index] =
+ primary_dof_index;
}
}
else
{
- // set slave_dof to
- // master_dof_index, which is
+ // set dependent_dof to
+ // primary_dof_index, which is
// invalid
dof_identities
- [slave_dof_index] =
+ [dependent_dof_index] =
numbers::invalid_dof_index;
}
}
for (const auto &identity : identities)
{
const types::global_dof_index
- master_dof_index = line->dof_index(
+ primary_dof_index = line->dof_index(
identity.first,
most_dominating_fe_index);
const types::global_dof_index
- slave_dof_index =
+ dependent_dof_index =
line->dof_index(identity.second,
other_fe_index);
// to overwrite a valid DoF. we will skip
// constraining invalid DoFs for now, and
// consider them later in Phase 5.
- if (slave_dof_index !=
+ if (dependent_dof_index !=
numbers::invalid_dof_index)
{
// if the DoF indices of both elements
// should either not have a dof_identity
// yet, or it must come out here to be
// exactly as we had computed before
- if (master_dof_index !=
+ if (primary_dof_index !=
numbers::invalid_dof_index)
Assert((dof_identities.find(
- master_dof_index) ==
+ primary_dof_index) ==
dof_identities.end()) ||
(dof_identities
- [slave_dof_index] ==
- master_dof_index),
+ [dependent_dof_index] ==
+ primary_dof_index),
ExcInternalError());
- dof_identities[slave_dof_index] =
- master_dof_index;
+ dof_identities[dependent_dof_index] =
+ primary_dof_index;
}
}
}
[other_fe_index];
for (const auto &identity : identities)
{
- const types::global_dof_index master_dof_index =
- quad->dof_index(identity.first,
- most_dominating_fe_index);
- const types::global_dof_index slave_dof_index =
- quad->dof_index(identity.second,
- other_fe_index);
+ const types::global_dof_index
+ primary_dof_index =
+ quad->dof_index(identity.first,
+ most_dominating_fe_index);
+ const types::global_dof_index
+ dependent_dof_index =
+ quad->dof_index(identity.second,
+ other_fe_index);
// we only store an identity if we are about to
// overwrite a valid degree of freedom. we will
// skip invalid degrees of freedom (that are
// associated with ghost cells) for now, and
// consider them later in phase 5.
- if (slave_dof_index !=
+ if (dependent_dof_index !=
numbers::invalid_dof_index)
{
// if the DoF indices of both elements are
// not have a dof_identity yet, or it must
// come out here to be exactly as we had
// computed before
- if (master_dof_index !=
+ if (primary_dof_index !=
numbers::invalid_dof_index)
- Assert(
- (dof_identities.find(
- master_dof_index) ==
- dof_identities.end()) ||
- (dof_identities[slave_dof_index] ==
- master_dof_index),
- ExcInternalError());
-
- dof_identities[slave_dof_index] =
- master_dof_index;
+ Assert((dof_identities.find(
+ primary_dof_index) ==
+ dof_identities.end()) ||
+ (dof_identities
+ [dependent_dof_index] ==
+ primary_dof_index),
+ ExcInternalError());
+
+ dof_identities[dependent_dof_index] =
+ primary_dof_index;
}
}
}
[other_fe_index];
for (const auto &identity : identities)
{
- const types::global_dof_index master_dof_index =
+ const types::global_dof_index primary_dof_index =
dealii::internal::DoFAccessorImplementation::
Implementation::get_dof_index(
dof_handler,
most_dominating_fe_index,
identity.first,
std::integral_constant<int, 0>());
- const types::global_dof_index slave_dof_index =
- dealii::internal::DoFAccessorImplementation::
- Implementation::get_dof_index(
- dof_handler,
- 0,
- vertex_index,
- other_fe_index,
- identity.second,
- std::integral_constant<int, 0>());
+ const types::global_dof_index
+ dependent_dof_index =
+ dealii::internal::DoFAccessorImplementation::
+ Implementation::get_dof_index(
+ dof_handler,
+ 0,
+ vertex_index,
+ other_fe_index,
+ identity.second,
+ std::integral_constant<int, 0>());
// check if we are on an interface between
// a locally owned and a ghost cell on which
// we only have to set the indices of
// degrees of freedom that have been
// previously flagged invalid.
- if ((slave_dof_index ==
+ if ((dependent_dof_index ==
numbers::invalid_dof_index) &&
- (master_dof_index !=
+ (primary_dof_index !=
numbers::invalid_dof_index))
dealii::internal::DoFAccessorImplementation::
Implementation::set_dof_index(
other_fe_index,
identity.second,
std::integral_constant<int, 0>(),
- master_dof_index);
+ primary_dof_index);
}
}
}
++j)
{
const types::global_dof_index
- master_dof_index = line->dof_index(
+ primary_dof_index = line->dof_index(
j, dominating_fe_index);
const types::global_dof_index
- slave_dof_index =
+ dependent_dof_index =
line->dof_index(j, other_fe_index);
// check if we are on an interface
// have to set the indices of degrees
// of freedom that have been previously
// flagged invalid.
- if ((slave_dof_index ==
+ if ((dependent_dof_index ==
numbers::invalid_dof_index) &&
- (master_dof_index !=
+ (primary_dof_index !=
numbers::invalid_dof_index))
line->set_dof_index(j,
- master_dof_index,
+ primary_dof_index,
fe_index_2);
}
}
for (const auto &identity : identities)
{
const types::global_dof_index
- master_dof_index = line->dof_index(
+ primary_dof_index = line->dof_index(
identity.first,
most_dominating_fe_index);
const types::global_dof_index
- slave_dof_index =
+ dependent_dof_index =
line->dof_index(identity.second,
other_fe_index);
// we only have to set the indices of
// degrees of freedom that have been
// previously flagged invalid.
- if ((slave_dof_index ==
+ if ((dependent_dof_index ==
numbers::invalid_dof_index) &&
- (master_dof_index !=
+ (primary_dof_index !=
numbers::invalid_dof_index))
line->set_dof_index(identity.second,
- master_dof_index,
+ primary_dof_index,
other_fe_index);
}
}
[other_fe_index];
for (const auto &identity : identities)
{
- const types::global_dof_index master_dof_index =
- quad->dof_index(identity.first,
- most_dominating_fe_index);
- const types::global_dof_index slave_dof_index =
- quad->dof_index(identity.second,
- other_fe_index);
+ const types::global_dof_index
+ primary_dof_index =
+ quad->dof_index(identity.first,
+ most_dominating_fe_index);
+ const types::global_dof_index
+ dependent_dof_index =
+ quad->dof_index(identity.second,
+ other_fe_index);
// check if we are on an interface between
// a locally owned and a ghost cell on which
// exchange in Phase 5). thus, we only have to
// set the indices of degrees of freedom that
// have been previously flagged invalid.
- if ((slave_dof_index ==
+ if ((dependent_dof_index ==
numbers::invalid_dof_index) &&
- (master_dof_index !=
+ (primary_dof_index !=
numbers::invalid_dof_index))
quad->set_dof_index(identity.second,
- master_dof_index,
+ primary_dof_index,
other_fe_index);
}
}
namespace
{
inline bool
- check_master_dof_list(
+ check_primary_dof_list(
const FullMatrix<double> & face_interpolation_matrix,
- const std::vector<types::global_dof_index> &master_dof_list)
+ const std::vector<types::global_dof_index> &primary_dof_list)
{
- const unsigned int N = master_dof_list.size();
+ const unsigned int N = primary_dof_list.size();
FullMatrix<double> tmp(N, N);
for (unsigned int i = 0; i < N; ++i)
for (unsigned int j = 0; j < N; ++j)
- tmp(i, j) = face_interpolation_matrix(master_dof_list[i], j);
+ tmp(i, j) = face_interpolation_matrix(primary_dof_list[i], j);
// then use the algorithm from FullMatrix::gauss_jordan on this matrix
// to find out whether it is singular. the algorithm there does pivoting
}
}
// check whether the pivot is too small. if that is the case, then
- // the matrix is singular and we shouldn't use this set of master
+ // the matrix is singular and we shouldn't use this set of primary
// dofs
if (max < 1.e-12 * typical_diagonal_element)
return false;
tmp(j, j) = hr;
}
- // everything went fine, so we can accept this set of master dofs (at
+ // everything went fine, so we can accept this set of primary dofs (at
// least as far as they have already been collected)
return true;
}
* described by fe2 (for example for the complex case described
* in the @ref hp_paper "hp paper"), we have to select fe2.dofs_per_face
* out of the fe1.dofs_per_face face DoFs as the
- * master DoFs, and the rest become slave dofs. This function selects
- * which ones will be masters, and which ones will be slaves.
+ * primary dofs, and the rest become dependent dofs. This function selects
+ * which ones will be primary, and which ones will be dependents.
*
- * The function assumes that master_dofs already has size
+ * The function assumes that primary_dofs already has size
* fe1.dofs_per_face. After the function, exactly fe2.dofs_per_face
* entries will be true.
*
*/
template <int dim, int spacedim>
void
- select_master_dofs_for_face_restriction(
+ select_primary_dofs_for_face_restriction(
const FiniteElement<dim, spacedim> &fe1,
const FiniteElement<dim, spacedim> &fe2,
const FullMatrix<double> & face_interpolation_matrix,
- std::vector<bool> & master_dof_mask)
+ std::vector<bool> & primary_dof_mask)
{
Assert(fe1.dofs_per_face >= fe2.dofs_per_face, ExcInternalError());
- AssertDimension(master_dof_mask.size(), fe1.dofs_per_face);
+ AssertDimension(primary_dof_mask.size(), fe1.dofs_per_face);
Assert(fe2.dofs_per_vertex <= fe1.dofs_per_vertex, ExcInternalError());
Assert(fe2.dofs_per_line <= fe1.dofs_per_line, ExcInternalError());
ExcInternalError());
// the idea here is to designate as many DoFs in fe1 per object (vertex,
- // line, quad) as master as there are such dofs in fe2 (indices are int,
- // because we want to avoid the 'unsigned int < 0 is always false
+ // line, quad) as primary as there are such dofs in fe2 (indices are
+ // int, because we want to avoid the 'unsigned int < 0 is always false
// warning for the cases at the bottom in 1d and 2d)
//
// as mentioned in the paper, it is not always easy to find a set of
- // master dofs that produces an invertible matrix. to this end, we check
- // in each step whether the matrix is still invertible and simply
+ // primary dofs that produces an invertible matrix. to this end, we
+ // check in each step whether the matrix is still invertible and simply
// discard this dof if the matrix is not invertible anymore.
//
// the cases where we did have trouble in the past were with adding more
// the hp/crash_12 test that tests that we can do exactly this, and
// failed before we had code to compensate for this case). the other
// case are system elements: if we have say a Q1Q2 vs a Q2Q3 element,
- // then we can't just take all master dofs on a line from a single base
+ // then we can't just take all primary dofs on a line from a single base
// element, since the shape functions of that base element are
// independent of that of the other one. this latter case shows up when
// running hp/hp_constraints_q_system_06
- std::vector<types::global_dof_index> master_dof_list;
+ std::vector<types::global_dof_index> primary_dof_list;
unsigned int index = 0;
for (int v = 0;
v < static_cast<signed int>(GeometryInfo<dim>::vertices_per_face);
unsigned int i = 0;
while (dofs_added < fe2.dofs_per_vertex)
{
- // make sure that we were able to find a set of master dofs and
+ // make sure that we were able to find a set of primary dofs and
// that the code down below didn't just reject all our efforts
Assert(i < fe1.dofs_per_vertex, ExcInternalError());
// tentatively push this vertex dof
- master_dof_list.push_back(index + i);
+ primary_dof_list.push_back(index + i);
// then see what happens. if it succeeds, fine
- if (check_master_dof_list(face_interpolation_matrix,
- master_dof_list) == true)
+ if (check_primary_dof_list(face_interpolation_matrix,
+ primary_dof_list) == true)
++dofs_added;
else
// well, it didn't. simply pop that dof from the list again
// and try with the next dof
- master_dof_list.pop_back();
+ primary_dof_list.pop_back();
// forward counter by one
++i;
{
Assert(i < fe1.dofs_per_line, ExcInternalError());
- master_dof_list.push_back(index + i);
- if (check_master_dof_list(face_interpolation_matrix,
- master_dof_list) == true)
+ primary_dof_list.push_back(index + i);
+ if (check_primary_dof_list(face_interpolation_matrix,
+ primary_dof_list) == true)
++dofs_added;
else
- master_dof_list.pop_back();
+ primary_dof_list.pop_back();
++i;
}
{
Assert(i < fe1.dofs_per_quad, ExcInternalError());
- master_dof_list.push_back(index + i);
- if (check_master_dof_list(face_interpolation_matrix,
- master_dof_list) == true)
+ primary_dof_list.push_back(index + i);
+ if (check_primary_dof_list(face_interpolation_matrix,
+ primary_dof_list) == true)
++dofs_added;
else
- master_dof_list.pop_back();
+ primary_dof_list.pop_back();
++i;
}
}
AssertDimension(index, fe1.dofs_per_face);
- AssertDimension(master_dof_list.size(), fe2.dofs_per_face);
+ AssertDimension(primary_dof_list.size(), fe2.dofs_per_face);
// finally copy the list into the mask
- std::fill(master_dof_mask.begin(), master_dof_mask.end(), false);
- for (const auto dof : master_dof_list)
- master_dof_mask[dof] = true;
+ std::fill(primary_dof_mask.begin(), primary_dof_mask.end(), false);
+ for (const auto dof : primary_dof_list)
+ primary_dof_mask[dof] = true;
}
/**
* Make sure that the mask exists that determines which dofs will be the
- * masters on refined faces where an fe1 and a fe2 meet.
+ * primary on refined faces where an fe1 and a fe2 meet.
*/
template <int dim, int spacedim>
void
- ensure_existence_of_master_dof_mask(
+ ensure_existence_of_primary_dof_mask(
const FiniteElement<dim, spacedim> &fe1,
const FiniteElement<dim, spacedim> &fe2,
const FullMatrix<double> & face_interpolation_matrix,
- std::unique_ptr<std::vector<bool>> &master_dof_mask)
+ std::unique_ptr<std::vector<bool>> &primary_dof_mask)
{
- if (master_dof_mask == nullptr)
+ if (primary_dof_mask == nullptr)
{
- master_dof_mask =
+ primary_dof_mask =
std::make_unique<std::vector<bool>>(fe1.dofs_per_face);
- select_master_dofs_for_face_restriction(fe1,
- fe2,
- face_interpolation_matrix,
- *master_dof_mask);
+ select_primary_dofs_for_face_restriction(fe1,
+ fe2,
+ face_interpolation_matrix,
+ *primary_dof_mask);
}
}
/**
* Given the face interpolation matrix between two elements, split it into
- * its master and slave parts and invert the master part as
+ * its primary and dependent parts and invert the primary part as
* explained in the @ref hp_paper "hp paper".
*/
void
ensure_existence_of_split_face_matrix(
const FullMatrix<double> &face_interpolation_matrix,
- const std::vector<bool> & master_dof_mask,
+ const std::vector<bool> & primary_dof_mask,
std::unique_ptr<std::pair<FullMatrix<double>, FullMatrix<double>>>
&split_matrix)
{
- AssertDimension(master_dof_mask.size(), face_interpolation_matrix.m());
- Assert(std::count(master_dof_mask.begin(),
- master_dof_mask.end(),
+ AssertDimension(primary_dof_mask.size(), face_interpolation_matrix.m());
+ Assert(std::count(primary_dof_mask.begin(),
+ primary_dof_mask.end(),
true) ==
static_cast<signed int>(face_interpolation_matrix.n()),
ExcInternalError());
split_matrix = std::make_unique<
std::pair<FullMatrix<double>, FullMatrix<double>>>();
- const unsigned int n_master_dofs = face_interpolation_matrix.n();
- const unsigned int n_dofs = face_interpolation_matrix.m();
+ const unsigned int n_primary_dofs = face_interpolation_matrix.n();
+ const unsigned int n_dofs = face_interpolation_matrix.m();
- Assert(n_master_dofs <= n_dofs, ExcInternalError());
+ Assert(n_primary_dofs <= n_dofs, ExcInternalError());
- // copy and invert the master component, copy the slave component
- split_matrix->first.reinit(n_master_dofs, n_master_dofs);
- split_matrix->second.reinit(n_dofs - n_master_dofs, n_master_dofs);
+ // copy and invert the primary component, copy the dependent
+ // component
+ split_matrix->first.reinit(n_primary_dofs, n_primary_dofs);
+ split_matrix->second.reinit(n_dofs - n_primary_dofs,
+ n_primary_dofs);
- unsigned int nth_master_dof = 0, nth_slave_dof = 0;
+ unsigned int nth_primary_dof = 0, nth_dependent_dof = 0;
for (unsigned int i = 0; i < n_dofs; ++i)
- if (master_dof_mask[i] == true)
+ if (primary_dof_mask[i] == true)
{
- for (unsigned int j = 0; j < n_master_dofs; ++j)
- split_matrix->first(nth_master_dof, j) =
+ for (unsigned int j = 0; j < n_primary_dofs; ++j)
+ split_matrix->first(nth_primary_dof, j) =
face_interpolation_matrix(i, j);
- ++nth_master_dof;
+ ++nth_primary_dof;
}
else
{
- for (unsigned int j = 0; j < n_master_dofs; ++j)
- split_matrix->second(nth_slave_dof, j) =
+ for (unsigned int j = 0; j < n_primary_dofs; ++j)
+ split_matrix->second(nth_dependent_dof, j) =
face_interpolation_matrix(i, j);
- ++nth_slave_dof;
+ ++nth_dependent_dof;
}
- AssertDimension(nth_master_dof, n_master_dofs);
- AssertDimension(nth_slave_dof, n_dofs - n_master_dofs);
+ AssertDimension(nth_primary_dof, n_primary_dofs);
+ AssertDimension(nth_dependent_dof, n_dofs - n_primary_dofs);
// TODO[WB]: We should make sure very small entries are removed
// after inversion
template <typename number1, typename number2>
void
filter_constraints(
- const std::vector<types::global_dof_index> &master_dofs,
- const std::vector<types::global_dof_index> &slave_dofs,
+ const std::vector<types::global_dof_index> &primary_dofs,
+ const std::vector<types::global_dof_index> &dependent_dofs,
const FullMatrix<number1> & face_constraints,
AffineConstraints<number2> & constraints)
{
- Assert(face_constraints.n() == master_dofs.size(),
- ExcDimensionMismatch(master_dofs.size(), face_constraints.n()));
- Assert(face_constraints.m() == slave_dofs.size(),
- ExcDimensionMismatch(slave_dofs.size(), face_constraints.m()));
+ Assert(face_constraints.n() == primary_dofs.size(),
+ ExcDimensionMismatch(primary_dofs.size(), face_constraints.n()));
+ Assert(face_constraints.m() == dependent_dofs.size(),
+ ExcDimensionMismatch(dependent_dofs.size(),
+ face_constraints.m()));
- const unsigned int n_master_dofs = master_dofs.size();
- const unsigned int n_slave_dofs = slave_dofs.size();
+ const unsigned int n_primary_dofs = primary_dofs.size();
+ const unsigned int n_dependent_dofs = dependent_dofs.size();
// check for a couple conditions that happened in parallel distributed
// mode
- for (unsigned int row = 0; row != n_slave_dofs; ++row)
- Assert(slave_dofs[row] != numbers::invalid_dof_index,
+ for (unsigned int row = 0; row != n_dependent_dofs; ++row)
+ Assert(dependent_dofs[row] != numbers::invalid_dof_index,
ExcInternalError());
- for (unsigned int col = 0; col != n_master_dofs; ++col)
- Assert(master_dofs[col] != numbers::invalid_dof_index,
+ for (unsigned int col = 0; col != n_primary_dofs; ++col)
+ Assert(primary_dofs[col] != numbers::invalid_dof_index,
ExcInternalError());
- for (unsigned int row = 0; row != n_slave_dofs; ++row)
- if (constraints.is_constrained(slave_dofs[row]) == false)
+ for (unsigned int row = 0; row != n_dependent_dofs; ++row)
+ if (constraints.is_constrained(dependent_dofs[row]) == false)
{
bool constraint_already_satisfied = false;
// Check if we have an identity constraint, which is already
// satisfied by unification of the corresponding global dof
// indices
- for (unsigned int i = 0; i < n_master_dofs; ++i)
+ for (unsigned int i = 0; i < n_primary_dofs; ++i)
if (face_constraints(row, i) == 1.0)
- if (master_dofs[i] == slave_dofs[row])
+ if (primary_dofs[i] == dependent_dofs[row])
{
constraint_already_satisfied = true;
break;
// add up the absolute values of all constraints in this line
// to get a measure of their absolute size
number1 abs_sum = 0;
- for (unsigned int i = 0; i < n_master_dofs; ++i)
+ for (unsigned int i = 0; i < n_primary_dofs; ++i)
abs_sum += std::abs(face_constraints(row, i));
// then enter those constraints that are larger than
// those constraints in here will only lead to problems
// because it makes sparsity patterns fuller than necessary
// without producing any significant effect
- constraints.add_line(slave_dofs[row]);
- for (unsigned int i = 0; i < n_master_dofs; ++i)
+ constraints.add_line(dependent_dofs[row]);
+ for (unsigned int i = 0; i < n_primary_dofs; ++i)
if ((face_constraints(row, i) != 0) &&
(std::fabs(face_constraints(row, i)) >=
1e-14 * abs_sum))
- constraints.add_entry(slave_dofs[row],
- master_dofs[i],
+ constraints.add_entry(dependent_dofs[row],
+ primary_dofs[i],
face_constraints(row, i));
- constraints.set_inhomogeneity(slave_dofs[row], 0.);
+ constraints.set_inhomogeneity(dependent_dofs[row], 0.);
}
}
}
// resized down below to avoid permanent re-allocation of memory
FullMatrix<double> constraint_matrix;
- // similarly have arrays that will hold master and slave dof numbers, as
- // well as a scratch array needed for the complicated case below
- std::vector<types::global_dof_index> master_dofs;
- std::vector<types::global_dof_index> slave_dofs;
+ // similarly have arrays that will hold primary and dependent dof numbers,
+ // as well as a scratch array needed for the complicated case below
+ std::vector<types::global_dof_index> primary_dofs;
+ std::vector<types::global_dof_index> dependent_dofs;
std::vector<types::global_dof_index> scratch_dofs;
// caches for the face and subface interpolation matrices between
GeometryInfo<dim>::max_children_per_face);
// similarly have a cache for the matrices that are split into their
- // master and slave parts, and for which the master part is inverted.
- // these two matrices are derived from the face interpolation matrix
+ // primary and dependent parts, and for which the primary part is
+ // inverted. these two matrices are derived from the face interpolation
+ // matrix
// as described in the @ref hp_paper "hp paper"
Table<2,
std::unique_ptr<std::pair<FullMatrix<double>, FullMatrix<double>>>>
// finally, for each pair of finite elements, have a mask that states
// which of the degrees of freedom on the coarse side of a refined face
- // will act as master dofs.
- Table<2, std::unique_ptr<std::vector<bool>>> master_dof_masks(
+ // will act as primary dofs.
+ Table<2, std::unique_ptr<std::vector<bool>>> primary_dof_masks(
n_finite_elements(dof_handler), n_finite_elements(dof_handler));
// loop over all faces
//
// so we are going to constrain the DoFs on the face
// children against the DoFs on the face itself
- master_dofs.resize(cell->get_fe().dofs_per_face);
+ primary_dofs.resize(cell->get_fe().dofs_per_face);
cell->face(face)->get_dof_indices(
- master_dofs, cell->active_fe_index());
+ primary_dofs, cell->active_fe_index());
// Now create constraints for the subfaces and
// assemble it. ignore all interfaces with artificial
// Same procedure as for the mother cell. Extract
// the face DoFs from the cell DoFs.
- slave_dofs.resize(
+ dependent_dofs.resize(
subface->get_fe(subface_fe_index).dofs_per_face);
- subface->get_dof_indices(slave_dofs,
+ subface->get_dof_indices(dependent_dofs,
subface_fe_index);
- for (const types::global_dof_index slave_dof :
- slave_dofs)
+ for (const types::global_dof_index dependent_dof :
+ dependent_dofs)
{
- (void)slave_dof;
- Assert(slave_dof != numbers::invalid_dof_index,
+ (void)dependent_dof;
+ Assert(dependent_dof !=
+ numbers::invalid_dof_index,
ExcInternalError());
}
// Add constraints to global AffineConstraints
// object.
- filter_constraints(master_dofs,
- slave_dofs,
+ filter_constraints(primary_dofs,
+ dependent_dofs,
*(subface_interpolation_matrices
[cell->active_fe_index()]
[subface_fe_index][c]),
face_interpolation_matrices[dominating_fe_index]
[cell->active_fe_index()]);
- // split this matrix into master and slave components.
- // invert the master component
- ensure_existence_of_master_dof_mask(
+ // split this matrix into primary and dependent
+ // components. invert the primary component
+ ensure_existence_of_primary_dof_mask(
cell->get_fe(),
dominating_fe,
(*face_interpolation_matrices
[dominating_fe_index][cell->active_fe_index()]),
- master_dof_masks[dominating_fe_index]
- [cell->active_fe_index()]);
+ primary_dof_masks[dominating_fe_index]
+ [cell->active_fe_index()]);
ensure_existence_of_split_face_matrix(
*face_interpolation_matrices[dominating_fe_index]
[cell->active_fe_index()],
- (*master_dof_masks[dominating_fe_index]
- [cell->active_fe_index()]),
+ (*primary_dof_masks[dominating_fe_index]
+ [cell->active_fe_index()]),
split_face_interpolation_matrices
[dominating_fe_index][cell->active_fe_index()]);
const FullMatrix<double>
- &restrict_mother_to_virtual_master_inv =
+ &restrict_mother_to_virtual_primary_inv =
(split_face_interpolation_matrices
[dominating_fe_index][cell->active_fe_index()]
->first);
const FullMatrix<double>
- &restrict_mother_to_virtual_slave =
+ &restrict_mother_to_virtual_dependent =
(split_face_interpolation_matrices
[dominating_fe_index][cell->active_fe_index()]
->second);
// now compute the constraint matrix as the product
- // between the inverse matrix and the slave part
+ // between the inverse matrix and the dependent part
constraint_matrix.reinit(cell->get_fe().dofs_per_face -
dominating_fe.dofs_per_face,
dominating_fe.dofs_per_face);
- restrict_mother_to_virtual_slave.mmult(
+ restrict_mother_to_virtual_dependent.mmult(
constraint_matrix,
- restrict_mother_to_virtual_master_inv);
+ restrict_mother_to_virtual_primary_inv);
- // then figure out the global numbers of master and
- // slave dofs and apply constraints
+ // then figure out the global numbers of primary and
+ // dependent dofs and apply constraints
scratch_dofs.resize(cell->get_fe().dofs_per_face);
cell->face(face)->get_dof_indices(
scratch_dofs, cell->active_fe_index());
- // split dofs into master and slave components
- master_dofs.clear();
- slave_dofs.clear();
+ // split dofs into primary and dependent components
+ primary_dofs.clear();
+ dependent_dofs.clear();
for (unsigned int i = 0;
i < cell->get_fe().dofs_per_face;
++i)
- if ((*master_dof_masks[dominating_fe_index]
- [cell->active_fe_index()])[i] ==
+ if ((*primary_dof_masks[dominating_fe_index]
+ [cell
+ ->active_fe_index()])[i] ==
true)
- master_dofs.push_back(scratch_dofs[i]);
+ primary_dofs.push_back(scratch_dofs[i]);
else
- slave_dofs.push_back(scratch_dofs[i]);
+ dependent_dofs.push_back(scratch_dofs[i]);
- AssertDimension(master_dofs.size(),
+ AssertDimension(primary_dofs.size(),
dominating_fe.dofs_per_face);
- AssertDimension(slave_dofs.size(),
+ AssertDimension(dependent_dofs.size(),
cell->get_fe().dofs_per_face -
dominating_fe.dofs_per_face);
- filter_constraints(master_dofs,
- slave_dofs,
+ filter_constraints(primary_dofs,
+ dependent_dofs,
constraint_matrix,
constraints);
restrict_subface_to_virtual.mmult(
constraint_matrix,
- restrict_mother_to_virtual_master_inv);
+ restrict_mother_to_virtual_primary_inv);
- slave_dofs.resize(subface_fe.dofs_per_face);
+ dependent_dofs.resize(subface_fe.dofs_per_face);
cell->face(face)->child(sf)->get_dof_indices(
- slave_dofs, subface_fe_index);
+ dependent_dofs, subface_fe_index);
- filter_constraints(master_dofs,
- slave_dofs,
+ filter_constraints(primary_dofs,
+ dependent_dofs,
constraint_matrix,
constraints);
} // loop over subfaces
{
// Get DoFs on dominating and dominated side of the
// face
- master_dofs.resize(cell->get_fe().dofs_per_face);
+ primary_dofs.resize(cell->get_fe().dofs_per_face);
cell->face(face)->get_dof_indices(
- master_dofs, cell->active_fe_index());
+ primary_dofs, cell->active_fe_index());
- // break if the n_master_dofs == 0, because we are
+ // break if the n_primary_dofs == 0, because we are
// attempting to constrain to an element that has no
// face dofs
- if (master_dofs.size() == 0)
+ if (primary_dofs.size() == 0)
break;
- slave_dofs.resize(neighbor->get_fe().dofs_per_face);
+ dependent_dofs.resize(
+ neighbor->get_fe().dofs_per_face);
cell->face(face)->get_dof_indices(
- slave_dofs, neighbor->active_fe_index());
+ dependent_dofs, neighbor->active_fe_index());
// make sure the element constraints for this face
// are available
// Add constraints to global constraint matrix.
filter_constraints(
- master_dofs,
- slave_dofs,
+ primary_dofs,
+ dependent_dofs,
*(face_interpolation_matrices
[cell->active_fe_index()]
[neighbor->active_fe_index()]),
// FEs to that one. More precisely, we follow the
// strategy outlined on page 17 of the hp paper:
// First we find the dominant FE space S. Then we
- // divide our dofs in master and slave such that
- // I^{face,master}_{S^{face}->S} is invertible. And
- // finally constrain slave dofs to master dofs based
- // on the interpolation matrix.
+ // divide our dofs in primary and dependent such
+ // that I^{face,primary}_{S^{face}->S} is
+ // invertible. And finally constrain dependent dofs
+ // to primary dofs based on the interpolation
+ // matrix.
const unsigned int this_fe_index =
cell->active_fe_index();
face_interpolation_matrices
[dominating_fe_index][cell->active_fe_index()]);
- // split this matrix into master and slave
- // components. invert the master component
- ensure_existence_of_master_dof_mask(
+ // split this matrix into primary and dependent
+ // components. invert the primary component
+ ensure_existence_of_primary_dof_mask(
cell->get_fe(),
dominating_fe,
(*face_interpolation_matrices
[dominating_fe_index]
[cell->active_fe_index()]),
- master_dof_masks[dominating_fe_index]
- [cell->active_fe_index()]);
+ primary_dof_masks[dominating_fe_index]
+ [cell->active_fe_index()]);
ensure_existence_of_split_face_matrix(
*face_interpolation_matrices
[dominating_fe_index][cell->active_fe_index()],
- (*master_dof_masks[dominating_fe_index]
- [cell->active_fe_index()]),
+ (*primary_dof_masks[dominating_fe_index]
+ [cell->active_fe_index()]),
split_face_interpolation_matrices
[dominating_fe_index][cell->active_fe_index()]);
const FullMatrix<
- double> &restrict_mother_to_virtual_master_inv =
+ double> &restrict_mother_to_virtual_primary_inv =
(split_face_interpolation_matrices
[dominating_fe_index][cell->active_fe_index()]
->first);
const FullMatrix<
- double> &restrict_mother_to_virtual_slave =
+ double> &restrict_mother_to_virtual_dependent =
(split_face_interpolation_matrices
[dominating_fe_index][cell->active_fe_index()]
->second);
// now compute the constraint matrix as the product
- // between the inverse matrix and the slave part
+ // between the inverse matrix and the dependent part
constraint_matrix.reinit(
cell->get_fe().dofs_per_face -
dominating_fe.dofs_per_face,
dominating_fe.dofs_per_face);
- restrict_mother_to_virtual_slave.mmult(
+ restrict_mother_to_virtual_dependent.mmult(
constraint_matrix,
- restrict_mother_to_virtual_master_inv);
+ restrict_mother_to_virtual_primary_inv);
- // then figure out the global numbers of master and
- // slave dofs and apply constraints
+ // then figure out the global numbers of primary and
+ // dependent dofs and apply constraints
scratch_dofs.resize(cell->get_fe().dofs_per_face);
cell->face(face)->get_dof_indices(
scratch_dofs, cell->active_fe_index());
- // split dofs into master and slave components
- master_dofs.clear();
- slave_dofs.clear();
+ // split dofs into primary and dependent components
+ primary_dofs.clear();
+ dependent_dofs.clear();
for (unsigned int i = 0;
i < cell->get_fe().dofs_per_face;
++i)
- if ((*master_dof_masks[dominating_fe_index]
- [cell->active_fe_index()])
+ if ((*primary_dof_masks[dominating_fe_index]
+ [cell->active_fe_index()])
[i] == true)
- master_dofs.push_back(scratch_dofs[i]);
+ primary_dofs.push_back(scratch_dofs[i]);
else
- slave_dofs.push_back(scratch_dofs[i]);
+ dependent_dofs.push_back(scratch_dofs[i]);
- AssertDimension(master_dofs.size(),
+ AssertDimension(primary_dofs.size(),
dominating_fe.dofs_per_face);
- AssertDimension(slave_dofs.size(),
+ AssertDimension(dependent_dofs.size(),
cell->get_fe().dofs_per_face -
dominating_fe.dofs_per_face);
- filter_constraints(master_dofs,
- slave_dofs,
+ filter_constraints(primary_dofs,
+ dependent_dofs,
constraint_matrix,
constraints);
restrict_secondface_to_virtual.mmult(
constraint_matrix,
- restrict_mother_to_virtual_master_inv);
+ restrict_mother_to_virtual_primary_inv);
- slave_dofs.resize(neighbor->get_fe().dofs_per_face);
+ dependent_dofs.resize(
+ neighbor->get_fe().dofs_per_face);
cell->face(face)->get_dof_indices(
- slave_dofs, neighbor->active_fe_index());
+ dependent_dofs, neighbor->active_fe_index());
- filter_constraints(master_dofs,
- slave_dofs,
+ filter_constraints(primary_dofs,
+ dependent_dofs,
constraint_matrix,
constraints);
// The matrix @p{dofs_cell} contains the
// values of the linear functionals of
- // the master 1d cell applied to the
+ // the parent 1d cell applied to the
// shape functions of the two 1d subcells.
// The matrix @p{dofs_subcell} contains
// the values of the linear functionals
// on each 1d subcell applied to the
- // shape functions on the master 1d
+ // shape functions on the parent 1d
// subcell.
// We use @p{dofs_cell} and
// @p{dofs_subcell} to compute the
// the embedding matrix.
//
// i loops over the dofs in the
- // master cell. These are the
+ // parent cell. These are the
// columns in the embedding matrix.
for (unsigned int j = 0; j < this->dofs_per_cell; ++j)
for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
".proc" + Utilities::int_to_string(i, 4) +
".vtu");
- const std::string pvtu_master_filename =
+ const std::string pvtu_filename =
(filename_without_extension + ".pvtu");
- std::ofstream pvtu_master(pvtu_master_filename.c_str());
+ std::ofstream pvtu_output(pvtu_filename.c_str());
DataOut<dim, DoFHandler<dim, spacedim>> data_out;
data_out.attach_triangulation(*tr);
data_out.build_patches();
- data_out.write_pvtu_record(pvtu_master, filenames);
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
}
// logger returns a `linop`, it is necessary to convert it to a Dense
// matrix. Additionally, if the logger is logging on the gpu, it is
// necessary to copy the data to the host and hence the
- // `residual_norm_d_master`
+ // `residual_norm_d_parent`
auto residual_norm = convergence_logger->get_residual_norm();
auto residual_norm_d =
gko::as<gko::matrix::Dense<ValueType>>(residual_norm);
- auto residual_norm_d_master =
+ auto residual_norm_d_parent =
gko::matrix::Dense<ValueType>::create(executor->get_master(),
gko::dim<2>{1, 1});
- residual_norm_d_master->copy_from(residual_norm_d);
+ residual_norm_d_parent->copy_from(residual_norm_d);
// Get the number of iterations taken to converge to the solution.
auto num_iteration = convergence_logger->get_num_iterations();
Assert(b_norm.get()->at(0, 0) != 0.0, ExcDivideByZero());
// Pass the number of iterations and residual norm to the solver_control
- // object. As both `residual_norm_d_master` and `b_norm` are seen as Dense
+ // object. As both `residual_norm_d_parent` and `b_norm` are seen as Dense
// matrices, we use the `at` function to get the first value here. In case
// of multiple right hand sides, this will need to be modified.
const SolverControl::State state =
solver_control.check(num_iteration,
- residual_norm_d_master->at(0, 0) / b_norm->at(0, 0));
+ residual_norm_d_parent->at(0, 0) / b_norm->at(0, 0));
// in case of failure: throw exception
if (state != SolverControl::success)
filenames.push_back("output_" + Utilities::int_to_string(dim) + "d.vtu");
/*
- std::ofstream master_output("output_" + Utilities::int_to_string(dim) +
- "d.pvtu"); data_out.write_pvtu_record(master_output, filenames);
+ std::ofstream pvtu_output("output_" + Utilities::int_to_string(dim) +
+ "d.pvtu"); data_out.write_pvtu_record(pvtu_output, filenames);
std::ofstream out(filenames[0]);
data_out.write_vtu(out);
// ---------------------------------------------------------------------
-// write the pvd master record for parallel visualization through the
+// write the pvd primary record for parallel visualization through the
// vtu file format
#include <deal.II/base/data_out_base.h>
// ---------------------------------------------------------------------
-// write the pvtu master record for parallel visualization through the
+// write the pvtu primary record for parallel visualization through the
// vtu file format
#include <deal.II/base/data_out_base.h>
filenames.push_back(output_tag + ".slot-" +
Utilities::int_to_string(i, 4) + ".vtu");
}
- std::ofstream master_output((output_tag + ".pvtu").c_str());
- data_out.write_pvtu_record(master_output, filenames);
+ std::ofstream pvtu_output((output_tag + ".pvtu").c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
#else
(void)counter;
filenames.push_back(output_tag + ".slot-" +
Utilities::int_to_string(i, 4) + ".vtu");
}
- std::ofstream master_output((output_tag + ".pvtu").c_str());
- data_out.write_pvtu_record(master_output, filenames);
+ std::ofstream pvtu_output((output_tag + ".pvtu").c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
#else
(void)counter;
++i)
filenames.push_back(output_name(flag, i));
- const std::string master_name =
+ const std::string pvtu_filename =
"output" + Utilities::int_to_string(flag) + ".pvtu";
- std::ofstream pvtu_master(master_name.c_str());
- data_out.write_pvtu_record(pvtu_master, filenames);
+ std::ofstream pvtu_output(pvtu_filename.c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
}
++i)
filenames.push_back(output_name(i));
- const std::string master_name = "output.pvtu";
- std::ofstream pvtu_master(master_name.c_str());
- data_out.write_pvtu_record(pvtu_master, filenames);
+ const std::string pvtu_filename = "output.pvtu";
+ std::ofstream pvtu_output(pvtu_filename.c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
}
}
// interpolation matrices from lower to higher order elements. This
// consequently led to a situation where
// DoFTools::make_hanging_node_constraints got into trouble because it could
-// not find a master DoF for one particular slave DoF.
+// not find a primary DoF for one particular dependent DoF.
char logname[] = "output";
// Create the TriangulationDescription::Description with
// create_description_from_triangulation_in_groups, i.e. by a set of
-// master processes.
+// parent processes.
#include <deal.II/base/mpi.h>
//
// this code in particular tests some compensating code in
// dof_tools.cc, where we have to make sure that we select a suitable
-// set of master dofs. this is mostly trivial in 2d and for most fe
+// set of primary dofs. this is mostly trivial in 2d and for most fe
// combinations in 3d as well. the exceptions are that it doesn't work
// as easily in 3d for the combinations Q4/Q3, Q5/Q3, and
// Q5/Q4. Higher order finite elements in 3d will probably only
++i)
filenames.push_back(filename_ + Utilities::int_to_string(loop, 2) +
"." + Utilities::int_to_string(i, 2) + ".vtu");
- const std::string pvtu_master_filename =
+ const std::string pvtu_filename =
(filename_ + Utilities::int_to_string(loop, 2) + ".pvtu");
- std::ofstream pvtu_master(pvtu_master_filename.c_str());
- data_out.write_pvtu_record(pvtu_master, filenames);
+ std::ofstream pvtu_output(pvtu_filename.c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
}
filenames.push_back(std::string("solution-") +
Utilities::int_to_string(refinement_cycle, 2) +
"." + Utilities::int_to_string(i, 2) + ".vtu");
- const std::string pvtu_master_filename =
+ const std::string pvtu_filename =
("solution-" + Utilities::int_to_string(refinement_cycle, 2) +
".pvtu");
- std::ofstream pvtu_master(pvtu_master_filename.c_str());
- data_out.write_pvtu_record(pvtu_master, filenames);
+ std::ofstream pvtu_output(pvtu_filename.c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
}
std::vector<std::string> filenames;
filenames.push_back("output.vtu");
{
- std::ofstream master("output.pvtu");
- data_out.write_pvtu_record(master, filenames);
+ std::ofstream pvtu_output("output.pvtu");
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
cat_file("output.vtu");
filenames.push_back("solution-" + Utilities::int_to_string(cycle, 2) +
"." + Utilities::int_to_string(i, 4) + ".vtu");
- std::ofstream master_output((filename + ".pvtu").c_str());
- data_out.write_pvtu_record(master_output, filenames);
+ std::ofstream pvtu_output((filename + ".pvtu").c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
}
filenames.push_back(std::string("solution-") +
Utilities::int_to_string(refinement_cycle, 2) +
"." + Utilities::int_to_string(i, 2) + ".vtu");
- const std::string pvtu_master_filename =
+ const std::string pvtu_filename =
("solution-" + Utilities::int_to_string(refinement_cycle, 2) +
".pvtu");
- std::ofstream pvtu_master(pvtu_master_filename.c_str());
- data_out.write_pvtu_record(pvtu_master, filenames);
+ std::ofstream pvtu_output(pvtu_filename.c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
}
filenames.push_back(std::string("solution-") +
Utilities::int_to_string(refinement_cycle, 2) +
"." + Utilities::int_to_string(i, 2) + ".vtu");
- const std::string pvtu_master_filename =
+ const std::string pvtu_filename =
("solution-" + Utilities::int_to_string(refinement_cycle, 2) +
".pvtu");
- std::ofstream pvtu_master(pvtu_master_filename.c_str());
- data_out.write_pvtu_record(pvtu_master, filenames);
+ std::ofstream pvtu_output(pvtu_filename.c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
}
filenames.emplace_back("solution-" + std::to_string(cycle) + "." +
std::to_string(i) + ".vtu");
- std::string master_name =
+ std::string pvtu_filename =
"solution-" + Utilities::to_string(cycle) + ".pvtu";
- std::ofstream master_output(master_name.c_str());
- data_out.write_pvtu_record(master_output, filenames);
+ std::ofstream pvtu_output(pvtu_filename.c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
if (dim == 2 && Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD) == 1)
filenames.push_back("solution-" +
Utilities::int_to_string(timestep_no, 4) + "." +
Utilities::int_to_string(i, 3) + ".vtu");
- const std::string visit_master_filename =
+ const std::string visit_filename =
("solution-" + Utilities::int_to_string(timestep_no, 4) + ".visit");
- std::ofstream visit_master(visit_master_filename.c_str());
- DataOutBase::write_visit_record(visit_master, filenames);
- const std::string pvtu_master_filename =
+ std::ofstream visit_output(visit_filename.c_str());
+ DataOutBase::write_visit_record(visit_output, filenames);
+
+ const std::string pvtu_filename =
("solution-" + Utilities::int_to_string(timestep_no, 4) + ".pvtu");
- std::ofstream pvtu_master(pvtu_master_filename.c_str());
- data_out.write_pvtu_record(pvtu_master, filenames);
+ std::ofstream pvtu_output(pvtu_filename.c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
static std::vector<std::pair<double, std::string>> times_and_names;
times_and_names.push_back(
- std::pair<double, std::string>(present_time, pvtu_master_filename));
+ std::pair<double, std::string>(present_time, pvtu_filename));
std::ofstream pvd_output("solution.pvd");
DataOutBase::write_pvd_record(pvd_output, times_and_names);
}
filenames.push_back("solution-" +
Utilities::int_to_string(timestep_no, 4) + "." +
Utilities::int_to_string(i, 3) + ".vtu");
- const std::string visit_master_filename =
+ const std::string visit_filename =
("solution-" + Utilities::int_to_string(timestep_no, 4) + ".visit");
- std::ofstream visit_master(visit_master_filename.c_str());
- DataOutBase::write_visit_record(visit_master, filenames);
- const std::string pvtu_master_filename =
+ std::ofstream visit_output(visit_filename.c_str());
+ DataOutBase::write_visit_record(visit_output, filenames);
+
+ const std::string pvtu_filename =
("solution-" + Utilities::int_to_string(timestep_no, 4) + ".pvtu");
- std::ofstream pvtu_master(pvtu_master_filename.c_str());
- data_out.write_pvtu_record(pvtu_master, filenames);
+ std::ofstream pvtu_output(pvtu_filename.c_str());
+ data_out.write_pvtu_record(pvtu_output, filenames);
static std::vector<std::pair<double, std::string>> times_and_names;
times_and_names.push_back(
- std::pair<double, std::string>(present_time, pvtu_master_filename));
+ std::pair<double, std::string>(present_time, pvtu_filename));
std::ofstream pvd_output("solution.pvd");
DataOutBase::write_pvd_record(pvd_output, times_and_names);
}
++i)
filenames.push_back("solution-" + Utilities::int_to_string(cycle, 2) +
"." + Utilities::int_to_string(i, 4) + ".vtu");
- std::ofstream master_output(
+ std::ofstream pvtu_output(
("solution-" + Utilities::int_to_string(cycle, 2) + ".pvtu").c_str());
- data_out.write_pvtu_record(master_output, filenames);
+ data_out.write_pvtu_record(pvtu_output, filenames);
}
}