RBFBox.hpp
1 /*---------------------------------------------------------------------------*\
2  *
3  * mimmo
4  *
5  * Copyright (C) 2015-201/ OPTIMAD engineering Srl
6  *
7  * -------------------------------------------------------------------------
8  * License
9  * This file is part of mimmo.
10  *
11  * mimmo is free software: you can redistribute it and/or modify it
12  * under the terms of the GNU Lesser General Public License v3 (LGPL)
13  * as published by the Free Software Foundation.
14  *
15  * mimmo is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18  * License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with mimmo. If not, see <http://www.gnu.org/licenses/>.
22  *
23 \*---------------------------------------------------------------------------*/
24 #ifndef __RBFBox_HPP__
25 #define __RBFBox_HPP__
26 
27 #include "BaseManipulation.hpp"
28 
29 namespace mimmo{
30 
74 class RBFBox: public BaseManipulation {
75 
76 protected:
79  double m_suppR;
82 public:
83  RBFBox();
84  RBFBox(const bitpit::Config::Section & rootXML);
85  virtual ~RBFBox();
86 
87  //copy operators/constructors
88  RBFBox(const RBFBox & other);
89 
90  void buildPorts();
91 
92  //clean structure;
93  void clearRBFBox();
94 
95  //internal methods
97  darray3E getSpan();
98  void getAABB(darray3E & bMin, darray3E & bMax);
100  void setSupportRadius(double suppR_);
101 
102  //plotting wrappers
103  void plot(std::string directory, std::string filename, int counter, bool binary);
104 
105  //building method
106  void execute();
107 
108  virtual void absorbSectionXML(const bitpit::Config::Section & slotXML, std::string name = "");
109  virtual void flushSectionXML(bitpit::Config::Section & slotXML, std::string name= "");
110 
111 
112 protected:
113  virtual void plotOptionalResults();
114  void swap(RBFBox & x) noexcept;
115 };
116 
117 REGISTER_PORT(M_GEOM, MC_SCALAR, MD_MIMMO_,__RBFBox_HPP__)
118 REGISTER_PORT(M_VALUED, MC_SCALAR, MD_FLOAT,__RBFBox_HPP__)
119 REGISTER_PORT(M_POINT, MC_ARRAY3, MD_FLOAT,__RBFBox_HPP__)
120 REGISTER_PORT(M_SPAN, MC_ARRAY3, MD_FLOAT,__RBFBox_HPP__)
121 
122 
123 REGISTER(BaseManipulation,RBFBox, "mimmo.RBFBox")
124 };
125 
126 #endif /* __RBFBOX_HPP__ */
void clearRBFBox()
Definition: RBFBox.cpp:102
#define M_GEOM
darray3E getOrigin()
Definition: RBFBox.cpp:115
#define MC_ARRAY3
void getAABB(darray3E &bMin, darray3E &bMax)
Definition: RBFBox.cpp:133
#define MD_FLOAT
void buildPorts()
Definition: RBFBox.cpp:87
void setSupportRadius(double suppR_)
Definition: RBFBox.cpp:153
void setGeometry(MimmoSharedPointer< MimmoObject > cloud)
Definition: RBFBox.cpp:142
virtual void plotOptionalResults()
Definition: RBFBox.cpp:246
void plot(std::string directory, std::string filename, int counter, bool binary)
Definition: RBFBox.cpp:165
darray3E m_span
Definition: RBFBox.hpp:78
#define M_POINT
BaseManipulation is the base class of any manipulation object of the library.
void execute()
Definition: RBFBox.cpp:209
Radial Basis Functions Bounding Box calculator.
Definition: RBFBox.hpp:74
#define MC_SCALAR
#define REGISTER_PORT(Name, Container, Datatype, ManipBlock)
#define M_SPAN
virtual void flushSectionXML(bitpit::Config::Section &slotXML, std::string name="")
Definition: RBFBox.cpp:280
void swap(RBFBox &x) noexcept
Definition: RBFBox.cpp:76
#define M_VALUED
virtual void absorbSectionXML(const bitpit::Config::Section &slotXML, std::string name="")
Definition: RBFBox.cpp:256
#define MD_MIMMO_
virtual ~RBFBox()
Definition: RBFBox.cpp:61
std::array< double, 3 > darray3E
MimmoSharedPointer is a custom implementation of shared pointer.
double m_suppR
Definition: RBFBox.hpp:79
darray3E m_origin
Definition: RBFBox.hpp:77
darray3E getSpan()
Definition: RBFBox.cpp:124
#define REGISTER(Base, Derived, name)
Definition: factory.hpp:206