Skip to content

Commit

Permalink
Update notebooks (#484)
Browse files Browse the repository at this point in the history
* fixed default ipyparallel setup and sdInfo regressions

* updated stack (to update mpich and sphinx)

* updating stack to add imagesize

* removed errors from sphing doc generation

* Refactor the tutorial directory.

* simplified handling of hit remotes

* Added a Navier-Stokes driven cavity example.

* added Makefile targets for setting up remote src and bld caches

* fix Makefile for when lsb_release not present

* updated stack to fix pycgal fail

* fix mprans.PresInc numerical flux and Jacobian

* updated stack to fix pycgal build failure

* Added streamlines to NSE solution plots.

* updated stack and removed adjoint from PresInc

* updated hashdist that supports pushing xz archives

* updated stack and cleaned up CI support

* removed reference  to update_notebooks branch in Dockerfile
  • Loading branch information
cekees authored Jan 11, 2017
1 parent 76a6aad commit 837f199
Show file tree
Hide file tree
Showing 40 changed files with 1,829 additions and 1,731 deletions.
3 changes: 2 additions & 1 deletion .hashdist_default
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
95601061658628ad9da3be1a5538681ed1092634
3b554016f6f539fdd2c713595f1c9ad8a3e9c179




Expand Down
8 changes: 7 additions & 1 deletion .hashstack_default
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
2ca88aa0ef486b86ad45191ea56c72ce641f8dda
f107fbfbfb8f3a87607929c8ee3901bef3a1447a









Expand Down
81 changes: 0 additions & 81 deletions .shippable-profile.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ addons:
- libssl-dev

before_install:
- wget https://dl.dropboxusercontent.com/u/26353144/hashdist_trusty.tgz
- tar xzf hashdist_trusty.tgz
- mv .hashdist $HOME
- pip install pyliblzma

install:
Expand All @@ -30,6 +27,9 @@ install:
- make hashdist
- make stack
- make stack/default.yaml
- ./hashdist/bin/hit init-home
- ./hashdist/bin/hit remote add https://dl.dropboxusercontent.com/u/26353144/hashdist_src --objects="source"
- ./hashdist/bin/hit remote add https://dl.dropboxusercontent.com/u/26353144/hashdist_ubuntu_14_04 --objects="build"
- FC=gfortran make install
- export PATH=$PWD/linux2/bin:$PATH
- export SSL_CERT_DIR=/etc/ssl/certs
Expand Down
81 changes: 0 additions & 81 deletions .travisprofile.yml

This file was deleted.

12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,20 @@ RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER

RUN mkdir /home/$NB_USER/.jupyter && \
mkdir /home/$NB_USER/.local && \
mkdir /home/$NB_USER/.hashdist && \
echo "cacert=/etc/ssl/certs/ca-certificates.crt" > /home/$NB_USER/.curlrc

ADD https://dl.dropboxusercontent.com/u/26353144/hashdist_config_jovyan.yaml /home/$NB_USER/.hashdist/config.yaml

RUN chown -R $NB_USER:users /home/$NB_USER

USER jovyan

RUN ls /home/$NB_USER/.hashdist && \
cat /home/$NB_USER/.hashdist/config.yaml

WORKDIR /home/$NB_USER

RUN cat /home/$NB_USER/.hashdist/config.yaml && \
git clone https://github.com/erdc-cm/proteus && \
RUN git clone https://github.com/erdc-cm/proteus && \
cd proteus && \
make hashdist stack stack/default.yaml && \
./hashdist/bin/hit init-home && \
./hashdist/bin/hit remote add https://dl.dropboxusercontent.com/u/26353144/hashdist_src --objects="source" && \
./hashdist/bin/hit remote add https://dl.dropboxusercontent.com/u/26353144/hashdist_debian_jessie --objects="build" && \
cd stack && \
../hashdist/bin/hit build default.yaml -v

Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ hashdist:
@echo "No hashdist found. Cloning hashdist from GitHub"
git clone https://github.com/hashdist/hashdist.git
cd hashdist && git checkout ${HASHDIST_DEFAULT_VERSION}

hashdist_src:
@echo "Trying to add hashdist source cache"
./hashdist/bin/hit remote add https://dl.dropboxusercontent.com/u/26353144/hashdist_src --objects="source"

hashdist_bld:
@echo "Trying to add hashdist build cache for your arch"
HASHSTACK_BLD = $(shell lsb_release -ir | python -c "import sys; rel=dict((k.split(':')[0].split()[0],k.split(':')[1].strip().replace('.','_').lower()) for k in sys.stdin.readlines()); print '{Distributor}_{Release}'.format(**rel)")
./hashdist/bin/hit remote add https://dl.dropboxusercontent.com/u/26353144/hashdist_${HASHSTACK_BLD} --objects="build"

stack:
@echo "No stack found. Cloning stack from GitHub"
git clone https://github.com/hashdist/hashstack.git stack
Expand Down Expand Up @@ -297,3 +307,8 @@ jupyter:
jupyter nbextension install --py --sys-prefix rise
jupyter nbextension enable --py --sys-prefix rise
jupyter dashboards quick-setup --sys-prefix
jupyter nbextension install --sys-prefix --py ipyparallel
jupyter nbextension enable --sys-prefix --py ipyparallel
jupyter serverextension enable --sys-prefix --py ipyparallel
ipython profile create mpi --parallel
echo "c.IPClusterEngines.engine_launcher_class = 'MPI'" >> ${HOME}/.ipython/profile_mpi/ipcluster_config.py
2 changes: 0 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ source/api/modules.rst:
sphinx-apidoc --output-dir=source/api ../proteus --separate -M

$(BUILDDIR)/capi/html/files.html:
-mkdir -p build/html/capi
doxygen
cp doxygenIndexRedirect.html build/html/capi/html/index.html

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
Expand Down
6 changes: 3 additions & 3 deletions doc/source/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% set theme_css_files = [] %}
{% if theme_bootstrap_version == "3" %}
{% set bootstrap_version, bootstrap_additional_css, navbar_version = "3.3.4", "theme", "" %}
{% set bootstrap_version, bootstrap_additional_css, navbar_version = "3.3.6", "theme", "" %}
{% set bs_span_prefix = "col-md-" %}
{% else %}
{% set bootstrap_version, bootstrap_additional_css, navbar_version = "2.3.2", "responsive", "-2" %}
Expand Down Expand Up @@ -104,12 +104,12 @@
style="height:1in;"> A Python toolkit for computational methods and simulation</p>
<div class="btn-group" role="group">
<a class="btn btn-success"
href="https://github.com/erdc-cm/proteus/archive/v1.2.0.tar.gz">
href="https://github.com/erdc-cm/proteus/archive/1.2.0.tar.gz">
<span class="glyphicon glyphicon-download"></span> Download
</a>
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a https://github.com/erdc-cm/proteus/archive/v1.2.0.tar.gz">Version 1.2.0</a></li>
<li><a https://github.com/erdc-cm/proteus/archive/1.2.0.tar.gz">Version 1.2.0</a></li>
</ul>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def linkcode_resolve(domain, info):

