odeintw软件包中用于复杂矩阵微分方程的理论是什么? [英] What is the theory behind the odeintw package for complex matrix differential equations?

查看:51
本文介绍了odeintw软件包中用于复杂矩阵微分方程的理论是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在下面针对复数矩阵微分方程的大多数答案中,建议使用odeintw软件包. https://stackoverflow.com/a/45970853/7952027

In most of the below answers for complex matrix differential equations, the odeintw package has been suggested. https://stackoverflow.com/a/45970853/7952027

https://stackoverflow.com/a/26320130/7952027

https://stackoverflow.com/a/26747232/7952027

https://stackoverflow.com/a/26582411/7952027

我想了解在 odeintw 的代码中进行操作的背后的理论.就像为什么必须构建带状的jacobian一样,函数_complex_to_real_jac,_transform_banded_jac等背后的想法.

I want to know the theory behind the manipulations done in the code of odeintw. Like why one has to build that banded jacobian, the idea behind the functions _complex_to_real_jac, _transform_banded_jac, etc.

推荐答案

答案在注释中.

复数矩阵空间是一个实向量空间,因此复数矩阵可以由一个保留此线性结构的实数数组表示.odeintw要做的就是用这种基础转换(向前和向后)包装odeint或更好地赋予它的功能.

A complex matrix space is a real vector space, so a complex matrix can be represented by an array of real numbers preserving this linear structure. All odeintw has to do is to wrap odeint or better the function given to it with this basis transformation, forward and backward.

现在,如果您想通过提供Jacobian来加快计算速度,则还需要将其转换为实数形式.在以线条为例的示例中,您得到了带束缚的Jacobian字母,出于效率原因,翻译必须保留该属性.

Now if you want to speed up the computation by providing the Jacobian, it also needs to be translated into the real form. In the method of lines as example you get banded Jacobians, the translation has to keep that property for efficiency reasons.

M-o-L是求解热方程或波动方程类型的PDE的常用方法.从本质上讲,它使空间维离散化,同时使时间维连续,从而在时间方向上形成了大维ODE系统.所得的雅可比行列式在最近的邻居互动中仅是非零的,因此非常稀疏,并且如果离散化是通过常规网格进行的,则具有带状结构.

M-o-L is a common method in solving PDE of the heat or wave equation type. Essentially, it discretizes the space dimension(s) while leaving the time dimension continuous, resulting in a large-dimensional ODE system in time direction. The resulting Jacobians only are non-zero at nearest-neighbor interactions, thus very sparse, and have a banded structure if the discretization is via a regular grid.

  • lutz-lehmann
  • 当您想通过Dfun参数指定雅可比行列时,就会出现非平凡的部分.复雅可比行列式要求方程的右手边是可复微分的(即全纯的).例如,函数f(z)= z *(复共轭)不可复微分,因此您不能为方程dz/dt = z *指定复雅可比行列式.您将不得不将其重写为实方程组.(此示例位于odeintw的文档字符串中.)

    The nontrivial part arises when you want to specify the Jacobian via the Dfun argument. The complex Jacobian requires that the right-hand side of the equation be complex differentiable (i.e. holomorphic). For example, the function f(z) = z* (the complex conjugate) is not complex differentiable, so you can't specify a complex Jacobian for the equation dz/dt = z*. You would have to rewrite it as a system of real equations. (This example is in the docstring of odeintw.)

    如果右侧是可复复数的,则可以通过Dfun给出一个复杂的雅可比行列式.

    If the right-hand side is complex differentiable, then you can give a complex Jacobian via Dfun.

    • warren-weckesser
    • 这篇关于odeintw软件包中用于复杂矩阵微分方程的理论是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