EPANET  3.0
EPANET Development Project
hydsolver.h
Go to the documentation of this file.
1 /* EPANET 3
2  *
3  * Copyright (c) 2016 Open Water Analytics
4  * Licensed under the terms of the MIT License (see the LICENSE file for details).
5  *
6  */
7 
10 
11 #ifndef HYDSOLVER_H_
12 #define HYDSOLVER_H_
13 
14 #include <string>
15 
16 class Network;
17 class MatrixSolver;
18 
25 
26 class HydSolver
27 {
28  public:
29 
30  enum StatusCode {
31  SUCCESSFUL,
32  FAILED_NO_CONVERGENCE,
33  FAILED_ILL_CONDITIONED
34  };
35 
36  HydSolver(Network* nw, MatrixSolver* ms);
37  virtual ~HydSolver();
38  static HydSolver* factory(const std::string name, Network* nw, MatrixSolver* ms);
39  virtual int solve(double tstep, int& trials) = 0;
40 
41  protected:
42 
43  Network* network;
44  MatrixSolver* matrixSolver;
45 
46 };
47 
48 #endif
Abstract class for solving a set of linear equations.
Definition: matrixsolver.h:27
Interface for an equilibrium network hydraulic solver.
Definition: hydsolver.h:26
Contains the data elements that describe a pipe network.
Definition: network.h:41