AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
PeriodicBC< Basis, TP > Class Template Reference

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
 

Detailed Description

template<class Basis, class TP>
class AMDiS::PeriodicBC< Basis, TP >

Implements a periodic boundary condition.

Template Parameters
MatMatrix
SolVector of solution
RhsVector of rhs
BasisRowBasis, must be the same as ColBasis
TPTreepath to the node this constraint applies to

Member Function Documentation

◆ apply()

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.

◆ init()

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.


The documentation for this class was generated from the following files: