waves
Basic FE playground
wSolver.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 WSOLVER_H
18 #define WSOLVER_H
19 
20 #include "mirrors.h"
21 #include "wObject.h"
22 #include "wTimers.h"
23 #include <iostream>
24 #include <memory>
25 
26 namespace mirrors
27 {
28 
33 class MIRRORS_API Solver : public fwk::wObject
34 {
35 public:
36 #ifndef SWIG
38 #endif
39  std::shared_ptr<tbox::LinearSolver> linsol;
40  fwk::Timers tms;
41  int nthreads;
42 
43 public:
44  Solver(Problem &pbl, std::shared_ptr<tbox::LinearSolver> _linsol, int nthreads = 1);
45 
46  void start(tbox::MshExport *mshWriter);
47 #ifndef SWIG
48  virtual void write(std::ostream &out) const override;
49 #endif
50 };
51 
52 } // namespace mirrors
53 
54 #endif //WSOLVER_H
mirrors::Solver::pbl
Problem & pbl
Definition: wSolver.h:37
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.h
mirrors::Solver::linsol
std::shared_ptr< tbox::LinearSolver > linsol
linear solver
Definition: wSolver.h:39
mirrors::Solver::nthreads
int nthreads
nb of threads for the assembly
Definition: wSolver.h:41
mirrors::Solver::tms
fwk::Timers tms
timers
Definition: wSolver.h:40
mirrors::Solver
a class containing the problem parameters
Definition: wSolver.h:33
MIRRORS_API
#define MIRRORS_API
Definition: mirrors.h:29