wecopttool.core.derivative2_mat
- derivative2_mat(f1, nfreq, zero_freq=True)[source]
Assemble the second derivative matrix that converts the state vector of a response to the state vector of its second derivative.
For a state \(x\) consisting of the mean (DC) component followed by the real and imaginary components of the Fourier coefficients (excluding the imaginary component of the 2-point wave) as \(x=[X0, Re(X1), Im(X1), ..., Re(Xn)]\), the state of its second derivative is given as \((DD)x\), where \(DD\) is the second derivative matrix.
The time matrix has size
(nfreq*2, nfreq*2)
.If
zero_freq = False
(not default), the mean (DC) componentX0
is excluded, and the matrix/vector length is reduced by 1.