Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve docs and code of newmark_ss #267

Merged
merged 14 commits into from
Nov 17, 2023

Conversation

bbahiam
Copy link
Contributor

@bbahiam bbahiam commented Oct 27, 2023

Changes in the documentation of newmark_ss

I spotted some small errors in the documentation of the newmark_ss function (the code was ok!) and I decided to improve them since this is a pretty good tutorial on the method that may be useful for my team as well. Therefore I did some improvements such as

  • Correcting mistakes such as missed parenthesis; extra derivative dots; etc.
  • Making the notation more uniform: C was used for both the damping matrix and the state-space C matrix; q and x were used for the position interchangeably; now all matrices are bold upper-case and vectors are bold lower-case.

Changes in the code of newmark_ss

I tried to make the code slightly faster and more accurate by reusing the factorization of the Ass1 matrix and by using the factorization of the M matrix to compute the multiplication by the inverse (due to the triangular structure of the factorization this is both faster and more accurate). This caused a change in the function arguments since it now takes the M matrix instead of its inverse. I also added the option to factorize the M matrix using Cholesky, but I did not enable that option since I am not familiar enough with SHARPy's theory to be 100% sure that the M matrix is symmetric positive definite. I would like to ask the core developers to consider enabling that option on the calls to newmark_ss. It has better numerical properties than the LU decomposition. I cleaned up some dead code close to the other changes I made and replaced some of the usages of np.dot by @ for matrix multiplication, since this is a NumPy best practice.

Changes in the installation documentation

I did some small additions to the installation with Docker section that I found useful when I used it for testing:

  • I added a tip suggesting at least 16GB of RAM for the Docker container. My computer defaulted to 8GB which was not enough and I had an out-of-memory error
  • I separated the procedures for testing so that it is easier to find. The installation with Docker was so easy that I did not even have to read the instructions, and then I did not see that! Kudos to the developers!

Testing of the changes

I tested the changes on Docker, and I am pasting the output below. I believe all tests passed but I would like to double check if the warnings are expected.

SHARPy> git log -1
commit db53dcfd85389b6cb8491ad63b7c2a5b4cd9b7aa (HEAD -> linear, origin/linear)
Author: Bernardo Bahia Monteiro <bbahia@umich.edu>
Date:   Fri Oct 27 22:48:56 2023 +0000

    [docs] Create section for testing in Docker so it is easier to find
SHARPy> git status
On branch linear
Your branch is up to date with 'origin/linear'.

nothing to commit, working tree clean
SHARPy> cd /sharpy_dir/ && python -m unittest
running unittest
fatal: No names found, cannot describe anything.
running unittest
fatal: No names found, cannot describe anything.
.fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/structure/models/beam.py:547: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  ibody_beam.connectivities[ielem, inode_in_elem] = int_list_nodes[ibody_nodes == ibody_beam.connectivities[ielem, inode_in_elem]]
fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/structure/models/beam.py:547: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  ibody_beam.connectivities[ielem, inode_in_elem] = int_list_nodes[ibody_nodes == ibody_beam.connectivities[ielem, inode_in_elem]]
.fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/structure/models/beam.py:547: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  ibody_beam.connectivities[ielem, inode_in_elem] = int_list_nodes[ibody_nodes == ibody_beam.connectivities[ielem, inode_in_elem]]
.fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/structure/models/beam.py:547: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  ibody_beam.connectivities[ielem, inode_in_elem] = int_list_nodes[ibody_nodes == ibody_beam.connectivities[ielem, inode_in_elem]]
.fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/structure/models/beam.py:547: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  ibody_beam.connectivities[ielem, inode_in_elem] = int_list_nodes[ibody_nodes == ibody_beam.connectivities[ielem, inode_in_elem]]
.fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/structure/models/beam.py:547: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  ibody_beam.connectivities[ielem, inode_in_elem] = int_list_nodes[ibody_nodes == ibody_beam.connectivities[ielem, inode_in_elem]]
./miniconda3/envs/sharpy/lib/python3.10/xml/etree/ElementTree.py:1651: ResourceWarning: unclosed file <_io.BufferedReader name='/sharpy_dir/tests/coupled/prescribed/WindTurbine/../../../../docs/source/content/example_notebooks/source/type04_db_nrel5mw_oc3_v06.xlsx'>
  return self.target.start(tag, attrib)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
