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

Flow #4

Draft
wants to merge 35 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f494910
Adding flow: simulation domain
Dec 18, 2020
95faa30
Initial commit
Dec 19, 2020
b6bf74e
Euler stepping for 1D crossing jets
Jan 8, 2021
3cce62a
RK2, H5 output
Jan 16, 2021
3be01ed
Fox's crossing-jets case works
Feb 2, 2021
ea74236
Verified against Rodney's code
Feb 15, 2021
c55232d
Compiled flux computation
Feb 15, 2021
7042805
comments
sbryngelson Mar 2, 2021
a185263
restructure for profiling and compile more functions
sbryngelson Mar 5, 2021
5d540d0
add nquad
sbryngelson Mar 5, 2021
3147516
Compiling fluxes
Mar 5, 2021
91cce8e
Merge branch 'flow' of https://github.com/sbryngelson/PyQBMMlib into …
Mar 5, 2021
53b2ff3
Compiled update_quadrature
Mar 6, 2021
5b9293b
first steps to 2d jet crossing
sbryngelson Mar 13, 2021
ddaa41d
almost there
sbryngelson Mar 13, 2021
0b613d0
minor
sbryngelson Mar 14, 2021
a1ba962
still debugging
sbryngelson Mar 15, 2021
5492a82
minor
sbryngelson Mar 22, 2021
12b5236
clean
sbryngelson Mar 22, 2021
359995e
clean
sbryngelson Mar 22, 2021
a49ab0b
fix 3d chyqmom27 case no longer working. try to make chyqmom9 compati…
sbryngelson Mar 22, 2021
e238bee
minor
sbryngelson Mar 27, 2021
cda598a
fix 3D-only flux computation in flow branch
sbryngelson Mar 27, 2021
2da7b6f
debugging 2D flow NaN at pt 48 in abscissas, lots of print statements
sbryngelson Mar 27, 2021
36ad0f8
more messing with 2D closures 1d flow problem - problem seems to be i…
sbryngelson Mar 29, 2021
1365425
remove projection
sbryngelson Mar 30, 2021
b8aa8d4
update
sbryngelson Apr 2, 2021
8e9a74f
clean up and verify
sbryngelson Apr 3, 2021
108333f
faster! smarter flux computations
sbryngelson Apr 6, 2021
b995426
refactor
sbryngelson Apr 7, 2021
7fa525d
inline some functions. add projection as an option
sbryngelson Apr 8, 2021
d254e95
minor
sbryngelson Apr 8, 2021
8d1252e
make domain discretization agnostic... 402 pts to replicate rodneys case
sbryngelson Apr 12, 2021
48b586a
add some 1D debugging utilities and try to get hyqmom working.. still…
sbryngelson Apr 12, 2021
533e208
added parallel for numba compiled functions that are expensive... dom…
sbryngelson Apr 13, 2021
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
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503, F403, F401
max-line-length = 79
max-complexity = 18
select = B,C,E,F,W,T4,B9
43 changes: 23 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
name: CI
on:
push:
branches:
- master
pull_request:
push:
branches:
- master
pull_request:

jobs:
test:
name: QBMMTest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencis
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: "Test QBMM"
run: pytest test/test_qbmm.py
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install pip
run: |
python -m pip install --upgrade pip
python -m pip install pipreqs
pipreqs --force
- name: Install requirements
run: python -m pip install -r requirements.txt
- name: Test QBMM
run: cd test && pytest test_qbmm.py



4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ tags
*.ipynb_checkpoints

D
src/output
_build
__pycache__
mmatica_qbmmlib

profile*
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# PyQBMMlib

![CI](https://github.com/sbryngelson/PyQBMMlib/workflows/CI/badge.svg)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Documentation Status](https://readthedocs.org/projects/pyqbmmlib/badge/?version=latest)](https://pyqbmmlib.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/doi/10.1016/j.softx.2020.100615.svg)](http://dx.doi.org/10.1016/j.softx.2020.100615)
Expand Down
70 changes: 35 additions & 35 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,22 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../src/'))
sys.path.insert(0, os.path.abspath('../utils/'))
sys.path.insert(0, os.path.abspath('../test/'))

sys.path.insert(0, os.path.abspath("../src/"))
sys.path.insert(0, os.path.abspath("../utils/"))
sys.path.insert(0, os.path.abspath("../test/"))


# -- Project information -----------------------------------------------------

project = u'PyQBMMlib'
copyright = u'2020, Spencer Bryngelson'
author = u'Spencer H. Bryngelson and Esteban Cisneros'
project = u"PyQBMMlib"
copyright = u"2020, Spencer Bryngelson"
author = u"Spencer H. Bryngelson and Esteban Cisneros"

# The short X.Y version
version = u''
version = u""
# The full version, including alpha/beta/rc tags
release = u''
release = u""


# -- General configuration ---------------------------------------------------
Expand All @@ -41,25 +42,25 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.napoleon'
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.napoleon",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -71,7 +72,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = [u"_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
Expand All @@ -82,7 +83,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'classic'
html_theme = "classic"
# html_theme = 'alabaster'

# Theme options are theme-specific and customize the look and feel of a theme
Expand All @@ -94,7 +95,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -110,7 +111,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'PyQBMMlibdoc'
htmlhelp_basename = "PyQBMMlibdoc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -119,15 +120,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -137,19 +135,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'PyQBMMlib.tex', u'PyQBMMlib Documentation',
u'SHB', 'manual'),
(master_doc, "PyQBMMlib.tex", u"PyQBMMlib Documentation", u"SHB", "manual"),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pyqbmmlib', u'PyQBMMlib Documentation',
[author], 1)
]
man_pages = [(master_doc, "pyqbmmlib", u"PyQBMMlib Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -158,9 +152,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'PyQBMMlib', u'PyQBMMlib Documentation',
author, 'PyQBMMlib', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"PyQBMMlib",
u"PyQBMMlib Documentation",
author,
"PyQBMMlib",
"One line description of project.",
"Miscellaneous",
),
]


Expand All @@ -179,15 +179,15 @@
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
epub_exclude_files = ["search.html"]


# -- Extension configuration -------------------------------------------------

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
intersphinx_mapping = {"https://docs.python.org/": None}

# -- Options for todo extension ----------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions inputs/example_2d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ qbmm:
flow: no
governing_dynamics: " - x - xdot"
num_internal_coords: 2
num_quadrature_nodes: 9
num_quadrature_nodes: 4
method: "chyqmom"
adaptive: no
max_skewness: 30
checks: no

advancer:
method: "RK23"
method: "RK3"
time_step: 1.0e-5
final_time: 15.0
error_tol: 1.0e-7
error_tol: 1.0e-6
num_steps: 10000
num_steps_print: 100
num_steps_write: 100
Expand Down
92 changes: 92 additions & 0 deletions notebooks/Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"some_string\n",
"y is empty\n"
]
}
],
"source": [
"x = \"some_string\"\n",
"y = \"\"\n",
"\n",
"if x:\n",
" print(x)\n",
"else:\n",
" print(\"x is empty\")\n",
" \n",
"if y:\n",
" print(y)\n",
"else:\n",
" print(\"y is empty\")\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['CavityFlame.aux', 'CavityFlame.blg']"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"project_name = \"CavityFlame\"\n",
"[project_name+ext for ext in [\".aux\",\".blg\"]]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Loading