This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double Problem:: | |
adaptive_unsteady_newton_solve(const double &dt_desired, | |
const double &epsilon, | |
const bool &shift_values) | |
{ | |
//First, we need to backup the existing dofs, in case the timestep is | |
//rejected | |
//Find total number of dofs on current processor | |
unsigned n_dof_local = dof_distribution_pt()->nrow_local(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script will setup Evm (Emacs Version Manager) and Cask on | |
# Travis to use for Emacs Lisp testing. | |
# | |
# In .travis.yml, add this: | |
# | |
# - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh | |
# | |
# Emacs 24.3 is installed in the above script because Cask requires |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is a test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def emr_step(dt_n, y_n, dy_n, dt_nm1, y_nm1): | |
"""Take a single step of the explicit midpoint rule. | |
From G&S pg. 715 and Prinja's thesis pg.45. | |
""" | |
dtr = dt_n / dt_nm1 | |
y_np1 = (1 - dtr**2)*y_n + (1 + dtr)*dt_n*dy_n + (dtr**2)*(y_nm1) | |
return y_np1 | |
def bdf2_dydt(ts, ys): | |
"""Get dy/dt at time ts[-1] (allowing for varying dt). |
OlderNewer