30 : m_slaveGeom( &(mp[bi.first().patch ])),
31 m_masterGeom( &(mp[bi.second().patch ])),
32 m_masterBdr((mp[bi.second().patch]).
boundary(bi.second())),
33 m_slaveBasis(&(basis[bi.first().patch ])),
34 m_masterBasis(&(basis[bi.second().patch])),
35 m_boundaryInterface(bi),
36 m_Tolerance(opt.getReal(
"Tolerance"))
50 if (j != m_fixedDir ) { m_freeDirs.push_back(j); }
58 m_masterBdr = m_masterGeom->boundary(m_boundaryInterface.second());
64 GISMO_ASSERT( u.rows() == domainDim(),
"gsCPPInterface::eval_into: "
65 "The rows of the evaluation points must be equal to the dimension of the domain." );
104 result.resizeLike(u);
107 for (
index_t i=0; i<u.cols(); i++)
110 slavePoint = m_slaveGeom->eval( u.col(i) );
114 m_masterBdr->closestPointTo( slavePoint, masterParams, m_Tolerance);
119 for (
size_t j=0; j<m_freeDirs.size(); j++)
121 result( m_freeDirs[j], i ) = masterParams(j);
123 result( m_fixedDir, i ) = m_fixedParam;
133 for (
index_t i=0; i<domainDim(); ++i)
135 if (i!=m_boundaryInterface.first().direction())
145 os <<
"gsCPPInterface:"
146 <<
"\n First (slave) side: " << m_boundaryInterface.first()
147 <<
"\n Second (master) side: " << m_boundaryInterface.second();
Provides a mapping between the corresponding sides of two patches sharing an interface, by means of a closest point projection.
Definition: gsCPPInterface.h:32
gsDomainIterator< T >::uPtr makeDomainIterator() const
Returns a domain iterator.
Definition: gsCPPInterface.hpp:130
bool parameter() const
Returns the parameter value (false=0=start, true=1=end) that corresponds to this side.
Definition: gsBoundary.h:128
Struct that defines the boundary sides and corners and types of a geometric object.
Definition: gsBoundary.h:55
#define index_t
Definition: gsConfig.h:32
virtual std::ostream & print(std::ostream &os) const
Prints the state of the object.
Definition: gsCPPInterface.hpp:143
gsCPPInterface(const gsMultiPatch< T > &mp, const gsMultiBasis< T > &mb, const boundaryInterface &bi, const gsOptionList &opt=defaultOptions())
Constructor.
Definition: gsCPPInterface.hpp:26
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
boundaryInterface m_boundaryInterface
Corresponding boundary interface.
Definition: gsCPPInterface.h:71
memory::unique_ptr< gsDomainIterator > uPtr
Unique pointer for gsDomainIterator.
Definition: gsDomainIterator.h:73
void setBreaks(std::vector< T > newBreaks, index_t i)
Function to set the breakpoints in direction i manually.
Definition: gsTensorDomainBoundaryIterator.h:194
Provides declaration of TensorNurbsBasis abstract interface.
Holds a set of patch-wise bases and their topology information.
Definition: gsMultiBasis.h:36
Provides declaration of the MultiPatch class.
Re-implements gsDomainIterator for iteration over all elements of the boundary of a tensor product pa...
Definition: gsTensorDomainBoundaryIterator.h:37
Fits a (closed) B-spline curve to some given data.
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
An std::vector with sorting capabilities.
patchSide & second()
second, returns the second patchSide of this interface
Definition: gsBoundary.h:782
gsGeometry< T >::Ptr m_masterBdr
The boundary geometry of second patch – Master.
Definition: gsCPPInterface.h:66
Struct which represents an interface between two patches.
Definition: gsBoundary.h:649
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the interface map.
Definition: gsCPPInterface.hpp:62
short_t direction() const
Returns the parametric direction orthogonal to this side.
Definition: gsBoundary.h:113