MicroModelicaCCompiler  4.5.3
derivative.hpp
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  This file is part of QSS Solver.
4 
5  QSS Solver is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  QSS Solver is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QSS Solver. If not, see <http://www.gnu.org/licenses/>.
17 
18  ******************************************************************************/
19 
20 #pragma once
21 
22 #include <map>
23 
24 #include <ast/ast_types.hpp>
25 #include "../util/util_types.hpp"
26 #include "../util/visitors/jac_alg_exps.hpp"
27 #include "index.hpp"
28 #include "equation.hpp"
29 #include "expression.hpp"
30 
31 namespace MicroModelica {
32 namespace IR {
33 
34 class EquationDerivator {
35  public:
36  static AST_Equation_Equality derivate(AST_Equation_Equality eq);
37 };
38 
39 class ExpressionDerivator {
40  public:
42  ~ExpressionDerivator() = default;
43 
44  static AST_Expression derivate(AST_Expression exp, Expression e);
45  static Expression partialDerivative(Equation eq, Index variable);
46 };
47 
48 } // namespace IR
49 } // namespace MicroModelica
MicroModelica::IR::ExpressionDerivator::partialDerivative
static Expression partialDerivative(Equation eq, Index variable)
Definition: derivative.cpp:89
index.hpp
expression.hpp
MicroModelica::IR::ExpressionDerivator::ExpressionDerivator
ExpressionDerivator()
Definition: derivative.cpp:63
MicroModelica::IR::EquationDerivator::derivate
static AST_Equation_Equality derivate(AST_Equation_Equality eq)
Definition: derivative.cpp:65
equation.hpp
MicroModelica::IR::ExpressionDerivator::~ExpressionDerivator
~ExpressionDerivator()=default
MicroModelica
Definition: files.cpp:45
ast_types.hpp
MicroModelica::IR::ExpressionDerivator::derivate
static AST_Expression derivate(AST_Expression exp, Expression e)
Definition: derivative.cpp:78