// ------------------------------------------------------------------------ // // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2020 - 2025 by the deal.II authors // // This file is part of the deal.II library. // // Part of the source code is dual licensed under Apache-2.0 WITH // LLVM-exception OR LGPL-2.1-or-later. Detailed license information // governing the source code and code contributions can be found in // LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. // // ------------------------------------------------------------------------ #ifndef dealii_vector_tools_rhs_h #define dealii_vector_tools_rhs_h #include #include #include #include DEAL_II_NAMESPACE_OPEN template class AffineConstraints; template DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim)) class DoFHandler; template class Function; template class Mapping; template class Quadrature; namespace hp { template class MappingCollection; template class QCollection; } // namespace hp namespace VectorTools { /** * @name Assembling of right hand sides */ /** @{ */ /** * Create a right hand side vector. Prior content of the given @p rhs_vector * vector is deleted. * * See the general documentation of this namespace for further information. * * @dealiiConceptRequires{concepts::is_writable_dealii_vector_type} */ template DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type) void create_right_hand_side( const Mapping &mapping, const DoFHandler &dof, const Quadrature &q, const Function &rhs, VectorType &rhs_vector, const AffineConstraints &constraints = AffineConstraints()); /** * Call the create_right_hand_side() function, see above, with * mapping=MappingQ@(1). * * @dealiiConceptRequires{concepts::is_writable_dealii_vector_type} */ template DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type) void create_right_hand_side( const DoFHandler &dof, const Quadrature &q, const Function &rhs, VectorType &rhs_vector, const AffineConstraints &constraints = AffineConstraints()); /** * Like the previous set of functions, but for hp-objects. * * @dealiiConceptRequires{concepts::is_writable_dealii_vector_type} */ template DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type) void create_right_hand_side( const hp::MappingCollection &mapping, const DoFHandler &dof, const hp::QCollection &q, const Function &rhs, VectorType &rhs_vector, const AffineConstraints &constraints = AffineConstraints()); /** * Like the previous set of functions, but for hp-objects. * * @dealiiConceptRequires{concepts::is_writable_dealii_vector_type} */ template DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type) void create_right_hand_side( const DoFHandler &dof, const hp::QCollection &q, const Function &rhs, VectorType &rhs_vector, const AffineConstraints &constraints = AffineConstraints()); /** * Create a right hand side vector from boundary forces. Prior content of * the given @p rhs_vector vector is deleted. * * See the general documentation of this namespace for further information. * * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" * * @dealiiConceptRequires{concepts::is_writable_dealii_vector_type} */ template DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type) void create_boundary_right_hand_side( const Mapping &mapping, const DoFHandler &dof, const Quadrature &q, const Function &rhs, VectorType &rhs_vector, const std::set &boundary_ids = std::set()); /** * Call the create_boundary_right_hand_side() function, see above, with * mapping=MappingQ@(1). * * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" * * @dealiiConceptRequires{concepts::is_writable_dealii_vector_type} */ template DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type) void create_boundary_right_hand_side( const DoFHandler &dof, const Quadrature &q, const Function &rhs, VectorType &rhs_vector, const std::set &boundary_ids = std::set()); /** * Same as the set of functions above, but for hp-objects. * * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" * * @dealiiConceptRequires{concepts::is_writable_dealii_vector_type} */ template DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type) void create_boundary_right_hand_side( const hp::MappingCollection &mapping, const DoFHandler &dof, const hp::QCollection &q, const Function &rhs, VectorType &rhs_vector, const std::set &boundary_ids = std::set()); /** * Call the create_boundary_right_hand_side() function, see above, with a * single Q1 mapping as collection. This function therefore will only work * if the only active FE index in use is zero. * * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" * * @dealiiConceptRequires{concepts::is_writable_dealii_vector_type} */ template DEAL_II_CXX20_REQUIRES(concepts::is_writable_dealii_vector_type) void create_boundary_right_hand_side( const DoFHandler &dof, const hp::QCollection &q, const Function &rhs, VectorType &rhs_vector, const std::set &boundary_ids = std::set()); /** @} */ } // namespace VectorTools DEAL_II_NAMESPACE_CLOSE #endif // dealii_vector_tools_rhs_h