Skip to content

Commit

Permalink
I reformatted more files with the new black presets.
Browse files Browse the repository at this point in the history
  • Loading branch information
camUrban committed Nov 25, 2024
1 parent 34f7e85 commit 5af3aa6
Show file tree
Hide file tree
Showing 28 changed files with 32 additions and 7 deletions.
1 change: 1 addition & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions benchmarks/unsteady_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
It is useful for profiling the unsteady solver, which cannot be done with
unsteady_benchmark_timed.py. This script doesn't have any expected output images in
the docs directory. Do not commit any changes to this file. """

import pterasoftware as ps

flapping_frequency = 1
Expand Down
1 change: 1 addition & 0 deletions benchmarks/unsteady_benchmark_timed.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This script is used to benchmark the speed of the unsteady solver with a typical
use case. This script doesn't have any expected output images in the docs directory.
Do not commit any changes to this file. """

import timeit

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions examples/analyze_steady_trim_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This example script demonstrates how to automatically find the trim condition for
a steady simulation. It is not as well documented as some solver example scripts,
as it assumes you have read and understood those first. """

import logging

import pterasoftware as ps
Expand Down
1 change: 1 addition & 0 deletions examples/analyze_unsteady_trim_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This example script demonstrates how to automatically find the trim condition for
an unsteady simulation. It is not as well documented as some solver example scripts,
as it assumes you have read and understood those first. """

import logging

import pterasoftware as ps
Expand Down
1 change: 1 addition & 0 deletions examples/steady_convergence_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This script is an example of analyzing the steady convergence of a problem with
multiple airplanes. It should take a few minutes to run. It will display the
convergence progress and results in the console. """

import pterasoftware as ps

# Create two airplane objects. Read through the solver and formation examples for
Expand Down
1 change: 1 addition & 0 deletions examples/unsteady_static_convergence_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This script is an example of analyzing the unsteady convergence of a problem with
static geometry. It should take a few minutes to run. It will display the convergence
progress and results in the console. """

import pterasoftware as ps

# Create an airplane and airplane movement object. Read through the unsteady solver
Expand Down
1 change: 1 addition & 0 deletions examples/unsteady_variable_convergence_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This script is an example of analyzing the unsteady convergence of a problem with
variable geometry. It should take about 30 minutes to run. It will display the
convergence progress and results in the console. """

import pterasoftware as ps

# Create an airplane and airplane movement object. Read through the unsteady solver
Expand Down
12 changes: 6 additions & 6 deletions formation flight/formation_flight_convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@
for step in range(first_results_step, num_steps):
airplanes = this_solver.steady_problems[step].airplanes
for airplane_id, airplane in enumerate(airplanes):
total_forces[
airplane_id, :, results_step
] = airplane.total_near_field_force_wind_axes
total_moments[
airplane_id, :, results_step
] = airplane.total_near_field_moment_wind_axes
total_forces[airplane_id, :, results_step] = (
airplane.total_near_field_force_wind_axes
)
total_moments[airplane_id, :, results_step] = (
airplane.total_near_field_moment_wind_axes
)
results_step += 1

these_s_drags = total_forces[:, 0, :] ** 2
Expand Down
1 change: 0 additions & 1 deletion pterasoftware/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ def __init__(
y_le=0.0,
z_le=0.0,
wing_cross_sections=None,

symmetric=False,
num_chordwise_panels=8,
chordwise_spacing="cosine",
Expand Down
1 change: 1 addition & 0 deletions tests/integration/fixtures/airplane_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
a multi-wing, symmetric airplane object to be used as a fixture for testing
unsteady solvers.
"""

import pterasoftware as ps


Expand Down
1 change: 1 addition & 0 deletions tests/integration/fixtures/movement_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
make_multiple_wing_variable_validation_movement: This function creates a movement
object with variable, multi-wing geometry to be used as a fixture.
"""

import pterasoftware as ps
from tests.integration.fixtures import airplane_fixtures
from tests.integration.fixtures import operating_point_fixtures
Expand Down
1 change: 1 addition & 0 deletions tests/integration/fixtures/problem_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
function creates an unsteady problem object with multi-wing, variable geometry to
be used as a fixture.
"""

import pterasoftware as ps
from tests.integration.fixtures import airplane_fixtures
from tests.integration.fixtures import movement_fixtures
Expand Down
1 change: 1 addition & 0 deletions tests/integration/fixtures/solver_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
This function creates a solver object with multi-wing, variable geometry using
the unsteady ring vortex lattice method to be used as a fixture.
"""

import pterasoftware as ps
from tests.integration.fixtures import problem_fixtures

Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_steady_convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_steady_trim.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_unsteady_convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
This module contains the following functions:
None
"""

import unittest

import pterasoftware as ps
Expand Down
1 change: 1 addition & 0 deletions tests/unit/fixtures/vortex_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
make_ring_vortex_fixture: This method makes a fixture that is a ring vortex
object.
"""

import numpy as np

import pterasoftware as ps
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_horseshoe_vortex.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
This module contains the following functions:
None
"""

import unittest

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_line_vortex.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
This module contains the following functions:
None
"""

import unittest

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_ring_vortex.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
This module contains the following functions:
TestRingVortex: This is a class with functions to test ring vortex objects.
"""

import unittest

import numpy as np
Expand Down

0 comments on commit 5af3aa6

Please sign in to comment.