Implements a periodic boundary condition. More...
#include <PeriodicBC.hpp>
Public Types | |
using | Domain = typename SubspaceBasis::GridView::template Codim< 0 >::Geometry::GlobalCoordinate |
using | MultiIndex = typename SubspaceBasis::MultiIndex |
using | FaceTrafo = FaceTransformation< typename Domain::field_type, Domain::dimension > |
using | Intersection = typename SubspaceBasis::GridView::Intersection |
Public Member Functions | |
PeriodicBC (SubspaceBasis basis, BoundarySubset< Intersection > boundarySubset, FaceTrafo faceTrafo) | |
Create the BoundaryCondition and store the face transformation in a local variable. | |
void | init () |
Compute the pairs of associated boundary DOFs. More... | |
template<class Mat , class Sol , class Rhs > | |
void | apply (Mat &matrix, Sol &solution, Rhs &rhs) |
Move matrix rows (and columns) of dependant DOFs to the corresponding master DOFs. More... | |
auto const & | associations () const |
Return the map of DOF associations. | |
auto const & | periodicNodes () const |
Return the boolean boundary indicator. | |
Protected Member Functions | |
void | initAssociations () |
void | initAssociations2 () |
template<class Node > | |
auto | coords (Node const &node, std::vector< std::size_t > const &localIndices) const |
Implements a periodic boundary condition.
Mat | Matrix |
Sol | Vector of solution |
Rhs | Vector of rhs |
Basis | RowBasis, must be the same as ColBasis |
TP | Treepath to the node this constraint applies to |
void apply | ( | Mat & | matrix, |
Sol & | solution, | ||
Rhs & | rhs | ||
) |
Move matrix rows (and columns) of dependant DOFs to the corresponding master DOFs.
Add rows (and columns) of dependant DOFs to rows (and columns) master DOFs and set rows (and columns) of dependant DOFs to unit-rows[columns] with entries of -1 at master DOF indices. Uses a backend-specific implementation.
void init |
Compute the pairs of associated boundary DOFs.
After leaving the function the vector used by periodicNodes() is initialized and its value is true for all DOFs on the periodic boundary. Furthermode associations() is initialized and contains the index of the DOF associated to a DOF on the periodic boundary.