G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsBarrierPatch.h
Go to the documentation of this file.
1 
17 #pragma once
18 
19 #include <gsIO/gsOptionList.h>
20 
21 #ifdef gsHLBFGS_ENABLED
22 #include <gsHLBFGS/gsHLBFGS.h>
23 #endif
24 
25 using namespace gismo;
26 
27 namespace gismo
28 {
37 template<short_t d, typename T=real_t>
39 {
40  public:
42  explicit gsBarrierPatch(const gsMultiPatch<T> &mp, const gsDofMapper &mapper);
43 
45  explicit gsBarrierPatch(const gsMultiPatch<T> &mp, bool patchWise = true);
46 
48  void setMapper(const gsDofMapper &mapper) { m_mapper = mapper; };
49 
51  void compute();
52 
54  const gsMultiPatch<T> &result() const { return m_mp; };
55 
57  gsOptionList &options() { return m_options; };
58 
60  void defaultOptions();
61 
62  private:
64  void _makeMapper();
65 
67  gsDofMapper _makeMapperOnePatch(const gsGeometry<T>&currPatch) const;
68 
70  void _makeMapperGlobalPatches();
71 
73  void _makeMapperLocalPatches();
74 
76  void logMapperInformation();
77 
78  mutable gsExprEvaluator<T> m_evaluator;
79  mutable gsExprAssembler<T> m_assembler;
80  gsDofMapper m_mapper;
81 
82  mutable gsMultiPatch<T> m_mp;
83  gsMultiBasis<T> m_mb;
84  gsMultiPatch<T> m_bRep;
85 
86  std::string m_filename;
87  T m_boxsize = 1.0;
88 
89  gsVector<T, d> m_boundingBoxLeftBottomCorner;
90  gsVector<T, d> m_scalingVec;
91 
92  size_t m_freeInterface = 1;
93  gsOptionList m_options;
94 };
95 
96 
97 #ifdef GISMO_WITH_PYBIND11
98 
102  void pybind11_init_gsBarrierPatch2(pybind11::module &m);
103  void pybind11_init_gsBarrierPatch3(pybind11::module &m);
104 
105 #endif // GISMO_WITH_PYBIND11
106 
107 }// namespace gismo
108 
109 #ifndef GISMO_BUILD_LIB
110 #include GISMO_HPP_HEADER(gsBarrierPatch.hpp)
111 #endif
Abstract base class representing a geometry map.
Definition: gsGeometry.h:92
Definition: gsExprAssembler.h:30
Maintains a mapping from patch-local dofs to global dof indices and allows the elimination of individ...
Definition: gsDofMapper.h:68
Provides a list of labeled parameters/options that can be set and accessed easily.
Holds a set of patch-wise bases and their topology information.
Definition: gsMultiBasis.h:36
gsOptionList & options()
Returns the options list.
Definition: gsBarrierPatch.h:57
void setMapper(const gsDofMapper &mapper)
Sets the mapper.
Definition: gsBarrierPatch.h:48
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
Generic evaluator of isogeometric expressions.
Definition: gsExprEvaluator.h:38
Computes a patch parametrization given a set of boundary geometries. Parametrization is not guarantee...
Definition: gsBarrierPatch.h:38
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
const gsMultiPatch< T > & result() const
Returns the result in a multi-patch format.
Definition: gsBarrierPatch.h:54