Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pylint

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
Empty file modified .gitignore
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion GeoMACH/BSE/BSEmodel.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,12 @@ def compute_projection(self, name, pts, surf_pts=None, ndim=1):

npts = pts.shape[0]
nsurf_pts = surf_pts.shape[0]
nrefine = 10
surfs, ind_u, ind_v \
= BSElib.computeproj(npts, nsurf_pts,
size['cp_str'], size['pt_str'],
num['surf'], num['group'], surf_pts,
num['surf'], num['group'], nrefine,
surf_pts,
str_indices['cp'], str_indices['pt'],
topo['surf_group'], bspline['order'],
bspline['num_cp'], bspline['num_pt'],
Expand Down
Empty file modified GeoMACH/BSE/BSEvec.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/BSE/__init__.py
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions GeoMACH/BSE/test.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def cube(nx, ny, nz, rx, ry, rz):
surf.compute_projection('test', pts0, ndim=3)
surf.apply_jacobian('test', 'd(test)/d(cp_str)', 'cp_str')
pts = numpy.array(surf.vec['test'].array)
print pts
#surf.vec['df'].export_tec_scatter()
surf.vec['pt_str'].export_tec_str()
#surf.vec['pt_str'].export_STL()
Expand Down
Empty file modified GeoMACH/PGM/__init__.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/airfoils/n64206.dat
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/airfoils/rae2822.dat
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/components/PGMbody.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/components/PGMcone.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion GeoMACH/PGM/components/PGMinterpolant.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def compute_normals(self):
self._bse.apply_jacobian(qname, 'd(' + qname + ')/d(cp_str)', 'cp_str')

cross = numpy.cross(self._bse.vec[name + '_du'].array, self._bse.vec[name + '_dv'].array)
norms = numpy.linalg.norm(cross, axis=1)
norms = numpy.sqrt(numpy.sum(cross**2,axis=1))

for ind in xrange(3):
cross[:, ind] /= norms
Expand Down
Empty file modified GeoMACH/PGM/components/PGMjunction.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/components/PGMprimitive.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/components/PGMshell.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/components/PGMtip.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/components/PGMwing.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/components/__init__.py
100644 → 100755
Empty file.
8 changes: 8 additions & 0 deletions GeoMACH/PGM/core/MACHconfiguration.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def __init__(self):
self.diff = OrderedDict()
self.jacobians = OrderedDict()
self.updated = {}
self.debug = False

def addPointSet(self, points, pt_name, origConfig=True, **kwargs):
bse = self._bse
Expand All @@ -26,6 +27,13 @@ def addPointSet(self, points, pt_name, origConfig=True, **kwargs):
self.jacobians[pt_name] = bse.jac['d(' + pt_name + ')/d(cp_str)']
self.diff[pt_name] = points - self.jacobians[pt_name].dot(bse.vec['cp_str'].array)

### FOR DEBUGGING (Print projected points)
if self.debug is True:
bse.apply_jacobian(pt_name, 'd(' + pt_name + ')/d(cp_str)', 'cp_str')
bse.vec[pt_name].export_tec_scatter('projected_points.dat')
bse.vec[pt_name].array[:, :] = points
bse.vec[pt_name].export_tec_scatter('CFD_surf_points.dat')

self.updated[pt_name] = False

def setDesignVars(self, dv_dict):
Expand Down
2 changes: 2 additions & 0 deletions GeoMACH/PGM/core/PGMcomponent.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def __init__(self):
self._num_surf = {}
self._shapes = {}

self.funcs = {}

def initialize_props(self):
""" Adds the *X*, *Y*, and *Z* shape properties """
props = self.props
Expand Down
Empty file modified GeoMACH/PGM/core/PGMconfiguration.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/core/PGMdv.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/core/PGMface.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/core/PGMobject.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/core/PGMparameter.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/core/PGMproperty.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/core/PGMsurf.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/core/PGMvec.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PGM/core/__init__.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PSM/BDFwriter.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PSM/QUAD.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PSM/__init__.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/PSM/airframe.py
100644 → 100755
Empty file.
Empty file modified GeoMACH/__init__.py
100644 → 100755
Empty file.
Empty file modified MANIFEST.in
100644 → 100755
Empty file.
18 changes: 18 additions & 0 deletions README.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,21 @@ Installing and getting started (linux or Mac)
5. Run the example:
$ cd [GeoMACH-top]/examples
$ python conventional.py

Installing on a local directory (linux or Mac, for clusters)
---------------------------------------------
[GeoMACH-top] = path to the top-level GeoMACH directory

1. Install (or load) numpy, scipy

2. Install GeoMACH:
$ cd [GeoMACH-top]
$ python setup.py build --fcompiler=intelem (you may use another compiler)
$ python setup.py install --user

3. You have to manually copy all airfoils to the installation folder
$ cp -r GeoMACH/PGM/airfoils ~/.local/lib/python2.7/site-packages/GeoMACH-0.1-py2.7-linux-x86_64.egg/GeoMACH/PGM/

4. Run the example:
$ cd examples
$ python conventional.py
Empty file modified docs/Makefile
100644 → 100755
Empty file.
Empty file modified docs/conf.py
100644 → 100755
Empty file.
Empty file modified docs/index.rst
100644 → 100755
Empty file.
Empty file modified docs/src/Conventional.rst
100644 → 100755
Empty file.
Empty file modified docs/src/GeoMACH.BSE.rst
100644 → 100755
Empty file.
Empty file modified docs/src/GeoMACH.PGM.components.rst
100644 → 100755
Empty file.
Empty file modified docs/src/GeoMACH.PGM.core.rst
100644 → 100755
Empty file.
Empty file modified docs/src/GeoMACH.PGM.rst
100644 → 100755
Empty file.
Empty file modified docs/src/GeoMACH.rst
100644 → 100755
Empty file.
Empty file modified docs/src/Images/UML2.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/body.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/bsplines.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/cone.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/conventional.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/cp.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/d8.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/df.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/geom1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/hwb.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/joinedwing.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/junction.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/junction.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/junction1.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/primitives.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/primitives0.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/pt.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/shell.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/strutbraced.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/supersonic.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/tip.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Images/wing.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified docs/src/Tutorials.rst
100644 → 100755
Empty file.
Empty file modified examples/RC_aircraft_tutorial.py
100644 → 100755
Empty file.
Empty file modified examples/conventional.py
100644 → 100755
Empty file.
Empty file modified examples/supersonic.py
100644 → 100755
Empty file.
Empty file modified examples/trussbraced_full.py
100644 → 100755
Empty file.
Empty file modified examples/trussbraced_wingstrut.py
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion examples/wing.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def meshStructure(self, res, filename):
bse = pgm.initialize()
pgm.comps['wing'].set_airfoil('rae2822.dat')
bse.vec['pt_str'].export_tec_str()

bse.vec['cp_str'].export_IGES()
exit()
for num in [20]:#[5, 10, 20, 50, 100]:
pgm.meshStructure(num, 'wing_'+str(num))
Empty file modified setup.cfg
100644 → 100755
Empty file.
Empty file modified setup.py
100644 → 100755
Empty file.
Empty file modified src/BSE/bspline_basis.f90
100644 → 100755
Empty file.
Empty file modified src/BSE/bspline_knot.f90
100644 → 100755
Empty file.
Empty file modified src/BSE/bspline_param.f90
100644 → 100755
Empty file.
Empty file modified src/BSE/compute_bs_jacobian.f90
100644 → 100755
Empty file.
Empty file modified src/BSE/compute_cp_jacobian.f90
100644 → 100755
Empty file.
Empty file modified src/BSE/compute_df_jacobian.f90
100644 → 100755
Empty file.
Empty file modified src/BSE/compute_in_jacobian.f90
100644 → 100755
Empty file.
Empty file modified src/BSE/compute_indices.f90
100644 → 100755
Empty file.
Loading
Loading