This file contains hidden or 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
from firedrake import * | |
class Projector: | |
def __init__(self, W, V): | |
"""Class for projecting functions in the mixed space W = L2 x HDiv to scalar functions in V | |
:arg W: function space W | |
:arg V: function space V |
This file contains hidden or 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
import torch | |
import numpy as np | |
class ExponentialFunction(torch.autograd.Function): | |
"""Differentiable implementation of exponential function exp(-(X.kappa)^2) for given kappa | |
If the input X is a vector compute | |
y = exp(-(sum_j kappa_j*X_j)^2) |
This file contains hidden or 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
(firedrake) eikehmueller@eikehmueller src $ python train.py | |
firedrake:WARNING OMP_NUM_THREADS is not set or is set to a value greater than 1, we suggest setting OMP_NUM_THREADS=1 to improve performance | |
/Users/eikehmueller/Software/firedrake/src/pyadjoint/firedrake_adjoint/__init__.py:9: FutureWarning: The firedrake_adjoint module is deprecated. | |
Instead, use the firedrake.adjoint module and explicitly start taping | |
by calling continue_annotation(). | |
warnings.warn("""The firedrake_adjoint module is deprecated. | |
number of patches = 20 | |
patchsize = 60 | |
number of points in all patches = 1200 |
This file contains hidden or 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
from firedrake import * | |
mesh = UnitSquareMesh(10, 10) | |
def get_p1_space(): | |
return FunctionSpace(mesh, "CG", 1) | |
def get_p1_prb_bcs(): | |
return DirichletBC(get_p1_space(), Constant(0.0), "on_boundary") |
This file contains hidden or 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
eikemueller@138-38-171-253 $ ./scripts/firedrake-clean | |
Traceback (most recent call last): | |
File "./scripts/firedrake-clean", line 3, in <module> | |
from firedrake.ffc_interface import clear_cache, FFCKernel | |
File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/__init__.py", line 3, in <module> | |
import firedrake.petsc as petsc | |
File "/Users/eikemueller/PostDocBath/EllipticSolvers/firedrake/firedrake/petsc.py", line 5, in <module> | |
petsc4py.init(sys.argv) | |
File "/Users/eikemueller/PostDocBath/EllipticSolvers/petsc4py/arch-darwin-c-opt/lib/python2.7/site-packages/petsc4py/__init__.py", line 42, in init | |
PETSc = petsc4py.lib.ImportPETSc(arch) |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
Running helmholtz | |
PBS_JOBID = 2918167.sdb | |
Started atSat May 30 18:30:21 BST 2015 | |
+---------------------------+ | |
! Mixed Gravity wave solver ! | |
+---------------------------+ |
This file contains hidden or 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
################################################################################ | |
# General parameters | |
################################################################################ | |
General: | |
warmup_run = True # Carry out a warmup run first? | |
nu_cfl = 2.0 # CFL number | |
speed_c = 300.0 # Sound wave speed [m/s] | |
speed_N = 0.01 # Buoyancy frequency [1/s] | |
solve_matrixfree = True # Use matrix-free solver? | |
solve_petsc = True # Use PETSc solver |
This file contains hidden or 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
ufl_form = phi_test*div(w_h_trial)*self._dx | |
compiled_form = compile_form(ufl_form, 'ufl_form')[0] | |
kernel = compiled_form[6] | |
coords = compiled_form[3] | |
coefficients = compiled_form[4] | |
arguments = ufl_form.arguments() | |
ndof_pressure = arguments[0].cell_node_map().arity | |
ndof_velocity_h = arguments[1].cell_node_map().arity | |
# Build LMA for B_h |
This file contains hidden or 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
eike@eslogin002 $ cat helmholtz_2692059.sdb/output.log | |
Running helmholtz | |
PBS_JOBID = 2692059.sdb | |
Started atThu Feb 5 08:39:45 GMT 2015 | |
+---------------------------+ | |
! Mixed Gravity wave solver ! | |
+---------------------------+ |
This file contains hidden or 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
Running helmholtz | |
PBS_JOBID = 2688816.sdb | |
Started atTue Feb 3 21:21:01 GMT 2015 | |
+---------------------------+ | |
! Mixed Gravity wave solver ! | |
+---------------------------+ |
NewerOlder