26 : m_topology( bb.dim() )
29 m_bases.push_back( bb.
source().clone().release() );
31 m_bases.push_back( bb.
clone().release() );
38 : m_topology( mpatch.topology() )
46 m_bases ( other.m_bases.size() ),
47 m_topology ( other.m_topology )
49 cloneAll( other.m_bases.begin(), other.m_bases.end(), this->m_bases.begin() );
52 #if EIGEN_HAS_RVALUE_REFERENCES
57 m_bases.resize( other.m_bases.size() );
58 cloneAll( other.m_bases.begin(), other.m_bases.end(), this->m_bases.begin() );
59 m_topology = other.m_topology;
73 os<<
"Topology: "<< m_topology <<
"\n";
82 if ( m_topology.dim() == -1 )
84 m_topology.setDim( g->dim() );
88 assert( g->dim() == m_topology.dim() );
90 m_bases.push_back( g ) ;
98 if ( m_topology.dim() == -1 )
100 m_topology.setDim( g->dim() );
104 GISMO_ASSERT( g->dim() == m_topology.dim(),
"Dimensions do not match.");
107 m_bases.push_back( g.release() ) ;
114 typename BasisContainer::const_iterator it
115 = std::find( m_bases.begin(), m_bases.end(), g );
116 assert( it != m_bases.end() );
117 return it - m_bases.begin();
124 int p1 = findBasisIndex( g1 );
125 int p2 = findBasisIndex( g2 );
126 m_topology.addInterface( p1, s1, p2, s2);
130 template <
typename T>
132 T operator() (
const T& a,
const T&) {
return a; }
136 template <
typename T>
144 const index_t nBases = localTransferMatrices.size();
150 for (
index_t j=0; j<nBases; ++j)
152 nonzeros += localTransferMatrices[j].nonZeros();
153 trRows += localTransferMatrices[j].rows();
154 trCols += localTransferMatrices[j].cols();
158 entries.reserve( nonzeros );
160 for (
index_t j=0; j<nBases; ++j)
162 for (
index_t k=0; k < localTransferMatrices[j].outerSize(); ++k)
166 const index_t coarse_dof_idx = coarseMapper.
index(it.col(),j);
167 const index_t fine_dof_idx = fineMapper.
index(it.row(),j);
170 entries.add(fine_dof_idx, coarse_dof_idx, it.value());
176 transferMatrix.setFromTriplets(entries.begin(), entries.end(), take_first<T>());
177 transferMatrix.makeCompressed();
180 template <
typename T>
192 (dirichlet::strategy)assemblerOptions.
askInt(
"DirichletStrategy",11),
193 (iFace ::strategy)assemblerOptions.
askInt(
"InterfaceStrategy", 1),
200 std::vector< gsSparseMatrix<T, RowMajor> > localTransferMatrices(nBases());
201 for (
size_t k = 0; k < m_bases.size(); ++k)
203 m_bases[k]->uniformRefine_withTransfer(localTransferMatrices[k],numKnots,mul);
209 (dirichlet::strategy)assemblerOptions.
askInt(
"DirichletStrategy",11),
210 (iFace ::strategy)assemblerOptions.
askInt(
"InterfaceStrategy", 1),
217 combineTransferMatrices( localTransferMatrices, coarseMapper, fineMapper, transferMatrix );
221 template <
typename T>
232 (dirichlet::strategy)assemblerOptions.
askInt(
"DirichletStrategy",11),
233 (iFace ::strategy)assemblerOptions.
askInt(
"InterfaceStrategy", 1),
240 std::vector< gsSparseMatrix<T, RowMajor> > localTransferMatrices(nBases());
241 for (
size_t k = 0; k < m_bases.size(); ++k)
243 m_bases[k]->uniformCoarsen_withTransfer(localTransferMatrices[k],numKnots);
249 (dirichlet::strategy)assemblerOptions.
askInt(
"DirichletStrategy",11),
250 (iFace ::strategy)assemblerOptions.
askInt(
"InterfaceStrategy", 1),
257 combineTransferMatrices( localTransferMatrices, coarseMapper, fineMapper, transferMatrix );
261 template <
typename T>
269 typename gsBasis<T>::uPtr result = m_bases[pc.
patch()]->componentBasis_withIndices(pc, indices, no_lower);
271 const index_t sz = indices.rows();
275 const index_t loc = indices(i,0);
282 indices.conservativeResize(j,1);
286 template <
typename T>
288 const std::vector<patchComponent>& pc,
294 const index_t nrpc = pc.size();
295 std::vector<typename gsBasis<T>::uPtr> bases;
297 std::vector< gsMatrix<index_t> > local_indices(nrpc);
304 this->componentBasis_withIndices(pc[i], dm, local_indices[i], no_lower)
306 sz += local_indices[i].rows();
309 std::vector<index_t> global_indices;
310 global_indices.reserve(sz);
314 const index_t nr_local_indices = local_indices[i].rows();
315 for (
index_t j=0; j<nr_local_indices; ++j)
316 if ( i==0 || std::find(global_indices.begin(), global_indices.end(), local_indices[i](j,0) )
317 == global_indices.end()
319 global_indices.push_back( local_indices[i](j,0) );
322 const index_t final_size = global_indices.size();
323 indices.resize(final_size,1);
324 for (
index_t i=0; i<final_size; ++i)
325 indices(i,0) = global_indices[i];
334 short_t result = m_bases[0]->degree(k);
335 for (
size_t i = 0; i < m_bases.size(); ++i)
336 if (m_bases[i]->degree(k) > result )
337 result = m_bases[i]->degree(k);
345 short_t result = m_bases[0]->maxDegree();
346 for (
size_t i = 0; i < m_bases.size(); ++i)
347 result = math::max(m_bases[i]->maxDegree(), result);
355 short_t result = m_bases[0]->minDegree();
356 for (
size_t i = 0; i < m_bases.size(); ++i)
357 result = math::min(m_bases[i]->minDegree(), result);
365 short_t result = m_bases[0]->degree(k);
366 for (
size_t i = 0; i < m_bases.size(); ++i)
367 if (m_bases[i]->degree(k) < result )
368 result = m_bases[i]->degree(k);
381 for ( gsBoxTopology::const_iiterator it = m_topology.iBegin();
382 it != m_topology.iEnd(); ++it )
384 matchInterface(*it,mapper);
393 void gsMultiBasis<T>::getMapper(
bool conforming,
394 const gsBoundaryConditions<T> & bc,
396 gsDofMapper & mapper,
399 mapper = gsDofMapper(*
this, bc, unk);
403 for ( gsBoxTopology::const_iiterator it = m_topology.iBegin();
404 it != m_topology.iEnd(); ++it )
406 matchInterface(*it,mapper);
423 for (
size_t i = 0; i!=mapper.componentsSize(); ++i)
430 bool changed =
false;
432 std::vector<index_t> refEltsFirst;
433 std::vector<index_t> refEltsSecond;
436 switch( this->dim() )
439 changed = this->
template repairInterfaceFindElements<2>( bi, refEltsFirst, refEltsSecond );
442 changed = this->
template repairInterfaceFindElements<3>( bi, refEltsFirst, refEltsSecond );
451 if( refEltsFirst.size() > 0 )
452 m_bases[ bi.
first().
patch ]->refineElements( refEltsFirst );
453 if( refEltsSecond.size() > 0 )
454 m_bases[ bi.
second().
patch ]->refineElements( refEltsSecond );
464 std::vector<index_t> & refEltsFirst,
465 std::vector<index_t> & refEltsSecond )
467 GISMO_ASSERT( d == 2 || d == 3,
"Dimension must be 2 or 3.");
469 refEltsFirst.clear();
470 refEltsSecond.clear();
480 GISMO_ASSERT( bas0 != 0 && bas1 != 0,
"Cannot cast basis as needed.");
489 unsigned idxExponent;
492 unsigned indexLevelUse = ( bas0->
tree().getIndexLevel() > bas1->
tree().getIndexLevel() ? bas0->
tree().getIndexLevel() : bas1->
tree().getIndexLevel() );
493 unsigned indexLevelDiff0 = indexLevelUse - bas0->
tree().getIndexLevel();
494 unsigned indexLevelDiff1 = indexLevelUse - bas1->
tree().getIndexLevel();
501 upperCorn0[i] = upperCorn0[i] << indexLevelDiff0;
502 upperCorn1[i] = upperCorn1[i] << indexLevelDiff1;
515 idxExponent = ( indexLevelUse - bas0->
tree().getMaxInsLevel());
516 for(
index_t i=0; i < lo0.rows(); i++)
519 lo0(i,j) = lo0(i,j) << idxExponent;
520 up0(i,j) = up0(i,j) << idxExponent;
522 idxExponent = ( indexLevelUse - bas1->
tree().getMaxInsLevel());
523 for(
index_t i=0; i < lo1.rows(); i++)
524 for(
short_t jj=0; jj < d; jj++)
527 unsigned j = dirMap[jj];
528 lo1(i,j) = lo1(i,j) << idxExponent;
529 up1(i,j) = up1(i,j) << idxExponent;
535 unsigned tmp = upperCorn1[j] - lo1(i,j);
536 lo1(i,j) = upperCorn1[j] - up1(i,j);
547 unsigned a0, b0, a1, b1;
554 a0 = 1; b0 = 2; c0 = 0;
557 a0 = 0; b0 = 2; c0 = 1;
560 a0 = 0; b0 = 1; c0 = 2;
563 a0 = 99; b0 = 99; c0 = 99;
582 std::vector< std::vector<unsigned> > iU;
583 for(
index_t i0 = 0; i0 < lo0.rows(); i0++)
584 for(
index_t i1 = 0; i1 < lo1.rows(); i1++)
586 if( lo0(i0,a0) < up1(i1,a1) &&
587 lo0(i0,b0) < up1(i1,b1) &&
588 lo1(i1,a1) < up0(i0,a0) &&
589 lo1(i1,b1) < up0(i0,b0) )
591 std::vector<unsigned> tmp;
592 tmp.push_back( std::max( lo0(i0,a0), lo1(i1,a1) ) );
593 tmp.push_back( std::max( lo0(i0,b0), lo1(i1,b1) ) );
594 tmp.push_back( std::min( up0(i0,a0), up1(i1,a1) ) );
595 tmp.push_back( std::min( up0(i0,b0), up1(i1,b1) ) );
596 tmp.push_back( level0[i0] );
597 tmp.push_back( level1[i1] );
602 std::vector<unsigned> tmpvec(1+2*d);
603 for(
size_t i = 0; i < size_t( iU.size() ); i++)
607 unsigned L0 = iU[i][4];
608 unsigned L1 = iU[i][5];
612 unsigned a, b, c, Luse;
613 unsigned refSideIndex;
614 unsigned upperCornOnLevel;
623 upperCornOnLevel = ( upperCorn0[c] >> ( indexLevelUse - Luse ) );
632 upperCornOnLevel = ( upperCorn1[c] >> ( indexLevelUse - Luse ) );
639 tmpvec[1+a] = iU[i][0] >> ( indexLevelUse - Luse );
640 tmpvec[1+d+a] = iU[i][2] >> ( indexLevelUse - Luse );
643 tmpvec[1+b] = iU[i][1] >> ( indexLevelUse - Luse );
644 tmpvec[1+d+b] = iU[i][3] >> ( indexLevelUse - Luse );
647 if( refSideIndex % 2 == 1 )
656 tmpvec[1+c] = upperCornOnLevel-1;
657 tmpvec[1+d+c] = upperCornOnLevel;
664 for(
unsigned j=0; j < tmpvec.size(); j++)
665 refEltsFirst.push_back( tmpvec[j] );
670 for(
unsigned jj = 0; jj < d; jj++)
672 unsigned j = dirMap[jj];
673 if( j != c && !dirOrient[ jj ] )
675 upperCornOnLevel = ( upperCorn1[j] >> ( indexLevelUse - Luse ) );
676 unsigned tmp = tmpvec[1+j];
677 tmpvec[1+j] = upperCornOnLevel - tmpvec[1+d+j];
678 tmpvec[1+d+j] = upperCornOnLevel - tmp;
682 for(
unsigned j=0; j < (1+2*d); j++)
683 refEltsSecond.push_back( tmpvec[j] );
688 return ( ( refEltsFirst.size() > 0 ) || ( refEltsSecond.size() > 0 ) );
701 GISMO_ASSERT( bas0 != 0 && bas1 != 0,
"Cannot cast basis as needed.");
707 unsigned idxExponent;
710 unsigned indexLevelUse = ( bas0->
tree().getIndexLevel() > bas1->
tree().getIndexLevel() ? bas0->
tree().getIndexLevel() : bas1->
tree().getIndexLevel() );
711 unsigned indexLevelDiff0 = indexLevelUse - bas0->
tree().getIndexLevel();
712 unsigned indexLevelDiff1 = indexLevelUse - bas1->
tree().getIndexLevel();
718 bool orientPreserv = dirOrient[ dir0 ];
720 idxExponent = ( indexLevelUse - bas0->
tree().getMaxInsLevel());
722 for(
index_t i=0; i < lo.rows(); i++)
724 intfc0(i,0) = lo(i,dir0) << idxExponent;
725 intfc0(i,1) = up(i,dir0) << idxExponent;
726 intfc0(i,2) = level[i];
733 idxExponent = ( indexLevelUse - bas1->
tree().getMaxInsLevel());
735 for(
index_t i=0; i < lo.rows(); i++)
737 intfc1(i,0) = lo(i,dir1) << idxExponent;
738 intfc1(i,1) = up(i,dir1) << idxExponent;
739 intfc1(i,2) = level[i];
747 upperCorn0[0] = upperCorn0[0] << indexLevelDiff0;
748 upperCorn0[1] = upperCorn0[1] << indexLevelDiff0;
751 upperCorn1[0] = upperCorn1[0] << indexLevelDiff1;
752 upperCorn1[1] = upperCorn1[1] << indexLevelDiff1;
757 for(
index_t i=0; i < lo.rows(); i++)
759 const index_t tmp = upperCorn1[dir1] - intfc1(i, 1);
760 intfc1(i,1) = upperCorn1[dir1] - intfc1(i, 0);
764 intfc1.sortByColumn(0);
766 GISMO_ASSERT(intfc0( intfc0.rows()-1, 1) == intfc1( intfc1.rows()-1, 1),
" Something wrong with interfaces! Mark 264");
772 int i0 = 0;
int i1 = 0;
773 std::vector< std::vector< unsigned > > intfcU;
774 while( i0 < intfc0.rows() && i1 < intfc1.rows() )
776 std::vector<unsigned> tmp(3);
778 if( intfc0( i0, 1 ) == intfc1( i1, 1 ) )
780 tmp[0] = intfc0(i0,1);
781 tmp[1] = intfc0(i0,2);
782 tmp[2] = intfc1(i1,2);
783 intfcU.push_back( tmp );
787 else if( intfc0( i0, 1 ) > intfc1( i1, 1 ) )
789 tmp[0] = intfc1(i1,1);
790 tmp[1] = intfc0(i0,2);
791 tmp[2] = intfc1(i1,2);
792 intfcU.push_back( tmp );
797 tmp[0] = intfc0(i0,1);
798 tmp[1] = intfc0(i0,2);
799 tmp[2] = intfc1(i1,2);
800 intfcU.push_back( tmp );
809 std::vector<index_t> refElts0;
810 std::vector<index_t> refElts1;
812 for(
unsigned i=0; i < intfcU.size(); i++)
815 knot1 = intfcU[i][0];
816 unsigned L0 = intfcU[i][1];
817 unsigned L1 = intfcU[i][2];
821 refElts0.push_back( L1 );
824 unsigned knot0L = knot0 >> ( indexLevelUse - L1 );
825 unsigned knot1L = knot1 >> ( indexLevelUse - L1 );
827 unsigned upperCornOnLevel;
831 refElts0.push_back( 0 );
832 refElts0.push_back( knot0L );
833 refElts0.push_back( 1 );
834 refElts0.push_back( knot1L );
837 upperCornOnLevel = ( upperCorn0[0] >> ( indexLevelUse - L1 ) );
839 refElts0.push_back( upperCornOnLevel-1 );
840 refElts0.push_back( knot0L );
841 refElts0.push_back( upperCornOnLevel );
842 refElts0.push_back( knot1L );
845 refElts0.push_back( knot0L );
846 refElts0.push_back( 0 );
847 refElts0.push_back( knot1L );
848 refElts0.push_back( 1 );
851 upperCornOnLevel = ( upperCorn0[1] >> ( indexLevelUse - L1 ) );
853 refElts0.push_back( knot0L );
854 refElts0.push_back( upperCornOnLevel-1 );
855 refElts0.push_back( knot1L );
856 refElts0.push_back( upperCornOnLevel );
859 GISMO_ASSERT(
false,
"3D not implemented yet. You can do it, if you want.");
865 refElts1.push_back( L0 );
868 unsigned knot0L = knot0;
869 unsigned knot1L = knot1;
873 unsigned tmp = knot0L;
874 knot0L = ( upperCorn1[dir1] - knot1L );
875 knot1L = ( upperCorn1[dir1] - tmp );
878 knot0L = knot0L >> ( indexLevelUse - L0 );
879 knot1L = knot1L >> ( indexLevelUse - L0 );
885 refElts1.push_back( 0 );
886 refElts1.push_back( knot0L );
887 refElts1.push_back( 1 );
888 refElts1.push_back( knot1L );
891 upperCornOnLevel[0] = ( upperCorn1[0] >> ( indexLevelUse - L0 ) );
892 upperCornOnLevel[1] = ( upperCorn1[1] >> ( indexLevelUse - L0 ) );
894 refElts1.push_back( upperCornOnLevel[0]-1 );
895 refElts1.push_back( knot0L );
896 refElts1.push_back( upperCornOnLevel[0] );
897 refElts1.push_back( knot1L );
900 refElts1.push_back( knot0L );
901 refElts1.push_back( 0 );
902 refElts1.push_back( knot1L );
903 refElts1.push_back( 1 );
906 upperCornOnLevel[0] = ( upperCorn1[0] >> ( indexLevelUse - L0 ) );
907 upperCornOnLevel[1] = ( upperCorn1[1] >> ( indexLevelUse - L0 ) );
909 refElts1.push_back( knot0L );
910 refElts1.push_back( upperCornOnLevel[1]-1 );
911 refElts1.push_back( knot1L );
912 refElts1.push_back( upperCornOnLevel[1] );
915 GISMO_ASSERT(
false,
"3D not implemented yet. You can do it, if you want.");
921 if( refElts0.size() > 0 )
922 m_bases[ bi.
first().
patch ]->refineElements( refElts0 );
923 if( refElts1.size() > 0 )
924 m_bases[ bi.
second().
patch ]->refineElements( refElts1 );
926 return ( ( refElts0.size() > 0 ) || ( refElts1.size() > 0 ) );
gsBasis< T >::uPtr componentBasis_withIndices(patchComponent pc, const gsDofMapper &dm, gsMatrix< index_t > &indices, bool no_lower=true) const
Returns the basis that corresponds to the component.
Definition: gsMultiBasis.hpp:262
Provides definition of HTensorBasis abstract interface.
Class that provides a container for triplets (i,j,value) to be filled in a sparse matrix...
Definition: gsSparseMatrix.h:33
int findBasisIndex(gsBasis< T > *g) const
Search for the given basis and return its index.
Definition: gsMultiBasis.hpp:112
void addInterface(gsBasis< T > *g1, boxSide s1, gsBasis< T > *g2, boxSide s2)
Add an interface joint between side s1 of geometry g1 side s2 of geometry g2.
Definition: gsMultiBasis.hpp:121
index_t patch() const
Returns the patch number.
Definition: gsBoundary.h:626
gsMultiBasis()
Default empty constructor.
Definition: gsMultiBasis.h:58
gsMultiBasis & operator=(gsMultiBasis other)
Assignment operator (uses copy-and-swap idiom)
Definition: gsMultiBasis.h:114
void matchDofs(index_t u, const gsMatrix< index_t > &b1, index_t v, const gsMatrix< index_t > &b2, index_t comp=0)
Couples dofs b1 of patch u with dofs b2 of patch v one by one such that they refer to the same global...
Definition: gsDofMapper.cpp:159
#define short_t
Definition: gsConfig.h:35
void addAutoBoundaries()
Make all patch sides which are not yet declared as interface or boundary to a boundary.
Definition: gsBoxTopology.cpp:75
short_t maxDegree(short_t k) const
Maximum degree with respect to variable k.
Definition: gsMultiBasis.hpp:331
bool repairInterface2d(const boundaryInterface &bi)
Checks if the 2D-interface is fully matching, and if not, repairs it.
Definition: gsMultiBasis.hpp:692
short_t minCwiseDegree() const
Minimum degree with respect to all variables.
Definition: gsMultiBasis.hpp:352
bool is_free(index_t i, index_t k=0, index_t c=0) const
Returns true if local dof i of patch k is not eliminated.
Definition: gsDofMapper.h:382
#define index_t
Definition: gsConfig.h:32
const gsHDomain< d > & tree() const
Returns a reference to m_tree.
Definition: gsHTensorBasis.h:601
void matchInterface(const boundaryInterface &bi, gsDofMapper &mapper) const
Matches the degrees of freedom along an interface.
Definition: gsMultiBasis.hpp:415
std::ostream & print(std::ostream &os) const
Prints the object as a string.
Definition: gsMultiBasis.hpp:71
Provides combinatorial unitilies.
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
void cloneAll(It start, It end, ItOut out)
Clones all pointers in the range [start end) and stores new raw pointers in iterator out...
Definition: gsMemory.h:295
Maintains a mapping from patch-local dofs to global dof indices and allows the elimination of individ...
Definition: gsDofMapper.h:68
bool repairInterface(const boundaryInterface &bi)
Checks if the interface is fully matching, and if not, repairs it.
Definition: gsMultiBasis.hpp:428
void finalize()
Must be called after all boundaries and interfaces have been marked to set up the dof numbering...
Definition: gsDofMapper.cpp:240
index_t index(index_t i, index_t k=0, index_t c=0) const
Returns the global dof index associated to local dof i of patch k.
Definition: gsDofMapper.h:325
Provides a list of labeled parameters/options that can be set and accessed easily.
bool is_free_index(index_t gl) const
Returns true if global dof gl is not eliminated.
Definition: gsDofMapper.h:376
Class representing a (scalar) hierarchical tensor basis of functions .
Definition: gsHTensorBasis.h:74
Holds a set of patch-wise bases and their topology information.
Definition: gsMultiBasis.h:36
short_t maxCwiseDegree() const
Maximum degree with respect to all variables.
Definition: gsMultiBasis.hpp:342
Provides declaration of the MultiPatch class.
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
void freeAll(It begin, It end)
Frees all pointers in the range [begin end)
Definition: gsMemory.h:312
std::vector< gsBasis< T > * > basesCopy(bool numeratorOnly=false) const
Makes a deep copy of all bases and puts them in a vector.
Definition: gsMultiPatch.hpp:178
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
Struct which represents a certain side of a box.
Definition: gsBoundary.h:84
virtual const gsBasis & source() const
Definition: gsBasis.h:704
uPtr clone()
Clone methode. Produceds a deep copy inside a uPtr.
Struct which represents a certain component (interior, face, egde, corner) of a particular patch...
Definition: gsBoundary.h:565
memory::unique_ptr< gsBasis > uPtr
Unique pointer for gsBasis.
Definition: gsBasis.h:89
const point & upperCorner() const
Accessor for gsHDomain::m_upperIndex.
Definition: gsHDomain.h:249
short_t minDegree(short_t k) const
Minimum degree with respect to variable k.
Definition: gsMultiBasis.hpp:362
Class containing a set of boundary conditions.
Definition: gsBoundaryConditions.h:341
index_t askInt(const std::string &label, const index_t &value=0) const
Reads value for option label from options.
Definition: gsOptionList.cpp:117
void uniformRefine_withTransfer(gsSparseMatrix< T, RowMajor > &transfer, const gsBoundaryConditions< T > &boundaryConditions, const gsOptionList &assemblerOptions, int numKnots=1, int mul=1, index_t unk=0)
Refine every basis uniformly.
Definition: gsMultiBasis.hpp:181
bool repairInterfaceFindElements(const boundaryInterface &bi, std::vector< index_t > &refEltsFirst, std::vector< index_t > &refEltsSecond)
Finds the elements that need to be refined in order to repair an interface.
Definition: gsMultiBasis.hpp:462
~gsMultiBasis()
Destructor.
Definition: gsMultiBasis.hpp:65
patchSide & second()
second, returns the second patchSide of this interface
Definition: gsBoundary.h:782
void addBox(index_t i=1)
Add i new boxes.
Definition: gsBoxTopology.h:198
Struct which represents an interface between two patches.
Definition: gsBoundary.h:649
short_t index() const
Returns the index (as specified in boundary::side) of the box side.
Definition: gsBoundary.h:140
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
index_t freeSize() const
Returns the number of free (not eliminated) dofs.
Definition: gsDofMapper.h:436
void sortByColumn(const index_t j)
Sorts rows of matrix by column j.
Definition: gsMatrix.h:388
index_t patch
The index of the patch.
Definition: gsBoundary.h:234
short_t direction() const
Returns the parametric direction orthogonal to this side.
Definition: gsBoundary.h:113
void getBoxesOnSide(boundary::side s, gsMatrix< Z > &b1, gsMatrix< Z > &b2, gsVector< Z > &level) const
Returns the boxes which make up the hierarchical domain and the respective levels touching side s...
Definition: gsHDomain.hpp:739
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
void uniformCoarsen_withTransfer(gsSparseMatrix< T, RowMajor > &transfer, const gsBoundaryConditions< T > &boundaryConditions, const gsOptionList &assemblerOptions, int numKnots=1, index_t unk=0)
Coarsen every basis uniformly.
Definition: gsMultiBasis.hpp:222
static void combineTransferMatrices(const std::vector< gsSparseMatrix< T, RowMajor > > &localTransferMatrices, const gsDofMapper &coarseMapper, const gsDofMapper &fineMapper, gsSparseMatrix< T, RowMajor > &transferMatrix)
This function takes local transfer matrices (per patch) and combines them using given DofMappers to a...
Definition: gsMultiBasis.hpp:137
void addBasis(gsBasis< T > *g)
Add a basis (ownership of the pointer is also acquired)
Definition: gsMultiBasis.hpp:79
patchSide & first()
first, returns the first patchSide of this interface
Definition: gsBoundary.h:776