waves
Basic FE playground
wMedium.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 WMEDIUM_H
18 #define WMEDIUM_H
19 
20 #include "flow.h"
21 #include "wGroup.h"
22 #include "wF0El.h"
23 #include "wF0Ps.h"
24 #include <map>
25 
26 namespace flow
27 {
28 
33 class FLOW_API Medium : public tbox::Group
34 {
35 private:
36  size_t nCnt;
37 public:
38  std::map<tbox::Node *, std::vector<tbox::Element *>> neMap;
39 
40 #ifndef SWIG
41  F0El *rho;
43  F0El *cP;
45 #endif
46 
47  std::vector<std::pair<tbox::Element *, std::vector<tbox::Element *>>> adjMap;
48 
49  Medium(std::shared_ptr<tbox::MshData> _msh, int no, double mInf, int dim, double alpha, double beta);
50  Medium(std::shared_ptr<tbox::MshData> _msh, std::string const &name, double mInf, int dim, double alpha, double beta);
51  virtual ~Medium();
52 
53 #ifndef SWIG
54  void initFun(double mInf, int dim, double alpha, double beta);
55  void createMap();
56  virtual void write(std::ostream &out) const override;
57 #endif
58 };
59 
60 } // namespace flow
61 
62 #endif //WMEDIUM_H
flow::F0PsPhiInf
Freestream potential.
Definition: wF0Ps.h:42
flow::Medium::nCnt
size_t nCnt
number of nodes
Definition: wMedium.h:36
flow::Medium::adjMap
std::vector< std::pair< tbox::Element *, std::vector< tbox::Element * > > > adjMap
map of adjacent elements
Definition: wMedium.h:47
flow::Medium
Handle fluid medium.
Definition: wMedium.h:33
FLOW_API
#define FLOW_API
Definition: flow.h:29
flow::Medium::cP
F0El * cP
pressure coefficient
Definition: wMedium.h:43
wF0El.h
flow
Namespace for flow module.
Definition: flow.h:37
wF0Ps.h
flow::Medium::phiInf
F0PsPhiInf * phiInf
freestream potential
Definition: wMedium.h:44
flow::Medium::rho
F0El * rho
density
Definition: wMedium.h:41
flow::Medium::mach
F0El * mach
Mach number.
Definition: wMedium.h:42
flow::Medium::neMap
std::map< tbox::Node *, std::vector< tbox::Element * > > neMap
map each elements connected to a node
Definition: wMedium.h:38
flow::F0El
Scalar function to be integrated over an element.
Definition: wF0El.h:31
flow.h