Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert some more places to 'subobject' instead of 'quad'. #15359

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions include/deal.II/dofs/dof_accessor.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -1083,11 +1083,11 @@ namespace internal
// correct (cell-local) ordering. The same applies, if the face_rotation
// or face_orientation is non-standard
if (structdim == 3 && fe.max_dofs_per_quad() > 0)
for (const auto quad : accessor.face_indices())
for (const auto face_no : accessor.face_indices())
{
const auto combined_orientation = TriaAccessorImplementation::
Implementation::combined_face_orientation(accessor, quad);
const unsigned int quad_index = accessor.quad_index(quad);
Implementation::combined_face_orientation(accessor, face_no);
const unsigned int quad_index = accessor.quad_index(face_no);
if (combined_orientation ==
ReferenceCell::default_combined_face_orientation())
dof_operation.process_dofs(
Expand All @@ -1108,10 +1108,10 @@ namespace internal
[&](const auto d) {
return fe.adjust_quad_dof_index_for_face_orientation(
d,
quad,
accessor.face_orientation(quad),
accessor.face_flip(quad),
accessor.face_rotation(quad));
face_no,
accessor.face_orientation(face_no),
accessor.face_flip(face_no),
accessor.face_rotation(face_no));
},
std::integral_constant<int, 2>(),
dof_indices_ptr,
Expand Down
20 changes: 10 additions & 10 deletions include/deal.II/dofs/dof_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ namespace parallel
*
* It is first used in the step-2 tutorial program.
*
* For each vertex, line, quad, etc, this class stores a list of the indices
* of degrees of freedom living on this object. These indices refer to the
* unconstrained degrees of freedom, i.e. constrained degrees of freedom are
* numbered in the same way as unconstrained ones, and are only later
* eliminated. This leads to the fact that indices in global vectors and
* matrices also refer to all degrees of freedom and some kind of condensation
* is needed to restrict the systems of equations to the unconstrained degrees
* of freedom only. The actual layout of storage of the indices is described
* in the dealii::internal::DoFHandlerImplementation::DoFLevel class
* documentation.
* For each 0d, 1d, 2d, and 3d subobject, this class stores a list of the
* indices of degrees of freedom defined on this DoFHandler. These indices
* refer to the unconstrained degrees of freedom, i.e. constrained degrees of
* freedom are numbered in the same way as unconstrained ones, and are only
* later eliminated. This leads to the fact that indices in global vectors
* and matrices also refer to all degrees of freedom and some kind of
* condensation is needed to restrict the systems of equations to the
* unconstrained degrees of freedom only. The actual layout of storage of the
* indices is described in the
* dealii::internal::DoFHandlerImplementation::DoFLevel class documentation.
*
* The class offers iterators to traverse all cells, in much the same way as
* the Triangulation class does. Using the begin() and end() functions (and
Expand Down
14 changes: 7 additions & 7 deletions include/deal.II/fe/fe_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ class FE_Enriched;
*
* <h3>Internal information on numbering of degrees of freedom</h3>
*
* The overall numbering of degrees of freedom is as follows: for each
* subobject (vertex, line, quad, or hex), the degrees of freedom are numbered
* such that we run over all subelements first, before turning for the next
* dof on this subobject or for the next subobject. For example, for an
* element of three components in one space dimension, the first two
* components being cubic lagrange elements and the third being a quadratic
* lagrange element, the ordering for the system <tt>s=(u,v,p)</tt> is:
* The overall numbering of degrees of freedom is as follows: for each 0d, 1d,
* 2d, or 3d subobject, the degrees of freedom are numbered such that we run
* over all subelements first, before turning for the next dof on this
* subobject or for the next subobject. For example, for an element of three
* components in one space dimension, the first two components being cubic
* lagrange elements and the third being a quadratic lagrange element, the
* ordering for the system <tt>s=(u,v,p)</tt> is:
*
* <ul>
* <li> First vertex: <tt>u0, v0, p0 = s0, s1, s2</tt>
Expand Down
21 changes: 11 additions & 10 deletions include/deal.II/grid/grid_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -4299,17 +4299,18 @@ namespace GridTools
project_to_d_linear_object(const Iterator & object,
const Point<spacedim> &trial_point)
{
// let's look at this for simplicity for a quad (structdim==2) in a
// space with spacedim>2 (notate trial_point by y): all points on the
// surface are given by
// let's look at this for simplicity for a quadrilateral
// (structdim==2) in a space with spacedim>2 (notate trial_point by
// y): all points on the surface are given by
// x(\xi) = sum_i v_i phi_x(\xi)
// where v_i are the vertices of the quad, and \xi=(\xi_1,\xi_2) are the
// reference coordinates of the quad. so what we are trying to do is
// find a point x on the surface that is closest to the point y. there
// are different ways to solve this problem, but in the end it's a
// nonlinear problem and we have to find reference coordinates \xi so
// that J(\xi) = 1/2 || x(\xi)-y ||^2 is minimal. x(\xi) is a function
// that is structdim-linear in \xi, so J(\xi) is a polynomial of degree
// where v_i are the vertices of the quadrilateral, and
// \xi=(\xi_1,\xi_2) are the reference coordinates of the
// quadrilateral. so what we are trying to do is find a point x on the
// surface that is closest to the point y. there are different ways to
// solve this problem, but in the end it's a nonlinear problem and we
// have to find reference coordinates \xi so that J(\xi) = 1/2 ||
// x(\xi)-y ||^2 is minimal. x(\xi) is a function that is
// structdim-linear in \xi, so J(\xi) is a polynomial of degree
// 2*structdim that we'd like to minimize. unless structdim==1, we'll
// have to use a Newton method to find the answer. This leads to the
// following formulation of Newton steps:
Expand Down
13 changes: 6 additions & 7 deletions include/deal.II/grid/tria.h
Original file line number Diff line number Diff line change
Expand Up @@ -781,15 +781,14 @@ namespace internal
*
* <h3>User flags and data</h3>
*
* A triangulation offers one bit per line, quad, etc for user flags. This
* field can be accessed as all other data using iterators. Normally, this
* user flag is used if an algorithm walks over all cells and needs
* information whether another cell, e.g. a neighbor, has already been
* processed. See
* @ref GlossUserFlags "the glossary for more information".
* A triangulation offers one bit per subobject for user flags. This field can
* be accessed as all other data using iterators. Normally, this user flag is
* used if an algorithm walks over all cells and needs information whether
* another cell, e.g. a neighbor, has already been processed. See @ref
* GlossUserFlags "the glossary for more information".
*
* There is another set of user data, which can be either an <tt>unsigned
* int</tt> or a <tt>void *</tt>, for each line, quad, etc. You can access
* int</tt> or a <tt>void *</tt>, for each subobject. You can access
* these through the functions listed under <tt>User data</tt> in the accessor
* classes. Again, see
* @ref GlossUserData "the glossary for more information".
Expand Down
26 changes: 14 additions & 12 deletions include/deal.II/grid/tria_accessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,9 @@ class TriaAccessorBase
public:
/**
* Dimension of the space the object represented by this accessor lives in.
* For example, if this accessor represents a quad that is part of a two-
* dimensional surface in four-dimensional space, then this value is four.
* For example, if this accessor represents a quadrilateral that is part of
* a two-dimensional surface in four-dimensional space, then this value is
* four.
*/
static constexpr unsigned int space_dimension = spacedim;

Expand All @@ -323,8 +324,8 @@ class TriaAccessorBase

/**
* Dimensionality of the current object represented by this accessor. For
* example, if it is line (irrespective of whether it is part of a quad or
* hex, and what dimension we are in), then this value equals 1.
* example, if it is line (irrespective of whether it is part of a 2d or 3d
* subobject), then this value equals 1.
*/
static const unsigned int structure_dimension = structdim;

Expand Down Expand Up @@ -574,8 +575,9 @@ class InvalidAccessor
public:
/**
* Dimension of the space the object represented by this accessor lives in.
* For example, if this accessor represents a quad that is part of a two-
* dimensional surface in four-dimensional space, then this value is four.
* For example, if this accessor represents a quadrilateral that is part of
* a two-dimensional surface in four-dimensional space, then this value is
* four.
*/
static constexpr unsigned int space_dimension = spacedim;

Expand All @@ -588,8 +590,8 @@ class InvalidAccessor

/**
* Dimensionality of the current object represented by this accessor. For
* example, if it is line (irrespective of whether it is part of a quad or
* hex, and what dimension we are in), then this value equals 1.
* example, if it is line (irrespective of whether it is part of a 2d or 3d
* subobject), then this value equals 1.
*/
static const unsigned int structure_dimension = structdim;

Expand Down Expand Up @@ -2341,8 +2343,8 @@ class TriaAccessor<0, 1, spacedim>

/**
* Dimensionality of the current object represented by this accessor. For
* example, if it is line (irrespective of whether it is part of a quad or
* hex, and what dimension we are in), then this value equals 1.
* example, if it is line (irrespective of whether it is part of a 2d or 3d
* subobject), then this value equals 1.
*/
static const unsigned int structure_dimension = 0;

Expand Down Expand Up @@ -3555,8 +3557,8 @@ class CellAccessor : public TriaAccessor<dim, dim, spacedim>
/**
* Return whether the cell is at the boundary. Being at the boundary is
* defined by one face being on the boundary. Note that this does not catch
* cases where only one vertex of a quad or of a hex is at the boundary, or
* where only one line of a hex is at the boundary while the interiors of
* cases where only one vertex of a 2d or 3d subobject is at the boundary,
* or where only one line of a hex is at the boundary while the interiors of
* all faces are in the interior of the domain. For the latter case, the @p
* has_boundary_lines function is the right one to ask.
*/
Expand Down
12 changes: 6 additions & 6 deletions source/grid/reference_cell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -851,15 +851,15 @@ namespace
}

/**
* Compute the nearest point on a quad (in the deal.II sense: i.e., something
* with structdim = 2 and spacedim = 3) and the square of that point's
* distance to @p p. Here, the quad is described with three vertices: either
* the three vertices of a Triangle or the first three of a Quadrilateral (as
* the fourth one can be computed, in that case, from the first three).
* Compute the nearest point on a 2d subobject (something with structdim = 2
* and spacedim = 3) and the square of that point's distance to @p p. Here,
* the subobject is described with three vertices: either the three vertices
* of a Triangle or the first three of a Quadrilateral (as the fourth one
* can be computed, in that case, from the first three).
*
* If the given point cannot be projected via a normal vector (i.e., if the
* line parallel to the normal vector intersecting @p p does not intersect the
* quad) then this function returns the origin and the largest double
* subobject) then this function returns the origin and the largest double
* precision number. distance_to_line_square() is in charge of computing the
* distance to lines.
*
Expand Down