waves
Basic FE playground
wF1El.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 WF1EL_H
18 #define WF1EL_H
19 
20 #include "flow.h"
21 #include "wObserver.h"
22 #include <vector>
23 #include <Eigen/Dense>
24 
25 namespace flow
26 {
27 
31 class FLOW_API F1El : public fwk::Observer
32 {
33 public:
34  F1El() : Observer() {}
35  virtual ~F1El() {}
36 
37  virtual Eigen::Vector3d eval(tbox::Element const &e, std::vector<double> const &u,
38  size_t k) const = 0;
39  virtual Eigen::Vector3d evalGrad(tbox::Element const &e, std::vector<double> const &u,
40  size_t k) const = 0;
41 };
42 
46 class FLOW_API F1ElVi : public F1El
47 {
48  int nDim;
49  double beta;
50  Eigen::Vector3d v;
51  Eigen::Vector3d dv;
52 
53 public:
54  F1ElVi(int _nDim, double alpha, double _beta = 0);
55  virtual void update(double alpha) override;
56 
57  virtual Eigen::Vector3d eval(tbox::Element const &e, std::vector<double> const &u,
58  size_t k) const override;
59  virtual Eigen::Vector3d evalGrad(tbox::Element const &e, std::vector<double> const &u,
60  size_t k) const override;
61 };
62 
63 } // namespace flow
64 
65 #endif //WF1EL_H
flow::F1ElVi::dv
Eigen::Vector3d dv
freestream velocity vector gradient (wrt alpha)
Definition: wF1El.h:51
flow::F1El::~F1El
virtual ~F1El()
Definition: wF1El.h:35
flow::F1ElVi::v
Eigen::Vector3d v
freestream velocity vector
Definition: wF1El.h:50
FLOW_API
#define FLOW_API
Definition: flow.h:29
flow
Namespace for flow module.
Definition: flow.h:37
flow::F1ElVi
Freestream velocity.
Definition: wF1El.h:46
flow::F1El::F1El
F1El()
Definition: wF1El.h:34
flow::F1ElVi::beta
double beta
angle of sideslip
Definition: wF1El.h:49
flow::F1ElVi::nDim
int nDim
number of dimensions
Definition: wF1El.h:48
flow::F1El
Vector function to be integrated over an element.
Definition: wF1El.h:31
flow.h