waves
Basic FE playground
wDirichlet.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 WDIRICHLET_H
18 #define WDIRICHLET_H
19 
20 #include "heat.h"
21 #include "wGroup.h"
22 #include <vector>
23 #include <string>
24 
25 using namespace tbox;
26 
27 namespace heat
28 {
29 
36 class HEAT_API Dirichlet : public Group
37 {
38 public:
39  std::vector<Node *> nodes;
40  double val;
41 
42  Dirichlet(std::shared_ptr<MshData> _msh, int no, double _val = 0.0);
43  Dirichlet(std::shared_ptr<MshData> _msh, std::string const &name, double _val = 0.0);
44  virtual ~Dirichlet() { std::cout << "~Dirichlet()\n"; }
45 
46  virtual void apply(std::vector<double> &rhs);
47 
48 #ifndef SWIG
49  virtual void write(std::ostream &out) const override;
50 #endif
51 };
52 
53 } // namespace heat
54 
55 #endif //WDIRICHLET_H
HEAT_API
#define HEAT_API
Definition: heat.h:29
heat::Dirichlet::nodes
std::vector< Node * > nodes
Definition: wDirichlet.h:39
heat::Dirichlet
manage Dirichlet BC
Definition: wDirichlet.h:36
heat
this namespace avoids conflicts with similar names in 'waves'
Definition: heat.h:38
heat::Dirichlet::val
double val
value for a constant BC
Definition: wDirichlet.h:40
heat.h
heat::Dirichlet::~Dirichlet
virtual ~Dirichlet()
Definition: wDirichlet.h:44