![]() |
Dune-Fufem 2.11-git
|
Description
Utilities for handling affine constraints.
Classes | |
| class | Dune::Fufem::AffineConstraints< BV, V, MI, C > |
| Class to handle affine constraints on a subset of DOFs. More... | |
Functions | |
| template<class BitVector = std::monostate, class Vector = std::monostate, class Basis > | |
| auto | Dune::Fufem::makeAffineConstraints (const Basis &basis) |
Create and initialize an AffineConstraints object for a basis. | |
| template<class BV , class V , class MI , class C , class Basis , class Function , class IntersectionSet > requires (Dune::Fufem::Forms::IsBoundaryDomain<IntersectionSet>::value or Dune::Fufem::Forms::IsSkeletonDomain<IntersectionSet>::value) | |
| void | Dune::Fufem::computeBoundaryConstraints (AffineConstraints< BV, V, MI, C > &constraints, const Basis &basis, Function &&f, const IntersectionSet &intersectionSet) |
| Compute constraints for essential boundary conditions. | |
| template<class BV , class V , class MI , class C , class Basis , class Function > | |
| void | Dune::Fufem::computeBoundaryConstraints (AffineConstraints< BV, V, MI, C > &constraints, const Basis &basis, Function &&f) |
| Compute constraints for essential boundary conditions. | |
| template<class BitVector = std::monostate, class Vector = std::monostate, class Basis , class Function , class IntersectionSet > requires (Dune::Fufem::Forms::IsBoundaryDomain<IntersectionSet>::value or Dune::Fufem::Forms::IsSkeletonDomain<IntersectionSet>::value) | |
| auto | Dune::Fufem::makeBoundaryConstraints (const Basis &basis, Function &&f, const IntersectionSet &intersectionSet) |
| Compute constraints for essential boundary conditions. | |
| template<class BitVector = std::monostate, class Vector = std::monostate, class Basis , class Function > | |
| auto | Dune::Fufem::makeBoundaryConstraints (const Basis &basis, Function &&f) |
| Compute constraints for essential boundary conditions. | |
| template<class BV , class V , class MI , class C , class Basis > | |
| void | Dune::Fufem::computeContinuityConstraints (AffineConstraints< BV, V, MI, C > &constraints, const Basis &basis) |
| Compute constraints for a conforming basis on a grid with hanging nodes. | |
| template<class BitVector = std::monostate, class Vector = std::monostate, class Basis > | |
| auto | Dune::Fufem::makeContinuityConstraints (const Basis &basis) |
| Compute constraints for a conforming basis on a grid with hanging nodes. | |
| template<class PrimaryLocalView , class SecondaryLocalView , class SecondaryToPrimary , class SecondaryDOFs , class Constraints > | |
| void | Dune::Fufem::computeLocalInterpolationConstraints (const PrimaryLocalView &primaryLocalView, const SecondaryLocalView &secondaryLocalView, const SecondaryToPrimary &localSecondaryToPrimary, const SecondaryDOFs &secondaryDOFs, Constraints &constraints) |
| Compute local constraints from interpolating between local views. | |
| template<class BV , class V , class MI , class C , class PrimaryBasis , class PrimaryPatch , class SecondaryBasis , class SecondaryPatch , class SecondaryToPrimary > | |
| void | Dune::Fufem::computePeriodicConstraints (AffineConstraints< BV, V, MI, C > &constraints, const PrimaryBasis &primaryBasis, const PrimaryPatch &primaryPatch, const SecondaryBasis &secondaryBasis, const SecondaryPatch &secondaryPatch, const SecondaryToPrimary &secondaryToPrimary) |
| Compute constraints for periodic boundary conditions. | |
| template<class BV , class V , class MI , class C , class Basis , class PrimaryPatch , class SecondaryPatch , class SecondaryToPrimary > | |
| void | Dune::Fufem::computePeriodicConstraints (AffineConstraints< BV, V, MI, C > &constraints, const Basis &basis, const PrimaryPatch &primaryPatch, const SecondaryPatch &secondaryPatch, const SecondaryToPrimary &secondaryToPrimary) |
| Compute constraints for periodic boundary conditions. | |
Function Documentation
◆ computeBoundaryConstraints() [1/2]
| void Dune::Fufem::computeBoundaryConstraints | ( | AffineConstraints< BV, V, MI, C > & | constraints, |
| const Basis & | basis, | ||
| Function && | f | ||
| ) |
Compute constraints for essential boundary conditions.
- Template Parameters
-
Basis Type of the global basis Function Type of the function to interpolate
- Parameters
-
constraints An initialized AffineConstraints object basis A global basis f The Dirichlet values given as a function
This will interpolate the function f on the whole boundary and add constraints for all corresponding DOFs to constraints.
- Note
- This method assumes that the
constraintshas already been initialized. Ifconstraintsalready contains constraint DOFs, then interpolation and the newly added constraints are reduced to the previously unconstrained DOFs.
- Warning
- This function is still experimental and the interface may change.
◆ computeBoundaryConstraints() [2/2]
requires (Dune::Fufem::Forms::IsBoundaryDomain<IntersectionSet>::value or Dune::Fufem::Forms::IsSkeletonDomain<IntersectionSet>::value)
| void Dune::Fufem::computeBoundaryConstraints | ( | AffineConstraints< BV, V, MI, C > & | constraints, |
| const Basis & | basis, | ||
| Function && | f, | ||
| const IntersectionSet & | intersectionSet | ||
| ) |
Compute constraints for essential boundary conditions.
- Template Parameters
-
Basis Type of the global basis Function Type of the function to interpolate IntersectionSet Type of IntersectionSet. This should satisfy Forms::IsBoundaryDomain or Forms::IsSkeletonDomain. This is e.g. the case for BoundaryPatch and Forms::Boundary.
- Parameters
-
constraints An initialized AffineConstraints object basis A global basis f The Dirichlet values given as a function intersectionSet The IntersectionSet where the boundary condition should be applied
This will interpolate the function f on the intersectionSet and add constraints for all corresponding DOFs to constraints.
- Note
- This method assumes that the
constraintshas already been initialized. Ifconstraintsalready contains constraint DOFs, then interpolation and the newly added constraints are reduced to the previously unconstrained DOFs.
- Warning
- This function is still experimental and the interface may change.
◆ computeContinuityConstraints()
| void Dune::Fufem::computeContinuityConstraints | ( | AffineConstraints< BV, V, MI, C > & | constraints, |
| const Basis & | basis | ||
| ) |
Compute constraints for a conforming basis on a grid with hanging nodes.
- Template Parameters
-
Basis Type of the global basis
- Parameters
-
constraints An initialized AffineConstraints object basis A global basis
This will compute the constraints required to get a basis for the subspace of continuous functions. This method is intended to be used for getting the \(H^1\)-conforming subspace of a finite element space on a grid with hanging nodes. It assumes that DOFs for noncontinuous basis functions on an element can be interpolated from basis functions of neighboring elements on coarser levels.
- Note
- This method assumes that the AffineConstraints object
constraintshas already been initialized. It may also already contain constraints.
- Warning
- This function is still experimental and the interface may change.
◆ computeLocalInterpolationConstraints()
| void Dune::Fufem::computeLocalInterpolationConstraints | ( | const PrimaryLocalView & | primaryLocalView, |
| const SecondaryLocalView & | secondaryLocalView, | ||
| const SecondaryToPrimary & | localSecondaryToPrimary, | ||
| const SecondaryDOFs & | secondaryDOFs, | ||
| Constraints & | constraints | ||
| ) |
Compute local constraints from interpolating between local views.
- Template Parameters
-
Basis Type of the global basis
- Parameters
-
primaryLocalView The primary local view secondaryLocalView The secondary local view localSecondaryToPrimary Callback mapping local coordinates secondaryDOFs A set of local DOFs to be interpolated constraints An initialized AffineConstraints object that will be modified
For the given pair of local views the DOFs from the secondaryLocalView contained in the secondaryDOFs container are interpolated from the DOFs of the primaryLocalView. The secondary boundary face DOFs are marked as constrained and the interpolation weights are used as constraint weights.
The secondaryDOFs container must support secondaryDOFs.contains(secondaryLocalIndex).
- Note
- This function is primarily intended to be used inside of other functions computing global constraints, like, e.g. periodic or hanging node constraints.
- Warning
- This function is still experimental and the interface may change.
◆ computePeriodicConstraints() [1/2]
| void Dune::Fufem::computePeriodicConstraints | ( | AffineConstraints< BV, V, MI, C > & | constraints, |
| const Basis & | basis, | ||
| const PrimaryPatch & | primaryPatch, | ||
| const SecondaryPatch & | secondaryPatch, | ||
| const SecondaryToPrimary & | secondaryToPrimary | ||
| ) |
Compute constraints for periodic boundary conditions.
- Template Parameters
-
Basis Type of the global basis PrimaryPatch Type of BoundaryPatch (or intersection range) for the primary periodic boundary SecondaryPatch Type of BoundaryPatch (or intersection range) for the secondary periodic boundary SecondaryToPrimary Type of boundary-to-boundary map
- Parameters
-
constraints An initialized AffineConstraints object basis A global basis primaryPatch The patch containing the primary part of the periodic boundary secondaryPatch The patch containing the secondary part of the periodic boundary secondaryToPrimary A function mapping coordinates from the secondary to primary boundary
This will first search matching pairs of boundary faces from the primaryPatch and secondaryPatch. A pair of faces is considered of match if the center of the secondary boundary face mapped to the primary boundary coincides (up to a tolerance) with the center of the primary boundary face. The mapping is done by the callback secondaryToPrimary.
For any matching pair the DOFs associated to the secondary boundary face are then interpolated from the DOFs on the primary boundary face. The secondary boundary face DOFs are marked as constrained and the interpolation weights are used as constraint weights.
- Note
- This method assumes that the
constraintshas already been initialized. Ifconstraintsalready contains constraint DOFs, then the newly added constraints are reduced to the previously unconstrained DOFs.
- Warning
- This function is still experimental and the interface may change.
◆ computePeriodicConstraints() [2/2]
| void Dune::Fufem::computePeriodicConstraints | ( | AffineConstraints< BV, V, MI, C > & | constraints, |
| const PrimaryBasis & | primaryBasis, | ||
| const PrimaryPatch & | primaryPatch, | ||
| const SecondaryBasis & | secondaryBasis, | ||
| const SecondaryPatch & | secondaryPatch, | ||
| const SecondaryToPrimary & | secondaryToPrimary | ||
| ) |
Compute constraints for periodic boundary conditions.
- Template Parameters
-
PrimaryBasis Type of the primary global basis PrimaryPatch Type of BoundaryPatch (or intersection range) for the primary periodic boundary SecondaryBasis Type of the secondary global basis SecondaryPatch Type of BoundaryPatch (or intersection range) for the secondary periodic boundary SecondaryToPrimary Type of boundary-to-boundary map
- Parameters
-
constraints An initialized AffineConstraints object primaryBasis A global basis to be considered on the primary boundary primaryPatch The patch containing the primary part of the periodic boundary secondaryBasis A global basis to be considered on the secondary boundary secondaryPatch The patch containing the secondary part of the periodic boundary secondaryToPrimary A function mapping coordinates from the secondary to primary boundary
This will first search matching pairs of boundary faces from the primaryPatch and secondaryPatch. A pair of faces is considered of match if the center of the secondary boundary face mapped to the primary boundary coincides (up to a tolerance) with the center of the primary boundary face. The mapping is done by the callback secondaryToPrimary.
For any matching pair the secondary basis DOFs associated to the secondary boundary face are then interpolated from the primary basis DOFs on the primary boundary face. The secondary boundary face DOFs are marked as constrained and the interpolation weights are used as constraint weights.
- Note
- This method assumes that the
constraintshas already been initialized. Ifconstraintsalready contains constraint DOFs, then the newly added constraints are reduced to the previously unconstrained DOFs.
- Warning
- This function is still experimental and the interface may change.
◆ makeAffineConstraints()
| auto Dune::Fufem::makeAffineConstraints | ( | const Basis & | basis | ) |
Create and initialize an AffineConstraints object for a basis.
- Template Parameters
-
BitVector A bit vector type suitable for the global indices of the basis Vector A coefficient vector type suitable for the global indices of the basis Basis Type of the global basis
- Parameters
-
basis A global basis
If the template default value std::monostate is used for the template parameters BitVector or Vector then the actual container types are deduced using Dune::Functions::makeContainer(...) and Dune::Functions::makeISTLVector(...) from the container descriptor provided by basis (only with dune-function>=2.11).
◆ makeBoundaryConstraints() [1/2]
| auto Dune::Fufem::makeBoundaryConstraints | ( | const Basis & | basis, |
| Function && | f | ||
| ) |
Compute constraints for essential boundary conditions.
- Template Parameters
-
BitVector A bit vector type suitable for the global indices of the basis Vector A coefficient vector type suitable for the global indices of the basis Basis Type of the global basis Function Type of the function to interpolate
- Parameters
-
basis A global basis f The Dirichlet values given as a function
This will interpolate the function f on the boundary and return an AffineConstraints object constraining all corresponding DOFs.
If the template default value std::monostate is used for the template parameters BitVector or Vector then the actual container types are deduced using Dune::Functions::makeContainer(...) and Dune::Functions::makeISTLVector(...) from the container descriptor provided by basis (only with dune-function>=2.11).
- Warning
- This function is still experimental and the interface may change.
◆ makeBoundaryConstraints() [2/2]
requires (Dune::Fufem::Forms::IsBoundaryDomain<IntersectionSet>::value or Dune::Fufem::Forms::IsSkeletonDomain<IntersectionSet>::value)
| auto Dune::Fufem::makeBoundaryConstraints | ( | const Basis & | basis, |
| Function && | f, | ||
| const IntersectionSet & | intersectionSet | ||
| ) |
Compute constraints for essential boundary conditions.
- Template Parameters
-
BitVector A bit vector type suitable for the global indices of the basis Vector A coefficient vector type suitable for the global indices of the basis Basis Type of the global basis Function Type of the function to interpolate IntersectionSet Type of IntersectionSet. This should satisfy Forms::IsBoundaryDomain or Forms::IsSkeletonDomain. This is e.g. the case for BoundaryPatch and Forms::Boundary.
- Parameters
-
basis A global basis f The Dirichlet values given as a function intersectionSet The IntersectionSet where the boundary condition should be applied
This will interpolate the function f on the intersectionSet and return an AffineConstraints object constraining all corresponding DOFs.
If the template default value std::monostate is used for the template parameters BitVector or Vector then the actual container types are deduced using Dune::Functions::makeContainer(...) and Dune::Functions::makeISTLVector(...) from the container descriptor provided by basis (only with dune-function>=2.11).
- Warning
- This function is still experimental and the interface may change.
◆ makeContinuityConstraints()
| auto Dune::Fufem::makeContinuityConstraints | ( | const Basis & | basis | ) |
Compute constraints for a conforming basis on a grid with hanging nodes.
- Template Parameters
-
BitVector A bit vector type suitable for the global indices of the basis Vector A coefficient vector type suitable for the global indices of the basis Basis Type of the global basis
- Parameters
-
basis A global basis
This will compute the constraints required to get a basis for the subspace of continuous functions. This method is intended to be used for getting the \(H^1\)-conforming subspace of a finite element space on a grid with hanging nodes. It assumes that DOFs for noncontinuous basis functions on an element can be interpolated from basis functions of neighboring elements on coarser levels.
The constraints are returned as AffineConstraints object. The result can be used to constrain a linear system to the conforming subspace.
If the template default value std::monostate is used for the template parameters BitVector or Vector then the actual container types are deduced using Dune::Functions::makeContainer(...) and Dune::Functions::makeISTLVector(...) from the container descriptor provided by basis (only with dune-function>=2.11).
- Warning
- This function is still experimental and the interface may change.
