G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsCPPInterface.h
Go to the documentation of this file.
1
17#pragma once
18
20#include <gsCore/gsBoundary.h>
21#include <gsIO/gsOptionList.h>
22
23namespace gismo {
24
31template <class T>
32class gsCPPInterface : public gsFunction<T>
33{
34public:
35
37 typedef memory::shared_ptr< gsCPPInterface > Ptr;
38
40 typedef memory::unique_ptr< gsCPPInterface > uPtr;
41
54 const gsMultiBasis<T> & mb,
55 const boundaryInterface & bi,
56 const gsOptionList & opt = defaultOptions() );
57
58 static uPtr make (const gsMultiPatch<T> & mp,
59 const gsMultiBasis<T> & mb,
60 const boundaryInterface & bi,
61 const gsOptionList & opt = defaultOptions() )
62 { return uPtr(new gsCPPInterface(mp,mb,bi,opt)); }
63
64private:
65 const gsGeometry<T>* m_slaveGeom, *m_masterGeom;
67
70
72
74
75 std::vector<index_t> m_freeDirs;
76 index_t m_fixedParam;
77 index_t m_fixedDir;
78
79 std::vector< std::vector<T> > m_breakpoints;
80
81public:
86 {
87 gsOptionList defaultOpts;
88 defaultOpts.addInt ( "Tied", "Is it a tied contact?", 0);
89 defaultOpts.addReal( "Tolerance", "Tolerance to be used for closest point search.", 1e-5);
90 return defaultOpts;
91 }
92
93
94 void updateBdr();
95
96
101 virtual void eval_into(const gsMatrix<T> & u, gsMatrix<T> & result) const;
102
104 virtual short_t domainDim() const { return m_slaveGeom->domainDim(); }
105
112
113
115 const std::vector< std::vector<T> > & breakPoints() const { return m_breakpoints; }
116
118 virtual std::ostream & print(std::ostream& os) const;
119
120private:
123
126}; // End gsCPPInterface
127
128
131template <class T>
132inline std::ostream & operator<<(std::ostream & os, const gsCPPInterface<T> & cppIf)
133{ return cppIf.print(os); }
134
135} // End namespace gismo
136
137#ifndef GISMO_BUILD_LIB
138#include GISMO_HPP_HEADER(gsCPPInterface.hpp)
139#endif
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
Provides a mapping between the corresponding sides of two patches sharing an interface,...
Definition gsCPPInterface.h:33
const std::vector< std::vector< T > > & breakPoints() const
Returns the break points used in makeDomainIterator.
Definition gsCPPInterface.h:115
gsDomainIterator< T >::uPtr makeDomainIterator() const
Returns a domain iterator.
Definition gsCPPInterface.hpp:130
void constructInterfaceBox()
Computes the box which represents the intersection of sides of incoming patches.
gsGeometry< T >::Ptr m_masterBdr
The boundary geometry of second patch – Master.
Definition gsCPPInterface.h:66
virtual short_t domainDim() const
Returns parameter dimension of the domains.
Definition gsCPPInterface.h:104
const gsBasis< T > * m_masterBasis
Basis on second patch.
Definition gsCPPInterface.h:69
const gsBasis< T > * m_slaveBasis
Basis on first patch.
Definition gsCPPInterface.h:68
const gsGeometry< T > * m_masterGeom
Geometry of first (Slave) patch and second patch (master)
Definition gsCPPInterface.h:65
T m_Tolerance
Tolerance for closest point algorithm.
Definition gsCPPInterface.h:73
virtual void eval_into(const gsMatrix< T > &u, gsMatrix< T > &result) const
Evaluates the interface map.
Definition gsCPPInterface.hpp:62
memory::shared_ptr< gsCPPInterface > Ptr
Shared pointer for gsRemapInterface.
Definition gsCPPInterface.h:37
memory::unique_ptr< gsCPPInterface > uPtr
Unique pointer for gsRemapInterface.
Definition gsCPPInterface.h:40
boundaryInterface m_boundaryInterface
Corresponding boundary interface.
Definition gsCPPInterface.h:71
virtual std::ostream & print(std::ostream &os) const
Prints the state of the object.
Definition gsCPPInterface.hpp:143
static gsOptionList defaultOptions()
Definition gsCPPInterface.h:85
std::ostream & operator<<(std::ostream &os, const gsCPPInterface< T > &cppIf)
Prints the state of the object.
Definition gsCPPInterface.h:132
std::vector< std::vector< T > > m_breakpoints
Union of breakpoints of both bases.
Definition gsCPPInterface.h:79
void constructBreaks()
Constructs the breakpoints m_breakpoints.
memory::unique_ptr< gsDomainIterator > uPtr
Unique pointer for gsDomainIterator.
Definition gsDomainIterator.h:73
A function from a n-dimensional domain to an m-dimensional image.
Definition gsFunction.h:60
Abstract base class representing a geometry map.
Definition gsGeometry.h:93
virtual short_t domainDim() const
Dimension d of the parameter domain (overriding gsFunction::domainDim()).
Definition gsGeometry.hpp:184
memory::shared_ptr< gsGeometry > Ptr
Shared pointer for gsGeometry.
Definition gsGeometry.h:97
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Holds a set of patch-wise bases and their topology information.
Definition gsMultiBasis.h:37
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition gsMultiPatch.h:100
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
void addInt(const std::string &label, const std::string &desc, const index_t &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:201
void addReal(const std::string &label, const std::string &desc, const Real &value)
Adds a option named label, with description desc and value value.
Definition gsOptionList.cpp:211
Implements an affine function.
Provides structs and classes related to interfaces and boundaries.
#define short_t
Definition gsConfig.h:35
#define index_t
Definition gsConfig.h:32
Provides a list of labeled parameters/options that can be set and accessed easily.
The G+Smo namespace, containing all definitions for the library.
Struct which represents an interface between two patches.
Definition gsBoundary.h:650