26 template<
short_t d,
class T>
27 class gsContainerBasisBase
31 typedef gsContainerBasis<d,T> basis;
32 typedef typename std::vector<basis> basisContainer;
35 typedef memory::shared_ptr< gsContainerBasisBase > Ptr;
38 typedef memory::unique_ptr< gsContainerBasisBase > uPtr;
42 virtual ~gsContainerBasisBase() {};
44 gsContainerBasisBase(gsMultiPatch<T> & mp, gsMultiBasis<T> & mb)
45 : m_patches(mp), m_multiBasis(mb)
52 virtual gsOptionList & options() {
return m_options; }
53 virtual void defaultOptions() { };
55 virtual void setOptions(gsOptionList opt) {m_options.update(opt, gsOptionList::addIfUnknown); };
57 virtual void init() = 0;
58 virtual void compute() = 0;
61 void getMultiBasis(gsMultiBasis<T> & multiBasis_result)
63 multiBasis_result.clear();
65 std::vector<gsBasis<T> *> basis_temp = std::vector<gsBasis<T> *>(m_patches.nPatches());
66 for (
size_t np = 0; np < m_patches.nPatches(); np++) {
67 gsContainerBasis<2, real_t>::uPtr basis = gsContainerBasis<d, T>::make(m_bases[np]);
68 basis_temp[np] =
static_cast<gsBasis<T> *
>(basis.release());
71 multiBasis_result = gsMultiBasis<T>(basis_temp, m_patches.topology());
74 gsSparseMatrix<T> & getSystem() {
return m_matrix; };
75 void setSystem(gsSparseMatrix<T> & system) { m_matrix = system; };
85 gsMultiPatch<T> & m_patches;
86 gsMultiBasis<T> & m_multiBasis;
89 gsOptionList m_options;
92 basisContainer m_bases;
95 gsSparseMatrix<T> m_matrix;
Provides a list of labeled parameters/options that can be set and accessed easily.
Provides declaration of Basis abstract interface. Similar to gsMultiBasis, but without topology...