# General information about the project.
project = u'Proteus'
copyright = u'2016, The Proteus Team'
copyright = u'2017, The Proteus Team'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -452,5 +452,4 @@ def linkcode_resolve(domain, info):

graphviz_output_format = 'svg'

#mathjax_path = "https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
mathjax_pth = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTM"
2 changes: 1 addition & 1 deletion proteus/AnalysisTools.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np
from scipy import signal as sn
from pylab import *
#from pylab import *
import collections as cll
import csv
from proteus import WaveTools as WT
Expand Down
43 changes: 23 additions & 20 deletions proteus/Context.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@
It also alows declaring input options to the user context that can be
set from the command line.
Example (set the global context from an object):
Example (set the global context from an object)::
#create a simple context class
globalSettings = {"nnx":11, "T":10.0, "g"=9.8}
MyContext = namedtuple("MyContext",globalSettings.keys())
#set the global context object
proteus.Context.set(MyContext._make(globalSettings.values())
#create a simple context class
globalSettings = {"nnx":11, "T":10.0, "g"=9.8}
MyContext = namedtuple("MyContext",globalSettings.keys())
#set the global context object
proteus.Context.set(MyContext._make(globalSettings.values())
Example (set the global context from a module):
Example (set the global context from a module)::
import globalSettingsModule
proteus.Context.setFromModule(globalSettingsModule)
import globalSettingsModule
proteus.Context.setFromModule(globalSettingsModule)
Example (use the global context):
Example (use the global context)::
ct = proteus.Context.get()
nnx = ct.nnx
ct = proteus.Context.get()
nnx = ct.nnx
"""
from collections import namedtuple
from .Profiling import logEvent
Expand Down Expand Up @@ -57,16 +58,18 @@ def Options(optionsList=None):
"""Construct an o
from proteus.LinearAlgebraToptions object (named tuple)
:param optionsList: An iteratble of options tuples. Each option is a 3-tuple,
with the first entry the option name string, the second entry the default value,
and the third entry a help string
:param optionsList: An iteratble of options tuples. Each option is
a 3-tuple, with the first entry the option
name string, the second entry the default
value, and the third entry a help string
Example::
Example:
opts=Context.Options([("nnx", 11, "number of mesh nodes in x-direction"),
("nny", 21, "number of mesh nodes in y-direction"])
nnx = opts.nnx
nny = opts.nny
opts=Context.Options([("nnx", 11, "number of mesh nodes in x-direction"),
("nny", 21, "number of mesh nodes in y-direction"])
nnx = opts.nnx
nny = opts.nny
"""
import ast, sys
global contextOptionsString
Expand Down
2 changes: 1 addition & 1 deletion proteus/Domain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ void PiecewiseLinearComplexDomain::writeAsymptote(const char* filename)
}
// void PiecewiseLinearComplex::getBoundingBox(vector<double> & v)
// {}
void PiecewiseLinearComplex::writePoly(const char* filename)
void PiecewiseLinearComplexDomain::writePoly(const char* filename)
{
if(!filename)
{
Expand Down
Loading

0 comments on commit 837f199

Please sign in to comment.