24 template <
typename T>
const
27 const short_t dim = m_boundary.parDim();
51 template <
typename T>
template <
short_t d>
58 this->preparePatch(resultBasis, coefs);
71 gr [k] = resultBasis.
component(k).anchors();
72 vend [k] = resultBasis.
size(k) - 1;
73 stride[k] = resultBasis.
stride(k);
77 if ( (vend.array() < 2).any() )
79 gsWarn<<
"There were no interior control points.\n";
85 gsGridIterator<unsigned,CUBE,d> grid(gsVector<unsigned,d>::Ones(), vend);
87 static const gsVector<unsigned,d> twos = gsVector<unsigned,d>::Constant(2);
88 gsGridIterator<unsigned,CUBE,d> cf(twos,
false);
93 typename gsMatrix<T>::RowXpr curCoef = coefs.row(stride.dot(*grid));
113 const T x = gr[k](0, grid->at(k));
115 w *= - ( 2 == cf->at(k) ? x : 1.0-x );
127 tmp[k] = ( cf->at(k)==0 ? grid->at(k) :
128 cf->at(k)==1 ? 0 : vend[k] );
132 curCoef += w * coefs.row( stride.dot(tmp) ) ;
Abstract base class representing a geometry map.
Definition: gsGeometry.h:92
Provides Coons's patch construction from boundary data.
index_t size() const
Returns the number of elements in the basis.
Definition: gsTensorBasis.h:108
#define short_t
Definition: gsConfig.h:35
S give(S &x)
Definition: gsMemory.h:266
A tensor product B-spline basis.
Definition: gsTensorBSplineBasis.h:36
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition: gsVector.h:35
#define gsWarn
Definition: gsDebug.h:50
virtual memory::unique_ptr< gsGeometry< T > > makeGeometry(gsMatrix< T > coefs) const =0
Create a gsGeometry of proper type for this basis with the given coefficient matrix.
const gsGeometry< T > & compute()
Main routine that performs the computation (to be implemented in derived classes) ...
Definition: gsCoonsPatch.hpp:25
Represents a B-spline curve/function with one parameter.
Computes a Coons' patch parametrization given a set of boundary geometries. Parametrization is not gu...
Definition: gsCoonsPatch.h:32
unsigned stride(short_t dir) const
Returns the stride for dimension dir.
Definition: gsTensorBasis.h:889
#define GISMO_ERROR(message)
Definition: gsDebug.h:118
Provides iteration over integer or numeric points in a (hyper-)cube.
const Basis_t & component(short_t dir) const
For a tensor product basis, return the (const) 1-d basis for the i-th parameter component.
Definition: gsTensorBSplineBasis.h:202
Provides declaration of TensorBSplineBasis abstract interface.