User Guide
diffeq_helper.hpp File Reference

Go to the source code of this file.

Namespaces

 nmodl
 encapsulates code generation backend implementations
 
 nmodl::parser
 encapsulate lexer and parsers implementations
 
 nmodl::parser::diffeq
 Helper functions for solving differential equations.
 

Enumerations

enum  nmodl::parser::diffeq::MathOp { nmodl::parser::diffeq::MathOp::add = 1, nmodl::parser::diffeq::MathOp::sub, nmodl::parser::diffeq::MathOp::mul, nmodl::parser::diffeq::MathOp::div }
 operators beign supported as part of binary expressions More...
 

Functions

template<MathOp Op>
Term nmodl::parser::diffeq::eval_derivative (const Term &first, const Term &second, bool &deriv_invalid, bool &eqn_invalid)
 
template<>
Term nmodl::parser::diffeq::eval_derivative< MathOp::add > (const Term &first, const Term &second, bool &deriv_invalid, bool &eqn_invalid)
 implement (f(x) + g(x))' = f'(x) + g'(x) More...
 
template<>
Term nmodl::parser::diffeq::eval_derivative< MathOp::sub > (const Term &first, const Term &second, bool &deriv_invalid, bool &eqn_invalid)
 implement (f(x) - g(x))' = f'(x) - g'(x) More...
 
template<>
Term nmodl::parser::diffeq::eval_derivative< MathOp::mul > (const Term &first, const Term &second, bool &deriv_invalid, bool &eqn_invalid)
 implement (f(x) * g(x))' = f'(x)g(x) + f(x)g'(x) More...
 
template<>
Term nmodl::parser::diffeq::eval_derivative< MathOp::div > (const Term &first, const Term &second, bool &deriv_invalid, bool &eqn_invalid)
 Implement (f(x) / g(x))' = (f'(x)g(x) - f(x)g'(x))/g^2(x) Note that the implementation is very limited for the g(x) and this needs to be discussed with Michael. More...