* and any combination of that...
* @endcode
*
- * Optionally a matrix @p matrix along with an std::vector @p
- * first_vector_components can be specified that describes how DoFs on @p
- * face_1 should be modified prior to constraining to the DoFs of @p face_2.
- * Here, two declarations are possible: If the std::vector @p
- * first_vector_components is non empty the matrix is interpreted as a @p
- * dim $\times$ @p dim rotation matrix that is applied to all vector valued
- * blocks listed in @p first_vector_components of the FESystem. If @p
- * first_vector_components is empty the matrix is interpreted as an
+ * Optionally a matrix @p matrix along with an std::vector
+ * @p first_vector_components can be specified that describes how DoFs on
+ * @p face_1 should be modified prior to constraining to the DoFs of
+ * @p face_2. Here, two declarations are possible: If the std::vector
+ * @p first_vector_components is non empty the matrix is interpreted as a
+ * @p dim $\times$ @p dim rotation matrix that is applied to all vector
+ * valued blocks listed in @p first_vector_components of the FESystem. If
+ * @p first_vector_components is empty the matrix is interpreted as an
* interpolation matrix with size no_face_dofs $\times$ no_face_dofs.
*
* Detailed information can be found in the see
* @ref GlossPeriodicConstraints "Glossary entry on periodic boundary conditions".
*
- * @todo: Reference to soon be written example step and glossary article.
- *
- * @author Matthias Maier, 2012, 2014
+ * @author Matthias Maier, 2012 - 2015
*/
template<typename FaceIterator>
void
* @ref GlossPeriodicConstraints "Glossary entry on periodic boundary conditions"
* for further information.
*
- * @author Daniel Arndt, Matthias Maier, 2013, 2014
+ * @author Daniel Arndt, Matthias Maier, 2013 - 2015
*/
template<typename DH>
void
make_periodicity_constraints
(const std::vector<GridTools::PeriodicFacePair<typename DH::cell_iterator> >
- &periodic_faces,
- dealii::ConstraintMatrix &constraint_matrix,
- const ComponentMask &component_mask = ComponentMask());
+ &periodic_faces,
+ dealii::ConstraintMatrix &constraint_matrix,
+ const ComponentMask &component_mask = ComponentMask(),
+ const std::vector<unsigned int> &first_vector_components = std::vector<unsigned int>());
std::bitset<3> orientation;
/**
- * A matrix that describes how vector valued DoFs of the first face should
- * be modified prior to constraining to the DoFs of the second face. If
- * the std::vector first_vector_components is non empty the matrix is
- * interpreted as a @p dim $\times$ @p dim rotation matrix that is applied
- * to all vector valued blocks listed in @p first_vector_components of the
- * FESystem. If @p first_vector_components is empty the matrix is
- * interpreted as an interpolation matrix with size no_face_dofs $\times$
- * no_face_dofs. For more details see make_periodicity_constraints() and
- * the glossary
- * @ref GlossPeriodicConstraints "glossary entry on periodic conditions".
+ * A matrix that describes how vector valued DoFs of the first face
+ * should be modified prior to constraining to the DoFs of the second
+ * face. If the std::vector first_vector_components (supplied as a
+ * parameter to DofTools::make_periodicity_constraints()) is non empty
+ * the matrix is interpreted as a @p dim $\times$ @p dim rotation
+ * matrix that is applied to all vector valued blocks listed in @p
+ * first_vector_components of the FESystem. Alternatively, if @p
+ * first_vector_components is empty the matrix is interpreted as an
+ * interpolation matrix with size no_face_dofs $\times$ no_face_dofs.
+ * For more details see DoFTools::make_periodicity_constraints().
*/
FullMatrix<double> matrix;
-
- /**
- * A vector of unsigned ints pointing to the first components of all
- * vector valued blocks that should be rotated by matrix.
- */
- std::vector<unsigned int> first_vector_components;
};
/**
- * This function will collect periodic face pairs on the coarsest mesh level
- * of the given @p container (a Triangulation or DoFHandler) and add them to
- * the vector @p matched_pairs leaving the original contents intact.
+ * This function will collect periodic face pairs on the coarsest mesh
+ * level of the given @p container (a Triangulation or DoFHandler) and
+ * add them to the vector @p matched_pairs leaving the original contents
+ * intact.
*
* Define a 'first' boundary as all boundary faces having boundary_id @p
* b_id1 and a 'second' boundary consisting of all faces belonging to @p
* orthogonal_equality().
*
* The bitset that is returned inside of PeriodicFacePair encodes the
- * _relative_ orientation of the first face with respect to the second face,
- * see the documentation of orthogonal_equality() for further details.
+ * _relative_ orientation of the first face with respect to the second
+ * face, see the documentation of orthogonal_equality() for further
+ * details.
*
* The @p direction refers to the space direction in which periodicity is
* enforced.
*
* The @p offset is a vector tangential to the faces that is added to the
* location of vertices of the 'first' boundary when attempting to match
- * them to the corresponding vertices of the 'second' boundary. This can be
- * used to implement conditions such as $u(0,y)=u(1,y+1)$.
- *
- * Optionally a (dim x dim) rotation matrix @p matrix along with a vector @p
- * first_vector_components can be specified that describes how vector valued
- * DoFs of the first face should be modified prior to constraining to the
- * DoFs of the second face. If @p first_vector_components is non empty the
- * matrix is interpreted as a rotation matrix that is applied to all vector
- * valued blocks listed in @p first_vector_components of the FESystem. For
- * more details see make_periodicity_constraints() and the glossary
- * @ref GlossPeriodicConstraints "glossary entry on periodic conditions".
+ * them to the corresponding vertices of the 'second' boundary. This can
+ * be used to implement conditions such as $u(0,y)=u(1,y+1)$.
+ *
+ * Optionally a @p matrix can be specified that describes how vector
+ * valued DoFs of the first face should be modified prior to constraining
+ * to the DoFs of the second face. If the matrix has size
+ * $n\_face\_dofs\times n\_face\_dofs$, the periodicity constraints are
+ * applied as $dofs\_2 = matrix\cdot dofs\_1$. If the matrix has size
+ * $dim\times dim$, the matrix is interpreted as a rotation matrix for
+ * vector valued components.
+ * For more details see DoFTools::make_periodicity_constraints(), the
+ * glossary @ref GlossPeriodicConstraints "glossary entry on periodic
+ * conditions" and @ref step_45 "step-45".
*
* @tparam Container A type that satisfies the requirements of a mesh
* container (see
* periodicity algebraically.
*
* @note Because elements will be added to @p matched_pairs (and existing
- * entries will be preserved), it is possible to call this function several
- * times with different boundary ids to generate a vector with all periodic
- * pairs.
+ * entries will be preserved), it is possible to call this function
+ * several times with different boundary ids to generate a vector with
+ * all periodic pairs.
*
- * @author Daniel Arndt, Matthias Maier, 2013, 2014
+ * @author Daniel Arndt, Matthias Maier, 2013 - 2015
*/
template <typename CONTAINER>
void
const int direction,
std::vector<PeriodicFacePair<typename CONTAINER::cell_iterator> > &matched_pairs,
const Tensor<1,CONTAINER::space_dimension> &offset = dealii::Tensor<1,CONTAINER::space_dimension>(),
- const FullMatrix<double> &matrix = FullMatrix<double>(),
- const std::vector<unsigned int> &first_vector_components = std::vector<unsigned int>());
+ const FullMatrix<double> &matrix = FullMatrix<double>());
/**
const int direction,
std::vector<PeriodicFacePair<typename CONTAINER::cell_iterator> > &matched_pairs,
const dealii::Tensor<1,CONTAINER::space_dimension> &offset = dealii::Tensor<1,CONTAINER::space_dimension>(),
- const FullMatrix<double> &matrix = FullMatrix<double>(),
- const std::vector<unsigned int> &first_vector_components = std::vector<unsigned int>());
+ const FullMatrix<double> &matrix = FullMatrix<double>());
/*@}*/
/**
void
make_periodicity_constraints
(const std::vector<GridTools::PeriodicFacePair<typename DH::cell_iterator> >
- &periodic_faces,
- dealii::ConstraintMatrix &constraint_matrix,
- const ComponentMask &component_mask)
+ &periodic_faces,
+ dealii::ConstraintMatrix &constraint_matrix,
+ const ComponentMask &component_mask,
+ const std::vector<unsigned int> &first_vector_components)
{
typedef std::vector<GridTools::PeriodicFacePair<typename DH::cell_iterator> >
FaceVector;
it->orientation[1],
it->orientation[2],
it->matrix,
- it->first_vector_components);
+ first_vector_components);
}
}
template<typename DH>
void
- make_periodicity_constraints (const DH &dof_handler,
- const types::boundary_id b_id1,
- const types::boundary_id b_id2,
- const int direction,
- dealii::ConstraintMatrix &constraint_matrix,
- const ComponentMask &component_mask)
+ make_periodicity_constraints (const DH &dof_handler,
+ const types::boundary_id b_id1,
+ const types::boundary_id b_id2,
+ const int direction,
+ dealii::ConstraintMatrix &constraint_matrix,
+ const ComponentMask &component_mask)
{
static const int space_dim = DH::space_dimension;
(void)space_dim;
template<typename DH>
void
- make_periodicity_constraints (const DH &dof_handler,
- const types::boundary_id b_id,
- const int direction,
- dealii::ConstraintMatrix &constraint_matrix,
- const ComponentMask &component_mask)
+ make_periodicity_constraints (const DH &dof_handler,
+ const types::boundary_id b_id,
+ const int direction,
+ dealii::ConstraintMatrix &constraint_matrix,
+ const ComponentMask &component_mask)
{
static const int dim = DH::dimension;
static const int space_dim = DH::space_dimension;
DoFTools::make_periodicity_constraints<DH>
(const std::vector<GridTools::PeriodicFacePair<DH::cell_iterator> > &,
dealii::ConstraintMatrix &,
- const ComponentMask &);
+ const ComponentMask &,
+ const std::vector<unsigned int> &);
template
const int direction,
std::vector<PeriodicFacePair<CellIterator> > &matched_pairs,
const dealii::Tensor<1,CellIterator::AccessorType::space_dimension> &offset,
- const FullMatrix<double> &matrix,
- const std::vector<unsigned int> &first_vector_components)
+ const FullMatrix<double> &matrix)
{
static const int space_dim = CellIterator::AccessorType::space_dimension;
(void)space_dim;
{cell1, cell2},
{face_idx1, face_idx2},
orientation,
- matrix,
- first_vector_components
+ matrix
};
matched_pairs.push_back(matched_face);
pairs2.erase(it2);
const int direction,
std::vector<PeriodicFacePair<typename CONTAINER::cell_iterator> > &matched_pairs,
const Tensor<1,CONTAINER::space_dimension> &offset,
- const FullMatrix<double> &matrix,
- const std::vector<unsigned int> &first_vector_components)
+ const FullMatrix<double> &matrix)
{
static const int dim = CONTAINER::dimension;
static const int space_dim = CONTAINER::space_dimension;
ExcMessage ("Unmatched faces on periodic boundaries"));
// and call match_periodic_face_pairs that does the actual matching:
- match_periodic_face_pairs(pairs1, pairs2, direction, matched_pairs,
- offset, matrix, first_vector_components);
+ match_periodic_face_pairs(pairs1, pairs2, direction, matched_pairs, offset,
+ matrix);
}
const int direction,
std::vector<PeriodicFacePair<typename CONTAINER::cell_iterator> > &matched_pairs,
const Tensor<1,CONTAINER::space_dimension> &offset,
- const FullMatrix<double> &matrix,
- const std::vector<unsigned int> &first_vector_components)
+ const FullMatrix<double> &matrix)
{
static const int dim = CONTAINER::dimension;
static const int space_dim = CONTAINER::space_dimension;
#endif
// and call match_periodic_face_pairs that does the actual matching:
- match_periodic_face_pairs(pairs1, pairs2, direction, matched_pairs,
- offset, matrix, first_vector_components);
+ match_periodic_face_pairs(pairs1, pairs2, direction, matched_pairs, offset,
+ matrix);
#ifdef DEBUG
//check for standard orientation
template
unsigned int
find_closest_vertex (const X &,
- const Point<deal_II_space_dimension> &);
+ const Point<deal_II_space_dimension> &);
template
std::vector<dealii::internal::ActiveCellIterator<deal_II_dimension, deal_II_space_dimension, X>::type>
template
std::pair<dealii::internal::ActiveCellIterator<deal_II_dimension, deal_II_space_dimension, X>::type, Point<deal_II_dimension> >
find_active_cell_around_point (const Mapping<deal_II_dimension, deal_II_space_dimension> &,
- const X &,
- const Point<deal_II_space_dimension> &);
+ const X &,
+ const Point<deal_II_space_dimension> &);
template
std::list<std::pair<X::cell_iterator, X::cell_iterator> >
get_finest_common_cells (const X &mesh_1,
- const X &mesh_2);
+ const X &mesh_2);
template
bool
have_same_coarse_mesh (const X &mesh_1,
- const X &mesh_2);
+ const X &mesh_2);
\}
template
unsigned int
find_closest_vertex (const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &,
- const Point<deal_II_space_dimension> &);
+ const Point<deal_II_space_dimension> &);
template
std::vector<dealii::internal::ActiveCellIterator<deal_II_dimension, deal_II_space_dimension, parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension> >::type>
find_cells_adjacent_to_vertex(const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &,
- const unsigned int);
+ const unsigned int);
template
dealii::internal::ActiveCellIterator<deal_II_dimension, deal_II_space_dimension, parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension> >::type
find_active_cell_around_point (const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &,
- const Point<deal_II_space_dimension> &p);
+ const Point<deal_II_space_dimension> &p);
template
std::pair<dealii::internal::ActiveCellIterator<deal_II_dimension, deal_II_space_dimension, parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension> >::type, Point<deal_II_dimension> >
find_active_cell_around_point (const Mapping<deal_II_dimension, deal_II_space_dimension> &,
- const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &,
- const Point<deal_II_space_dimension> &);
+ const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &,
+ const Point<deal_II_space_dimension> &);
template
std::list<std::pair<parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension>::cell_iterator, parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension>::cell_iterator> >
get_finest_common_cells (const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &mesh_1,
- const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &mesh_2);
+ const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &mesh_2);
template
bool
have_same_coarse_mesh (const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &mesh_1,
- const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &mesh_2);
+ const parallel::distributed::Triangulation<deal_II_dimension,deal_II_space_dimension> &mesh_2);
\}
dealii::internal::ActiveCellIterator<deal_II_space_dimension, deal_II_space_dimension, parallel::distributed::Triangulation<deal_II_space_dimension, deal_II_space_dimension> >::type
find_active_cell_around_point (const parallel::distributed::Triangulation<deal_II_space_dimension> &,
- const Point<deal_II_space_dimension> &p);
+ const Point<deal_II_space_dimension> &p);
std::pair<dealii::internal::ActiveCellIterator<deal_II_space_dimension, deal_II_space_dimension, parallel::distributed::Triangulation<deal_II_space_dimension, deal_II_space_dimension> >::type, Point<deal_II_space_dimension> >
find_active_cell_around_point (const Mapping<deal_II_space_dimension> &,
- const parallel::distributed::Triangulation<deal_II_space_dimension> &,
- const Point<deal_II_space_dimension> &);
+ const parallel::distributed::Triangulation<deal_II_space_dimension> &,
+ const Point<deal_II_space_dimension> &);
}
template
void delete_unused_vertices (std::vector<Point<deal_II_space_dimension> > &,
- std::vector<CellData<deal_II_dimension> > &,
- SubCellData &);
+ std::vector<CellData<deal_II_dimension> > &,
+ SubCellData &);
template
void delete_duplicated_vertices (std::vector<Point<deal_II_space_dimension> > &,
- std::vector<CellData<deal_II_dimension> > &,
- SubCellData &,
- std::vector<unsigned int> &,
- double);
+ std::vector<CellData<deal_II_dimension> > &,
+ SubCellData &,
+ std::vector<unsigned int> &,
+ double);
template
void shift<deal_II_dimension> (const Tensor<1,deal_II_space_dimension> &,
- Triangulation<deal_II_dimension, deal_II_space_dimension> &);
+ Triangulation<deal_II_dimension, deal_II_space_dimension> &);
template
void scale<deal_II_dimension> (const double,
- Triangulation<deal_II_dimension, deal_II_space_dimension> &);
+ Triangulation<deal_II_dimension, deal_II_space_dimension> &);
template
void distort_random<deal_II_dimension> (const double,
- Triangulation<deal_II_dimension, deal_II_space_dimension> &,
- const bool);
+ Triangulation<deal_II_dimension, deal_II_space_dimension> &,
+ const bool);
template
void get_face_connectivity_of_cells
template
void partition_triangulation (const unsigned int,
- Triangulation<deal_II_dimension, deal_II_space_dimension> &);
+ Triangulation<deal_II_dimension, deal_II_space_dimension> &);
template
void partition_triangulation (const unsigned int,
- const SparsityPattern &,
- Triangulation<deal_II_dimension, deal_II_space_dimension> &);
+ const SparsityPattern &,
+ Triangulation<deal_II_dimension, deal_II_space_dimension> &);
template
std::pair<hp::DoFHandler<deal_II_dimension, deal_II_space_dimension>::active_cell_iterator,
- Point<deal_II_dimension> >
+ Point<deal_II_dimension> >
find_active_cell_around_point
(const hp::MappingCollection<deal_II_dimension, deal_II_space_dimension> &,
const hp::DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
template
void get_subdomain_association (const Triangulation<deal_II_dimension, deal_II_space_dimension> &,
- std::vector<types::subdomain_id> &);
+ std::vector<types::subdomain_id> &);
template
unsigned int count_cells_with_subdomain_association(
const int,
std::vector<PeriodicFacePair<X::cell_iterator> > &,
const Tensor<1,X::space_dimension> &,
- const FullMatrix<double> &,
- const std::vector<unsigned int> &);
+ const FullMatrix<double> &);
template
void collect_periodic_faces<X> (const X &,
const int,
std::vector<PeriodicFacePair<X::cell_iterator> > &,
const Tensor<1,X::space_dimension> &,
- const FullMatrix<double> &,
- const std::vector<unsigned int> &);
+ const FullMatrix<double> &);
#endif
const int,
std::vector<PeriodicFacePair<parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension>::cell_iterator> > &,
const Tensor<1,parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension>::space_dimension> &,
- const FullMatrix<double> &,
- const std::vector<unsigned int> &);
+ const FullMatrix<double> &);
template
void
const int,
std::vector<PeriodicFacePair<parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension>::cell_iterator> > &,
const Tensor<1,parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension>::space_dimension> &,
- const FullMatrix<double> &,
- const std::vector<unsigned int> &);
+ const FullMatrix<double> &);
\}
#endif
#endif