diff --git a/.travis.yml b/.travis.yml index d17ac64..3ee72ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,8 @@ install: fi fi # Compile - - docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && make" + - docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && make && pip install ." + # the version of testflo is too new, we downgrade to the last version that supports py2 - docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && pip install testflo==1.3.5 " @@ -51,7 +52,7 @@ script: # We need to source the mdolab bashrc before running anything - docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && testflo . -v -n 1" # check that new CGNS files have been generated - - docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR/python/examples && ls -l */*.cgns" + - docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR/examples && ls -l */*.cgns" after_script: - docker rm -f app diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 5c72bf0..0000000 --- a/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .python.pyHyp import pyHyp, pyHypMulti diff --git a/doc/install.rst b/doc/install.rst index 39f328b..f2aa79b 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -10,91 +10,20 @@ Prerequisites "heavy lifting". The following external components are required for pyHyp: +- CGNS Libarary +- PETSc -1. `CGNS Library `_ - -The CGNS library is used to provide output CGNS functionality for -pyHyp. The latest CGNS version 3.1 is recommended, but the older -version 2.5.x may also be used. The After downloading, untar:: - - $ tar -xzf cgnslib_3.1.4-2.tar.gz - -.. NOTE:: cmake and ccmake are required for building the CGNS - library. - -Enter cgnslib_3.1.4 and type:: - - $ cmake . - -By default, the CGNS library does not include the Fortran bindings -that are required for `pyHyp`. This needs to be enabled using the -cmake configure utility, `ccmake`.:: - - $ ccamke . - -A "GUI" appears and toggle ENABLE_FORTRAN by pressing [enter]. Type -'c' to reconfigure and 'g' to generate and exit. Then build the -library using:: - - $ make - -If you are compiling on machine without root access, you're done. -If you are on a local machine with root access, it is usually -easiest to 'install' into the default directory using:: - - $ sudo make install - -.. NOTE:: It is also suggested that the BUILD_CGNSTOOLS option be - used in the configuration, but this is optional. - -2. `PETSc `_ - -Download the latest tarball and extract:: - - $ tar -xzf petsc-3.4.1.tar.gz - -PETSc must be first configured. There are a wide variety of -options. The only ones that is strictly necessary are ---with-shared-libraries and --with-fortran-interfaces. However, it is -recommend the following options are used since some are required for -pyWarp. To compile without debugging use: --with-debugging=no. It is -HIGHLY recommended to use debugging until ready to perform production -runs. In that case, you should compile with a separate architecture -for the optimized build. In this case use '--PETSC_ARCH=real-opt' for -example:: - - $ ./configure --with-shared-libraries --download-superlu_dist=yes --download-parmetis=yes --download-metis=yes --with-fortran-interfaces=1 --with-debuggig=yes --with-scalar-type=real --PETSC_ARCH=real-debug - -After the configuration step, PETSc must be built. This is -accomplished with the command provided at the end of the configure -script. It will look something like below:: - - $ make PETSC_DIR=/home/gaetan/Downloads/petsc-3.4.1 PETSC_ARCH=real-debug all - -The last step is to add PETSC_DIR and PETSC_ARCH entries to your -.bashrc file. This is essential. It should look something like -this: (Make sure the CORRECT directory is used!):: - - export PETSC_ARCH=real-debug - export PETSC_DIR=/home/user/packages/petsc-3.4.1 - -Make sure the .bashrc file is sourced before pyHyp is compiled using:: - - $ source ~/.bashrc - -Or simply open a new terminal before compiling pyHyp. - -See the documentation of each of these packages for further -information. +See the MDO Lab installation guide `here `_ for the supported versions and installation instructions. .. NOTE:: A working MPI is not strictly required. However, in most cases PETSc should be configured with MPI. Compilation ------------ +``pyHyp`` follows the standard MDO Lab build procedure. +To start, first clone the repo. For stability we recommend checking out a tagged release. -`pyHyp` follows the standard MDO Lab build procedure. -To start, find a configuration file close to your current setup in:: +Next, find a configuration file close to your current setup in:: $ config/defaults @@ -102,7 +31,7 @@ and copy it to ''config/config.mk''. For example:: $ cp config/defaults/config.LINUX_GFORTRAN.mk config/config.mk -If you are a beginner user installing the packages on a linux desktop, +If you are a beginner user installing the packages on a Linux desktop, you should use the ``config.LINUX_GFORTRAN.mk`` versions of the configuration files. The ``config.LINUX_INTEL.mk`` versions are usually used on clusters. @@ -116,10 +45,10 @@ the screen (near the end):: Testing if module hyp can be imported... Module hyp was successfully imported. -Finally, add the directory containing the pyhyp folder to the -$PYTHONPATH variable in your bashrc file:: +Finally, install the Python interface with:: + + pip install . - export $PYTHONPATH:/path/to/folder/containing/pyhyp/ .. _pyhyp_theory: @@ -136,4 +65,4 @@ After you run some of the files, you will get a message like this:: *** Your MPI job will now abort. [MDO-John:7977] Local abort after MPI_FINALIZE completed successfully; not able to aggregate error messages, and not able to guarantee that all other processes were killed! -Despite its scary look, this is a non-issue and means that the script successfully finished. \ No newline at end of file +Despite its scary look, this is a non-issue and means that the script successfully finished. diff --git a/examples/2D/naca0012_euler.fmt b/examples/2D/naca0012_euler.fmt new file mode 100644 index 0000000..27930e0 --- /dev/null +++ b/examples/2D/naca0012_euler.fmt @@ -0,0 +1,1544 @@ +1 +257 2 1 +1 +0.999849 +0.999398 +0.998645 +0.997592 +0.99624 +0.994588 +0.992639 +0.990393 +0.987851 +0.985016 +0.981888 +0.97847 +0.974764 +0.970772 +0.966496 +0.96194 +0.957105 +0.951995 +0.946612 +0.940961 +0.935043 +0.928864 +0.922427 +0.915735 +0.908792 +0.901604 +0.894173 +0.886505 +0.878604 +0.870476 +0.862124 +0.853553 +0.84477 +0.835779 +0.826586 +0.817197 +0.807616 +0.79785 +0.787904 +0.777785 +0.767499 +0.757051 +0.746449 +0.735698 +0.724806 +0.713778 +0.702621 +0.691342 +0.679948 +0.668445 +0.656841 +0.645142 +0.633356 +0.62149 +0.609551 +0.597545 +0.585481 +0.573365 +0.561205 +0.549009 +0.536782 +0.524534 +0.512271 +0.5 +0.487729 +0.475466 +0.463218 +0.450991 +0.438795 +0.426635 +0.414519 +0.402455 +0.390449 +0.37851 +0.366644 +0.354858 +0.343159 +0.331555 +0.320052 +0.308658 +0.297379 +0.286222 +0.275194 +0.264302 +0.253551 +0.242949 +0.232501 +0.222215 +0.212096 +0.20215 +0.192384 +0.182803 +0.173414 +0.164221 +0.15523 +0.146447 +0.137876 +0.129524 +0.121396 +0.113495 +0.105827 +0.0983962 +0.0912076 +0.0842652 +0.0775732 +0.0711357 +0.0649565 +0.0590394 +0.0533878 +0.0480054 +0.0428951 +0.0380602 +0.0335036 +0.029228 +0.0252359 +0.0215298 +0.018112 +0.0149844 +0.0121489 +0.00960736 +0.00736118 +0.00541175 +0.00376023 +0.00240764 +0.00135477 +0.000602272 +0.000150591 +0 +0.000150591 +0.000602272 +0.00135477 +0.00240764 +0.00376023 +0.00541175 +0.00736118 +0.00960736 +0.0121489 +0.0149844 +0.018112 +0.0215298 +0.0252359 +0.029228 +0.0335036 +0.0380602 +0.0428951 +0.0480054 +0.0533878 +0.0590394 +0.0649565 +0.0711357 +0.0775732 +0.0842652 +0.0912076 +0.0983962 +0.105827 +0.113495 +0.121396 +0.129524 +0.137876 +0.146447 +0.15523 +0.164221 +0.173414 +0.182803 +0.192384 +0.20215 +0.212096 +0.222215 +0.232501 +0.242949 +0.253551 +0.264302 +0.275194 +0.286222 +0.297379 +0.308658 +0.320052 +0.331555 +0.343159 +0.354858 +0.366644 +0.37851 +0.390449 +0.402455 +0.414519 +0.426635 +0.438795 +0.450991 +0.463218 +0.475466 +0.487729 +0.5 +0.512271 +0.524534 +0.536782 +0.549009 +0.561205 +0.573365 +0.585481 +0.597545 +0.609551 +0.62149 +0.633356 +0.645142 +0.656841 +0.668445 +0.679948 +0.691342 +0.702621 +0.713778 +0.724806 +0.735698 +0.746449 +0.757051 +0.767499 +0.777785 +0.787904 +0.79785 +0.807616 +0.817197 +0.826586 +0.835779 +0.84477 +0.853553 +0.862124 +0.870476 +0.878604 +0.886505 +0.894173 +0.901604 +0.908792 +0.915735 +0.922427 +0.928864 +0.935043 +0.940961 +0.946612 +0.951995 +0.957105 +0.96194 +0.966496 +0.970772 +0.974764 +0.97847 +0.981888 +0.985016 +0.987851 +0.990393 +0.992639 +0.994588 +0.99624 +0.997592 +0.998645 +0.999398 +0.999849 +1 +1 +0.999849 +0.999398 +0.998645 +0.997592 +0.99624 +0.994588 +0.992639 +0.990393 +0.987851 +0.985016 +0.981888 +0.97847 +0.974764 +0.970772 +0.966496 +0.96194 +0.957105 +0.951995 +0.946612 +0.940961 +0.935043 +0.928864 +0.922427 +0.915735 +0.908792 +0.901604 +0.894173 +0.886505 +0.878604 +0.870476 +0.862124 +0.853553 +0.84477 +0.835779 +0.826586 +0.817197 +0.807616 +0.79785 +0.787904 +0.777785 +0.767499 +0.757051 +0.746449 +0.735698 +0.724806 +0.713778 +0.702621 +0.691342 +0.679948 +0.668445 +0.656841 +0.645142 +0.633356 +0.62149 +0.609551 +0.597545 +0.585481 +0.573365 +0.561205 +0.549009 +0.536782 +0.524534 +0.512271 +0.5 +0.487729 +0.475466 +0.463218 +0.450991 +0.438795 +0.426635 +0.414519 +0.402455 +0.390449 +0.37851 +0.366644 +0.354858 +0.343159 +0.331555 +0.320052 +0.308658 +0.297379 +0.286222 +0.275194 +0.264302 +0.253551 +0.242949 +0.232501 +0.222215 +0.212096 +0.20215 +0.192384 +0.182803 +0.173414 +0.164221 +0.15523 +0.146447 +0.137876 +0.129524 +0.121396 +0.113495 +0.105827 +0.0983962 +0.0912076 +0.0842652 +0.0775732 +0.0711357 +0.0649565 +0.0590394 +0.0533878 +0.0480054 +0.0428951 +0.0380602 +0.0335036 +0.029228 +0.0252359 +0.0215298 +0.018112 +0.0149844 +0.0121489 +0.00960736 +0.00736118 +0.00541175 +0.00376023 +0.00240764 +0.00135477 +0.000602272 +0.000150591 +0 +0.000150591 +0.000602272 +0.00135477 +0.00240764 +0.00376023 +0.00541175 +0.00736118 +0.00960736 +0.0121489 +0.0149844 +0.018112 +0.0215298 +0.0252359 +0.029228 +0.0335036 +0.0380602 +0.0428951 +0.0480054 +0.0533878 +0.0590394 +0.0649565 +0.0711357 +0.0775732 +0.0842652 +0.0912076 +0.0983962 +0.105827 +0.113495 +0.121396 +0.129524 +0.137876 +0.146447 +0.15523 +0.164221 +0.173414 +0.182803 +0.192384 +0.20215 +0.212096 +0.222215 +0.232501 +0.242949 +0.253551 +0.264302 +0.275194 +0.286222 +0.297379 +0.308658 +0.320052 +0.331555 +0.343159 +0.354858 +0.366644 +0.37851 +0.390449 +0.402455 +0.414519 +0.426635 +0.438795 +0.450991 +0.463218 +0.475466 +0.487729 +0.5 +0.512271 +0.524534 +0.536782 +0.549009 +0.561205 +0.573365 +0.585481 +0.597545 +0.609551 +0.62149 +0.633356 +0.645142 +0.656841 +0.668445 +0.679948 +0.691342 +0.702621 +0.713778 +0.724806 +0.735698 +0.746449 +0.757051 +0.767499 +0.777785 +0.787904 +0.79785 +0.807616 +0.817197 +0.826586 +0.835779 +0.84477 +0.853553 +0.862124 +0.870476 +0.878604 +0.886505 +0.894173 +0.901604 +0.908792 +0.915735 +0.922427 +0.928864 +0.935043 +0.940961 +0.946612 +0.951995 +0.957105 +0.96194 +0.966496 +0.970772 +0.974764 +0.97847 +0.981888 +0.985016 +0.987851 +0.990393 +0.992639 +0.994588 +0.99624 +0.997592 +0.998645 +0.999398 +0.999849 +1 +-1.66533e-17 +2.18862e-05 +8.7506e-05 +0.000196743 +0.000349403 +0.000545218 +0.000783842 +0.00106486 +0.00138777 +0.00175203 +0.00215699 +0.00260198 +0.00308623 +0.00360894 +0.00416922 +0.00476616 +0.00539878 +0.00606607 +0.00676696 +0.00750034 +0.00826509 +0.00906003 +0.00988395 +0.0107356 +0.0116138 +0.0125173 +0.0134447 +0.0143948 +0.0153662 +0.0163576 +0.0173676 +0.0183951 +0.0194385 +0.0204965 +0.0215678 +0.022651 +0.0237448 +0.0248477 +0.0259585 +0.0270756 +0.0281978 +0.0293237 +0.0304518 +0.0315807 +0.0327091 +0.0338355 +0.0349584 +0.0360765 +0.0371883 +0.0382923 +0.039387 +0.0404708 +0.0415424 +0.0426001 +0.0436423 +0.0446676 +0.0456742 +0.0466607 +0.0476253 +0.0485664 +0.0494824 +0.0503716 +0.0512323 +0.0520628 +0.0528615 +0.0536267 +0.0543566 +0.0550497 +0.0557043 +0.0563187 +0.0568913 +0.0574205 +0.0579047 +0.0583425 +0.0587323 +0.0590727 +0.0593624 +0.0596001 +0.0597844 +0.0599142 +0.0599884 +0.0600061 +0.0599661 +0.0598679 +0.0597104 +0.0594933 +0.0592158 +0.0588776 +0.0584783 +0.0580177 +0.0574957 +0.0569123 +0.0562677 +0.055562 +0.0547956 +0.053969 +0.0530827 +0.0521373 +0.0511336 +0.0500726 +0.048955 +0.047782 +0.0465547 +0.0452742 +0.0439418 +0.0425589 +0.0411266 +0.0396466 +0.0381201 +0.0365487 +0.0349339 +0.033277 +0.0315797 +0.0298434 +0.0280695 +0.0262595 +0.0244148 +0.0225367 +0.0206266 +0.0186857 +0.0167151 +0.0147161 +0.0126895 +0.0106364 +0.00855768 +0.00645403 +0.00432617 +0.00217466 +0 +-0.00217466 +-0.00432617 +-0.00645403 +-0.00855768 +-0.0106364 +-0.0126895 +-0.0147161 +-0.0167151 +-0.0186857 +-0.0206266 +-0.0225367 +-0.0244148 +-0.0262595 +-0.0280695 +-0.0298434 +-0.0315797 +-0.033277 +-0.0349339 +-0.0365487 +-0.0381201 +-0.0396466 +-0.0411266 +-0.0425589 +-0.0439418 +-0.0452742 +-0.0465547 +-0.047782 +-0.048955 +-0.0500726 +-0.0511336 +-0.0521373 +-0.0530827 +-0.053969 +-0.0547956 +-0.055562 +-0.0562677 +-0.0569123 +-0.0574957 +-0.0580177 +-0.0584783 +-0.0588776 +-0.0592158 +-0.0594933 +-0.0597104 +-0.0598679 +-0.0599661 +-0.0600061 +-0.0599884 +-0.0599142 +-0.0597844 +-0.0596001 +-0.0593624 +-0.0590727 +-0.0587323 +-0.0583425 +-0.0579047 +-0.0574205 +-0.0568913 +-0.0563187 +-0.0557043 +-0.0550497 +-0.0543566 +-0.0536267 +-0.0528615 +-0.0520628 +-0.0512323 +-0.0503716 +-0.0494824 +-0.0485664 +-0.0476253 +-0.0466607 +-0.0456742 +-0.0446676 +-0.0436423 +-0.0426001 +-0.0415424 +-0.0404708 +-0.039387 +-0.0382923 +-0.0371883 +-0.0360765 +-0.0349584 +-0.0338355 +-0.0327091 +-0.0315807 +-0.0304518 +-0.0293237 +-0.0281978 +-0.0270756 +-0.0259585 +-0.0248477 +-0.0237448 +-0.022651 +-0.0215678 +-0.0204965 +-0.0194385 +-0.0183951 +-0.0173676 +-0.0163576 +-0.0153662 +-0.0143948 +-0.0134447 +-0.0125173 +-0.0116138 +-0.0107356 +-0.00988395 +-0.00906003 +-0.00826509 +-0.00750034 +-0.00676696 +-0.00606607 +-0.00539878 +-0.00476616 +-0.00416922 +-0.00360894 +-0.00308623 +-0.00260198 +-0.00215699 +-0.00175203 +-0.00138777 +-0.00106486 +-0.000783842 +-0.000545218 +-0.000349403 +-0.000196743 +-8.7506e-05 +-2.18862e-05 +1.66533e-17 +-1.66533e-17 +2.18862e-05 +8.7506e-05 +0.000196743 +0.000349403 +0.000545218 +0.000783842 +0.00106486 +0.00138777 +0.00175203 +0.00215699 +0.00260198 +0.00308623 +0.00360894 +0.00416922 +0.00476616 +0.00539878 +0.00606607 +0.00676696 +0.00750034 +0.00826509 +0.00906003 +0.00988395 +0.0107356 +0.0116138 +0.0125173 +0.0134447 +0.0143948 +0.0153662 +0.0163576 +0.0173676 +0.0183951 +0.0194385 +0.0204965 +0.0215678 +0.022651 +0.0237448 +0.0248477 +0.0259585 +0.0270756 +0.0281978 +0.0293237 +0.0304518 +0.0315807 +0.0327091 +0.0338355 +0.0349584 +0.0360765 +0.0371883 +0.0382923 +0.039387 +0.0404708 +0.0415424 +0.0426001 +0.0436423 +0.0446676 +0.0456742 +0.0466607 +0.0476253 +0.0485664 +0.0494824 +0.0503716 +0.0512323 +0.0520628 +0.0528615 +0.0536267 +0.0543566 +0.0550497 +0.0557043 +0.0563187 +0.0568913 +0.0574205 +0.0579047 +0.0583425 +0.0587323 +0.0590727 +0.0593624 +0.0596001 +0.0597844 +0.0599142 +0.0599884 +0.0600061 +0.0599661 +0.0598679 +0.0597104 +0.0594933 +0.0592158 +0.0588776 +0.0584783 +0.0580177 +0.0574957 +0.0569123 +0.0562677 +0.055562 +0.0547956 +0.053969 +0.0530827 +0.0521373 +0.0511336 +0.0500726 +0.048955 +0.047782 +0.0465547 +0.0452742 +0.0439418 +0.0425589 +0.0411266 +0.0396466 +0.0381201 +0.0365487 +0.0349339 +0.033277 +0.0315797 +0.0298434 +0.0280695 +0.0262595 +0.0244148 +0.0225367 +0.0206266 +0.0186857 +0.0167151 +0.0147161 +0.0126895 +0.0106364 +0.00855768 +0.00645403 +0.00432617 +0.00217466 +0 +-0.00217466 +-0.00432617 +-0.00645403 +-0.00855768 +-0.0106364 +-0.0126895 +-0.0147161 +-0.0167151 +-0.0186857 +-0.0206266 +-0.0225367 +-0.0244148 +-0.0262595 +-0.0280695 +-0.0298434 +-0.0315797 +-0.033277 +-0.0349339 +-0.0365487 +-0.0381201 +-0.0396466 +-0.0411266 +-0.0425589 +-0.0439418 +-0.0452742 +-0.0465547 +-0.047782 +-0.048955 +-0.0500726 +-0.0511336 +-0.0521373 +-0.0530827 +-0.053969 +-0.0547956 +-0.055562 +-0.0562677 +-0.0569123 +-0.0574957 +-0.0580177 +-0.0584783 +-0.0588776 +-0.0592158 +-0.0594933 +-0.0597104 +-0.0598679 +-0.0599661 +-0.0600061 +-0.0599884 +-0.0599142 +-0.0597844 +-0.0596001 +-0.0593624 +-0.0590727 +-0.0587323 +-0.0583425 +-0.0579047 +-0.0574205 +-0.0568913 +-0.0563187 +-0.0557043 +-0.0550497 +-0.0543566 +-0.0536267 +-0.0528615 +-0.0520628 +-0.0512323 +-0.0503716 +-0.0494824 +-0.0485664 +-0.0476253 +-0.0466607 +-0.0456742 +-0.0446676 +-0.0436423 +-0.0426001 +-0.0415424 +-0.0404708 +-0.039387 +-0.0382923 +-0.0371883 +-0.0360765 +-0.0349584 +-0.0338355 +-0.0327091 +-0.0315807 +-0.0304518 +-0.0293237 +-0.0281978 +-0.0270756 +-0.0259585 +-0.0248477 +-0.0237448 +-0.022651 +-0.0215678 +-0.0204965 +-0.0194385 +-0.0183951 +-0.0173676 +-0.0163576 +-0.0153662 +-0.0143948 +-0.0134447 +-0.0125173 +-0.0116138 +-0.0107356 +-0.00988395 +-0.00906003 +-0.00826509 +-0.00750034 +-0.00676696 +-0.00606607 +-0.00539878 +-0.00476616 +-0.00416922 +-0.00360894 +-0.00308623 +-0.00260198 +-0.00215699 +-0.00175203 +-0.00138777 +-0.00106486 +-0.000783842 +-0.000545218 +-0.000349403 +-0.000196743 +-8.7506e-05 +-2.18862e-05 +1.66533e-17 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 diff --git a/python/examples/2D/naca0012_euler.py b/examples/2D/naca0012_euler.py similarity index 100% rename from python/examples/2D/naca0012_euler.py rename to examples/2D/naca0012_euler.py diff --git a/python/examples/2D/naca0012_rans.py b/examples/2D/naca0012_rans.py similarity index 100% rename from python/examples/2D/naca0012_rans.py rename to examples/2D/naca0012_rans.py diff --git a/python/examples/717/717_small.fmt b/examples/717/717_small.fmt similarity index 100% rename from python/examples/717/717_small.fmt rename to examples/717/717_small.fmt diff --git a/python/examples/717/mdo_tutorial_ffd.fmt b/examples/717/mdo_tutorial_ffd.fmt similarity index 100% rename from python/examples/717/mdo_tutorial_ffd.fmt rename to examples/717/mdo_tutorial_ffd.fmt diff --git a/python/examples/717/run717.py b/examples/717/run717.py similarity index 100% rename from python/examples/717/run717.py rename to examples/717/run717.py diff --git a/python/examples/BWB/bwb.fmt b/examples/BWB/bwb.fmt similarity index 100% rename from python/examples/BWB/bwb.fmt rename to examples/BWB/bwb.fmt diff --git a/python/examples/BWB/grid/bwb.blk b/examples/BWB/grid/bwb.blk similarity index 100% rename from python/examples/BWB/grid/bwb.blk rename to examples/BWB/grid/bwb.blk diff --git a/python/examples/BWB/grid/bwb.tin b/examples/BWB/grid/bwb.tin similarity index 100% rename from python/examples/BWB/grid/bwb.tin rename to examples/BWB/grid/bwb.tin diff --git a/python/examples/BWB/runBWB.py b/examples/BWB/runBWB.py similarity index 100% rename from python/examples/BWB/runBWB.py rename to examples/BWB/runBWB.py diff --git a/python/examples/corner/corner.cgns b/examples/corner/corner.cgns similarity index 100% rename from python/examples/corner/corner.cgns rename to examples/corner/corner.cgns diff --git a/python/examples/corner/runCorner.py b/examples/corner/runCorner.py similarity index 100% rename from python/examples/corner/runCorner.py rename to examples/corner/runCorner.py diff --git a/python/examples/m6/grid/m6_surf.blk b/examples/m6/grid/m6_surf.blk similarity index 100% rename from python/examples/m6/grid/m6_surf.blk rename to examples/m6/grid/m6_surf.blk diff --git a/python/examples/m6/grid/m6_surf.tin b/examples/m6/grid/m6_surf.tin similarity index 100% rename from python/examples/m6/grid/m6_surf.tin rename to examples/m6/grid/m6_surf.tin diff --git a/python/examples/m6/m6_large.fmt b/examples/m6/m6_large.fmt similarity index 100% rename from python/examples/m6/m6_large.fmt rename to examples/m6/m6_large.fmt diff --git a/python/examples/m6/m6_small.fmt b/examples/m6/m6_small.fmt similarity index 100% rename from python/examples/m6/m6_small.fmt rename to examples/m6/m6_small.fmt diff --git a/python/examples/m6/runM6.py b/examples/m6/runM6.py similarity index 100% rename from python/examples/m6/runM6.py rename to examples/m6/runM6.py diff --git a/python/examples/plate/plate_surf.cgns b/examples/plate/plate_surf.cgns similarity index 100% rename from python/examples/plate/plate_surf.cgns rename to examples/plate/plate_surf.cgns diff --git a/python/examples/plate/runPlate.py b/examples/plate/runPlate.py similarity index 100% rename from python/examples/plate/runPlate.py rename to examples/plate/runPlate.py diff --git a/python/examples/sphere/even_sphere.fmt b/examples/sphere/even_sphere.fmt similarity index 100% rename from python/examples/sphere/even_sphere.fmt rename to examples/sphere/even_sphere.fmt diff --git a/python/examples/sphere/runSphere.py b/examples/sphere/runSphere.py similarity index 100% rename from python/examples/sphere/runSphere.py rename to examples/sphere/runSphere.py diff --git a/python/examples/sphere/uneven_sphere.fmt b/examples/sphere/uneven_sphere.fmt similarity index 100% rename from python/examples/sphere/uneven_sphere.fmt rename to examples/sphere/uneven_sphere.fmt diff --git a/python/examples/sphere/uneven_sphere_large.fmt b/examples/sphere/uneven_sphere_large.fmt similarity index 100% rename from python/examples/sphere/uneven_sphere_large.fmt rename to examples/sphere/uneven_sphere_large.fmt diff --git a/python/MExt.py b/pyhyp/MExt.py similarity index 100% rename from python/MExt.py rename to pyhyp/MExt.py diff --git a/pyhyp/__init__.py b/pyhyp/__init__.py new file mode 100644 index 0000000..72e6be2 --- /dev/null +++ b/pyhyp/__init__.py @@ -0,0 +1,3 @@ +__version__ = '2.2.0' + +from .pyHyp import pyHyp, pyHypMulti diff --git a/python/pyHyp.py b/pyhyp/pyHyp.py similarity index 100% rename from python/pyHyp.py rename to pyhyp/pyHyp.py diff --git a/python/__init__.py b/python/__init__.py deleted file mode 100644 index 5b9452c..0000000 --- a/python/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# This file is empty diff --git a/python/reg_tests/test_all_examples.py b/reg_tests/test_all_examples.py similarity index 100% rename from python/reg_tests/test_all_examples.py rename to reg_tests/test_all_examples.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0b7a159 --- /dev/null +++ b/setup.py @@ -0,0 +1,48 @@ +from setuptools import setup +import re + +__version__ = re.findall( + r"""__version__ = ["']+([0-9\.]*)["']+""", + open('pyhyp/__init__.py').read(), +)[0] + +setup(name='pyhyp', + version=__version__, + + + description="pyHyp uses hyperbolic volume mesh marching schemes to extrude structured surface meshes into volume meshes. ", + long_description=""" + ## Documentation + + Please see the [documentation](http://mdolab.engin.umich.edu/docs/packages/pyhyp/doc/index.html) for installation details and API documentation. + + To locally build the documentation, enter the `doc` folder and enter `make html` in terminal. + You can then view the built documentation in the `_build` folder. + + + ## Citation + + pyHyp is based on the theory presented in "Enhancements of a three-dimensional hyperbolic grid generation scheme." + For more background, theory, and figures, see the original [journal article](https://doi.org/10.1016/0096-3003(92)90073-A). + + """, + long_description_content_type="text/markdown", + keywords='meshing mesh-generation optimization', + author='', + author_email='', + url='https://github.com/mdolab/pyhyp', + license='Apache License Version 2.0', + packages=[ + 'pyhyp', + ], + package_data={ + 'pyhyp': ['*.so'] + }, + install_requires=[ + 'numpy>=1.16.4', + 'mpi4py>=3.0.2', + ], + classifiers=[ + "Operating System :: Linux", + "Programming Language :: Python, Fortran"] + ) diff --git a/src/python/f2py/Makefile b/src/python/f2py/Makefile index 5f1fd8b..8467dfe 100644 --- a/src/python/f2py/Makefile +++ b/src/python/f2py/Makefile @@ -59,7 +59,7 @@ all: $(FF90) -shared $(PYTHON_OBJECTS) $(LINKER_ALL_FLAGS) -o hyp.so $(PYTHON) importTest.py - mv hyp.so ../../../python + mv hyp.so ../../../pyhyp # Clean up temporary files -rm *.o -rm *.f90 *.c