waves
Basic FE playground
wBoundary.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 University of Liège
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef WBOUNDARY_H
18 #define WBOUNDARY_H
19 
20 #include "flow.h"
21 #include "wGroups.h"
22 
23 #include <vector>
24 #include <map>
25 #include <Eigen/Dense>
26 
27 namespace flow
28 {
29 
34 class FLOW_API Boundary : public tbox::Groups
35 {
36 public:
37  std::vector<tbox::Node *> nodes;
38  std::map<tbox::Node *, size_t> nMap;
39  std::map<tbox::Element *, tbox::Element *> svMap;
40  double Cl;
41  double Cd;
42  double Cs;
43  double Cm;
44  std::vector<Eigen::Vector3d> nLoads;
45 
46  Boundary(std::shared_ptr<tbox::MshData> _msh, std::vector<int> const &nos);
47  Boundary(std::shared_ptr<tbox::MshData> _msh, std::vector<std::string> const &names);
48  virtual ~Boundary() { std::cout << "~Boundary()\n"; }
49 
50  void save(std::string const &name, tbox::Results const &res);
51 
52 #ifndef SWIG
53  virtual void write(std::ostream &out) const override;
54 #endif
55 
56 private:
57  void create();
58 };
59 
60 } // namespace flow
61 
62 #endif //WBOUNDARY_H
flow::Boundary::Cl
double Cl
lift coefficient
Definition: wBoundary.h:40
flow::Boundary
Handle the boundary of a medium.
Definition: wBoundary.h:34
FLOW_API
#define FLOW_API
Definition: flow.h:29
flow
Namespace for flow module.
Definition: flow.h:37
flow::Boundary::svMap
std::map< tbox::Element *, tbox::Element * > svMap
surface to volume element map
Definition: wBoundary.h:39
flow::Boundary::nMap
std::map< tbox::Node *, size_t > nMap
node to local index map
Definition: wBoundary.h:38
flow::Boundary::Cm
double Cm
pitch moment coefficient (positive nose-up)
Definition: wBoundary.h:43
flow::Boundary::nodes
std::vector< tbox::Node * > nodes
nodes of Boundary
Definition: wBoundary.h:37
flow::Boundary::nLoads
std::vector< Eigen::Vector3d > nLoads
nodal (normalized) aerodynamic loads on boundary
Definition: wBoundary.h:44
flow::Boundary::Cd
double Cd
drag coefficient
Definition: wBoundary.h:41
flow::Boundary::~Boundary
virtual ~Boundary()
Definition: wBoundary.h:48
flow.h
flow::Boundary::Cs
double Cs
sideforce coefficient
Definition: wBoundary.h:42