HArD::Core3D
Hybrid Arbitrary Degree::Core 3D - Library to implement 3D schemes with vertex, edge, face and cell polynomials as unknowns
Loading...
Searching...
No Matches
Functions
BoundaryConditions

Functions

int offsetIndex (const std::vector< size_t > &c, const int &i)
 Function to offset and index i according to a vector c0,c1,...,c2n of increasing numbers.
 
Eigen::ArrayXi create_mapDOF (const std::vector< size_t > &c, const size_t N)
 Create a map from DOFs 0..N-1 to values obtained by cutting the DOFs corresponding to c (as per offsetIndex).
 
template<typename VecType >
VecType replaceSectionsVector (const VecType &V, const VecType &Z, const std::vector< std::pair< size_t, size_t > > &sec)
 Replace sections of vector V by values from vector Z into vector V; the sections are determined by 'sec'. The vectors are any (identical) types of Eigen::Vector.
 

Detailed Description

Function Documentation

◆ create_mapDOF()

Eigen::ArrayXi create_mapDOF ( const std::vector< size_t > &  c,
const size_t  N 
)

Create a map from DOFs 0..N-1 to values obtained by cutting the DOFs corresponding to c (as per offsetIndex).

◆ offsetIndex()

int offsetIndex ( const std::vector< size_t > &  c,
const int &  i 
)

Function to offset and index i according to a vector c0,c1,...,c2n of increasing numbers.

The indices between [c0,c1),...[c2n-1,c2n) are removed (return -1), and the other are offset according to this removal

◆ replaceSectionsVector()

template<typename VecType >
VecType replaceSectionsVector ( const VecType &  V,
const VecType &  Z,
const std::vector< std::pair< size_t, size_t > > &  sec 
)

Replace sections of vector V by values from vector Z into vector V; the sections are determined by 'sec'. The vectors are any (identical) types of Eigen::Vector.

Returns a vector of same length as V, whose segments starting at sec[i].first and with length sec[i].second are replaced using the values (successively) of Z. Can be used to:

1) create a map from DOFs to unknowns: starting from a vector V of -1 of size nb of DOFs and a linearly spaced vector Z of size the number of final unknowns, replaces the -1 by the unknowns. The final vector maps -1 for DOFs that are eliminated (not in the 'sec' positions) and linearly lists unknown numbers for the other DOFs

2) insert, in a vector already containing values for Dirichlet DOFs, values calculated by solving a system on the other DOFs.