Chi-Tech
fv_diffusion_solver.h
Go to the documentation of this file.
1#ifndef FV_DIFFUSION_SOLVER_H
2#define FV_DIFFUSION_SOLVER_H
3
6
8#include "utils/chi_timer.h"
9
10#include "console/chi_console.h"
11
12#include "mesh/chi_mesh.h"
13
14#include <map>
15
16// forward declaration
17namespace chi_mesh
18{
19 class MeshContinuum;
20 typedef std::shared_ptr<MeshContinuum> MeshContinuumPtr;
21}
22namespace chi_math
23{
24 class SpatialDiscretization;
25 typedef std::shared_ptr<SpatialDiscretization> SDMPtr ;
26}
27
28namespace fv_diffusion
29{
30/** FV diffusion solver
31 *
32*/
34 {
35 public:
37
39
40 size_t num_local_dofs_ = 0;
41 size_t num_globl_dofs_ = 0;
42
43 Vec x_ = nullptr; // approx solution
44 Vec b_ = nullptr; // RHS
45 Mat A_ = nullptr; // linear system matrix
46
47 typedef std::pair<fv_diffusion::BoundaryType,std::vector<double>> BoundaryInfo;
48 typedef std::map<std::string, BoundaryInfo> BoundaryPreferences;
50 std::map<uint64_t, Boundary> boundaries_;
51
52 explicit Solver(const std::string& in_solver_name);
53 ~Solver() override;
54
55 // void Initialize() override;
56 void Initialize() override;
57 void Execute() override;
58
59 static double CallLua_iXYZFunction(lua_State* L,
60 const std::string&,
61 int,
62 const chi_mesh::Vector3&);
63
65 };
66
67} // namespace fv_diffusion
68
69
70#endif //FV_DIFFUSION_SOLVER_H
71
Solver(const std::string &in_solver_name)
void Initialize() override
std::map< uint64_t, Boundary > boundaries_
BoundaryPreferences boundary_preferences_
std::map< std::string, BoundaryInfo > BoundaryPreferences
static double CallLua_iXYZFunction(lua_State *L, const std::string &, int, const chi_mesh::Vector3 &)
std::pair< fv_diffusion::BoundaryType, std::vector< double > > BoundaryInfo
chi_mesh::MeshContinuumPtr grid_ptr_
chi_math::SDMPtr sdm_ptr_
std::shared_ptr< SpatialDiscretization > SDMPtr
std::shared_ptr< MeshContinuum > MeshContinuumPtr
Definition: chi_mesh.h:44
struct _p_Mat * Mat
struct _p_Vec * Vec