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 "mirrors.h"
21 #include "wObject.h"
22 #include <iostream>
23 #include <vector>
24 #include <string>
25 #include <memory>
26 
27 using namespace tbox;
28 
29 namespace mirrors
30 {
31 
36 class MIRRORS_API Problem : public fwk::wObject
37 {
38 public:
39  std::shared_ptr<MshData> msh;
40 #ifndef SWIG
41  std::string problem_type; // [RB] TODO use an enum instead!
42  std::vector<Medium *> media;
43 
44  std::vector<uDirichlet *> duBCs;
45  std::vector<TDirichlet *> dTBCs;
46 
47  std::vector<TSource *> Tsrcs;
48 
49  std::vector<uNeumann *> nuBCs;
50  std::vector<TNeumann *> nTBCs;
51 
52  std::vector<MSurface *> MS;
53 
54  //std::vector<uContact*> uContact; ///< mechanical contact interface
55  //std::vector<TContact*> TContact; ///< thermal contact interface
56 
57  double T_ref;
58 #endif
59  double Sol;
60  std::vector<ANSYSSolution *> ANSYSSol;
61 public:
62  Problem(std::shared_ptr<MshData> _msh, std::string problem_type, double T_ref = 0);
63 
64 #ifndef SWIG
65  void initElems();
66  virtual void write(std::ostream &out) const override;
67 #endif
68 };
69 
70 } // namespace mirrors
71 
72 #endif //WPROBLEM_H
mirrors::Problem::problem_type
std::string problem_type
Definition: wProblem.h:41
mirrors::Problem::T_ref
double T_ref
Definition: wProblem.h:57
mirrors
this namespace avoids conflicts with similar names in 'waves'
Definition: mirrors.h:37
mirrors::Problem
a class containing the problem parameters
Definition: wProblem.h:36
mirrors::Problem::ANSYSSol
std::vector< ANSYSSolution * > ANSYSSol
Ansys sol.
Definition: wProblem.h:60
mirrors::Problem::media
std::vector< Medium * > media
Materials.
Definition: wProblem.h:42
mirrors::Problem::Sol
double Sol
Definition: wProblem.h:59
mirrors::Problem::nuBCs
std::vector< uNeumann * > nuBCs
mechanical von Neumann boundary conditions
Definition: wProblem.h:49
mirrors::Problem::Tsrcs
std::vector< TSource * > Tsrcs
volumic heat sources
Definition: wProblem.h:47
mirrors.h
mirrors::Problem::MS
std::vector< MSurface * > MS
Mirrors surface.
Definition: wProblem.h:52
mirrors::Problem::duBCs
std::vector< uDirichlet * > duBCs
mechanical Dirichlet boundary conditions
Definition: wProblem.h:44
mirrors::Problem::dTBCs
std::vector< TDirichlet * > dTBCs
thermal Dirichlet boundary conditions
Definition: wProblem.h:45
mirrors::Problem::msh
std::shared_ptr< MshData > msh
Mesh structure.
Definition: wProblem.h:39
mirrors::Problem::nTBCs
std::vector< TNeumann * > nTBCs
thermal von Neumann boundary conditions
Definition: wProblem.h:50
MIRRORS_API
#define MIRRORS_API
Definition: mirrors.h:29