fatal: No names found, cannot describe anything.
.sfatal: No names found, cannot describe anything.
.fatal: No names found, cannot describe anything.
False
.fatal: No names found, cannot describe anything.
False
.fatal: No names found, cannot describe anything.
False
.fatal: No names found, cannot describe anything.
False
.fatal: No names found, cannot describe anything.
.............fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
/sharpy_dir/sharpy/linear/src/lingebm.py:313: UserWarning: Euler parametrisation not implemented - Either rigid body modes are not being used or this method has already been called.
  warnings.warn('Euler parametrisation not implemented - Either rigid body modes are not being used or this '
/sharpy_dir/sharpy/solvers/lindynamicsim.py:164: UserWarning: Number of states in the initial state vector not equal to the number of states
  warnings.warn('Number of states in the initial state vector not equal to the number of states')
.....fatal: No names found, cannot describe anything.
False
/sharpy_dir/sharpy/structure/utils/modalutils.py:469: ComplexWarning: Casting complex values to real discards the imaginary part
  phi_rr[:, index_mode] = eigenvectors[-num_rigid_modes:, i]
/sharpy_dir/sharpy/linear/src/lingebm.py:1019: ComplexWarning: Casting complex values to real discards the imaginary part
  Ass[Nmodes:, Nmodes:] = -self.Ccut[:Nmodes, :Nmodes]
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
/sharpy_dir/sharpy/solvers/modal.py:269: UserWarning: Projecting a system with damping on undamped modal shapes
  warnings.warn('Projecting a system with damping on undamped modal shapes')
/sharpy_dir/sharpy/structure/utils/modalutils.py:469: ComplexWarning: Casting complex values to real discards the imaginary part
  phi_rr[:, index_mode] = eigenvectors[-num_rigid_modes:, i]
/sharpy_dir/sharpy/linear/src/lingebm.py:1019: ComplexWarning: Casting complex values to real discards the imaginary part
  Ass[Nmodes:, Nmodes:] = -self.Ccut[:Nmodes, :Nmodes]
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
fatal: No names found, cannot describe anything.
False
..fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/zipfile.py:1821: ResourceWarning: unclosed file <_io.BufferedReader name='/sharpy_dir/tests/coupled/prescribed/WindTurbine/../../../../docs/source/content/example_notebooks/source/type04_db_nrel5mw_oc3_v06.xlsx'>
  self.close()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/miniconda3/envs/sharpy/lib/python3.10/ctypes/__init__.py:510: ResourceWarning: unclosed file <_io.BufferedReader name='/sharpy_dir/tests/coupled/prescribed/WindTurbine/../../../../docs/source/content/example_notebooks/source/type04_db_nrel5mw_oc3_v06.xlsx'>
  return _cast(obj, obj, typ)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
/sharpy_dir/sharpy/linear/src/lingebm.py:313: UserWarning: Euler parametrisation not implemented - Either rigid body modes are not being used or this method has already been called.
  warnings.warn('Euler parametrisation not implemented - Either rigid body modes are not being used or this '
.fatal: No names found, cannot describe anything.
False
/sharpy_dir/sharpy/linear/src/lingebm.py:313: UserWarning: Euler parametrisation not implemented - Either rigid body modes are not being used or this method has already been called.
  warnings.warn('Euler parametrisation not implemented - Either rigid body modes are not being used or this '
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/signal/_signaltools.py:1657: RuntimeWarning: divide by zero encountered in divide
  res *= (1 - noise / lVar)
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/signal/_signaltools.py:1657: RuntimeWarning: invalid value encountered in multiply
  res *= (1 - noise / lVar)
.fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
/sharpy_dir/sharpy/linear/src/lingebm.py:313: UserWarning: Euler parametrisation not implemented - Either rigid body modes are not being used or this method has already been called.
  warnings.warn('Euler parametrisation not implemented - Either rigid body modes are not being used or this '
/sharpy_dir/sharpy/solvers/lindynamicsim.py:164: UserWarning: Number of states in the initial state vector not equal to the number of states
  warnings.warn('Number of states in the initial state vector not equal to the number of states')
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
/sharpy_dir/sharpy/linear/src/lingebm.py:313: UserWarning: Euler parametrisation not implemented - Either rigid body modes are not being used or this method has already been called.
  warnings.warn('Euler parametrisation not implemented - Either rigid body modes are not being used or this '
/sharpy_dir/sharpy/solvers/lindynamicsim.py:164: UserWarning: Number of states in the initial state vector not equal to the number of states
  warnings.warn('Number of states in the initial state vector not equal to the number of states')
..fatal: No names found, cannot describe anything.
False
/sharpy_dir/sharpy/aero/utils/uvlmlib.py:213: RuntimeWarning: invalid value encountered in divide
  self.uinf_direction = np.ctypeslib.as_ctypes(vec_u_inf/self.uinf)
/sharpy_dir/sharpy/solvers/modal.py:269: UserWarning: Projecting a system with damping on undamped modal shapes
  warnings.warn('Projecting a system with damping on undamped modal shapes')
..fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/rom/krylov.py:268: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  cout.cout_wrap(self.nfreq * '\t\tsigma = %4f [rad/s]\n' % self.frequency, 1)
/sharpy_dir/sharpy/rom/utils/krylovutils.py:164: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  H[0, 0] = alpha
.fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/linear/src/lingebm.py:313: UserWarning: Euler parametrisation not implemented - Either rigid body modes are not being used or this method has already been called.
  warnings.warn('Euler parametrisation not implemented - Either rigid body modes are not being used or this '
fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/linear/src/lingebm.py:313: UserWarning: Euler parametrisation not implemented - Either rigid body modes are not being used or this method has already been called.
  warnings.warn('Euler parametrisation not implemented - Either rigid body modes are not being used or this '
partitioning: 0.800 to 3.542
partitioning: 3.542 to 6.283
fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/linear/src/lingebm.py:313: UserWarning: Euler parametrisation not implemented - Either rigid body modes are not being used or this method has already been called.
  warnings.warn('Euler parametrisation not implemented - Either rigid body modes are not being used or this '
...sss.x....../miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
.....deep-copying state-space model before scaling
deep-copying state-space model before scaling
...........fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
/miniconda3/envs/sharpy/lib/python3.10/site-packages/scipy/sparse/_index.py:143: SparseEfficiencyWarning: Changing the sparsity structure of a csc_matrix is expensive. lil_matrix is more efficient.
  self._set_arrayXarray(i, j, x)
fatal: No names found, cannot describe anything.
.fatal: No names found, cannot describe anything.
.fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
.fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
fatal: No names found, cannot describe anything.
.........../miniconda3/envs/sharpy/lib/python3.10/xml/etree/ElementTree.py:1651: ResourceWarning: unclosed file <_io.BufferedReader name='/sharpy_dir/tests/utils/../../docs/source/content/example_notebooks/source/type04_db_nrel5mw_oc3_v06.xlsx'>
  return self.target.start(tag, attrib)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
fatal: No names found, cannot describe anything.
.fatal: No names found, cannot describe anything.
..fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/generators/polaraeroforces.py:233: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[0] += cd * coef  # add viscous drag to induced drag from UVLM
/sharpy_dir/sharpy/generators/polaraeroforces.py:234: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[2] = cl * coef
/sharpy_dir/sharpy/generators/polaraeroforces.py:244: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:259: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:271: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] = cm * coef * chord
False
fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/generators/polaraeroforces.py:233: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[0] += cd * coef  # add viscous drag to induced drag from UVLM
/sharpy_dir/sharpy/generators/polaraeroforces.py:234: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[2] = cl * coef
/sharpy_dir/sharpy/generators/polaraeroforces.py:244: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:259: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:271: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] = cm * coef * chord
False
fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/generators/polaraeroforces.py:233: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[0] += cd * coef  # add viscous drag to induced drag from UVLM
/sharpy_dir/sharpy/generators/polaraeroforces.py:234: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[2] = cl * coef
/sharpy_dir/sharpy/generators/polaraeroforces.py:244: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:259: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:271: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] = cm * coef * chord
False
fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/generators/polaraeroforces.py:233: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[0] += cd * coef  # add viscous drag to induced drag from UVLM
/sharpy_dir/sharpy/generators/polaraeroforces.py:234: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[2] = cl * coef
/sharpy_dir/sharpy/generators/polaraeroforces.py:244: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:259: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:271: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] = cm * coef * chord
False
fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/generators/polaraeroforces.py:233: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[0] += cd * coef  # add viscous drag to induced drag from UVLM
/sharpy_dir/sharpy/generators/polaraeroforces.py:234: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[2] = cl * coef
/sharpy_dir/sharpy/generators/polaraeroforces.py:244: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:259: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:271: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] = cm * coef * chord
False
fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/generators/polaraeroforces.py:233: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[0] += cd * coef  # add viscous drag to induced drag from UVLM
/sharpy_dir/sharpy/generators/polaraeroforces.py:234: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  forces_s[2] = cl * coef
/sharpy_dir/sharpy/generators/polaraeroforces.py:244: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:259: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] += cm * coef * chord
/sharpy_dir/sharpy/generators/polaraeroforces.py:271: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  moment_s[1] = cm * coef * chord
False
..fatal: No names found, cannot describe anything.
/sharpy_dir/sharpy/structure/models/beam.py:422: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  self.fortran['num_mem'][elem.ielem] = elem.num_mem
.
----------------------------------------------------------------------
Ran 90 tests in 446.537s

OK (skipped=4, expected failures=1)

@bbahiam
Copy link
Contributor Author

bbahiam commented Oct 31, 2023

@codecov-commenter
Copy link

Codecov Report

Merging #267 (893cbce) into develop (4b5a520) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #267   +/-   ##
========================================
  Coverage    67.69%   67.70%           
========================================
  Files          166      166           
  Lines        26709    26710    +1     
========================================
+ Hits         18081    18083    +2     
+ Misses        8628     8627    -1     
Files Coverage Δ
sharpy/linear/src/lingebm.py 73.85% <100.00%> (+0.21%) ⬆️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link
Collaborator

@sduess sduess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot Be for improving the comments and code. Very much appreciated! Good to see UM/NASTy people here.

@sduess sduess merged commit e0ae0de into ImperialCollegeLondon:develop Nov 17, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants