waves
Basic FE playground
wProblem.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 WPROBLEM_H
18 #define WPROBLEM_H
19 
20 #include "waves.h"
21 #include "wObject.h"
22 #include <iostream>
23 #include <vector>
24 #include <memory>
25 
26 using namespace tbox;
27 
28 namespace waves
29 {
30 
35 class WAVES_API Problem : public fwk::wSharedObject
36 {
37 public:
38  std::shared_ptr<MshData> msh;
39 #ifndef SWIG
40  std::vector<std::shared_ptr<Source>> srcs;
41  std::vector<std::shared_ptr<Medium>> media;
42  std::vector<std::shared_ptr<Boundary>> bnds;
43 #endif
44  Problem(std::shared_ptr<MshData> _msh);
45  virtual ~Problem();
46 
47  void add(std::shared_ptr<Source> s) { srcs.push_back(s); }
48  void add(std::shared_ptr<Medium> m) { media.push_back(m); }
49  void add(std::shared_ptr<Boundary> b) { bnds.push_back(b); }
50 
51 #ifndef SWIG
52  void initElems();
53  virtual void write(std::ostream &out) const override;
54 #endif
55 };
56 } // namespace waves
57 
58 #endif //WPROBLEM_H
waves::Problem
main wave Problem object
Definition: wProblem.h:35
WAVES_API
#define WAVES_API
Definition: waves.h:29
waves::Problem::add
void add(std::shared_ptr< Boundary > b)
Definition: wProblem.h:49
waves::Problem::add
void add(std::shared_ptr< Source > s)
Definition: wProblem.h:47
waves::Problem::media
std::vector< std::shared_ptr< Medium > > media
Definition: wProblem.h:41
waves::Problem::bnds
std::vector< std::shared_ptr< Boundary > > bnds
Definition: wProblem.h:42
waves::Problem::srcs
std::vector< std::shared_ptr< Source > > srcs
Definition: wProblem.h:40
waves::Problem::add
void add(std::shared_ptr< Medium > m)
Definition: wProblem.h:48
waves::Problem::msh
std::shared_ptr< MshData > msh
Definition: wProblem.h:38
waves
Definition: waves.h:34
waves.h