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
sf1409@doodson:~/src/testfieldsplit$ gdb --args python tfs.py | |
GNU gdb (GDB) 7.6.1-ubuntu | |
Copyright (C) 2013 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... |
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
*HEADING | |
cubit(abaqus_facet.inp): 12/16/2013: 10:42:27 | |
version: 13.1 | |
** | |
********************************** P A R T S ********************************** | |
*PART, NAME=Part-Default | |
** | |
********************************** N O D E S ********************************** | |
*NODE, NSET=ALLNODES | |
94024, -1.748064e+00, 9.717365e-01, 5.000000e+00 |
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
#!/usr/bin/python | |
from dolfin import * | |
import sys | |
if len(sys.argv) < 2: | |
print "Usage: plot_mesh.py meshfile [facet_files]" | |
sys.exit(1) | |
mesh = Mesh(sys.argv[1]) | |
print "Number of vertices: ", mesh.num_vertices() |
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
*HEADING | |
cubit(mesh.inp): 12/16/2013: 10:42:27 | |
version: 13.1 | |
** | |
********************************** P A R T S ********************************** | |
*PART, NAME=Part-Default | |
** | |
********************************** N O D E S ********************************** | |
*NODE, NSET=ALLNODES | |
94024, -1.748064e+00, 9.717365e-01, 5.000000e+00 |
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
from dolfin import * | |
from dolfin_adjoint import * | |
# Create mesh | |
c = Point(0.0, 0.0, 0.0) | |
S = Sphere(c, 0.5) | |
mesh = Mesh(S, 10) | |
# Define mixed function spaces with Nedelec (edge) elements | |
X_h = FunctionSpace(mesh, "Nedelec 1st kind H(curl)", 1) |
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
from dolfin import * | |
import numpy | |
def project_assign_rho(w, rho_init): | |
W = w.function_space() | |
rho, u, p, s, lmbd_u, lmbd_p, lmbd_r = split(w) | |
vec = as_vector((rho_init, u[0], u[1], p, s, lmbd_u[0], lmbd_u[1], lmbd_p, lmbd_r)) | |
w_proj = project(vec, W) | |
w.assign(w_proj) |
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
from dolfin import * | |
mesh = UnitSquareMesh(2, 2) | |
V = FunctionSpace(mesh, "CG", 2) | |
f = project(Expression("sin(x[1]) * cos(x[0])"), V) | |
File("f.xyz") << f |
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
from opentidalfarm import * | |
class ADDolfinExpression(object): | |
def element_order(self, V): | |
''' Returns the element polynomial order ''' | |
return TestFunction(V).element().degree() | |
def __init__(self, f): | |
self.f = f | |
order = self.element_order(f.function_space()) |
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
running build_ext | |
building '_instant_module_81cc3b239b71f9e22c25de888db576b6854f0f33' extension | |
creating build | |
creating build/temp.linux-x86_64-2.7 | |
mpicc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/petsc/include -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c mat_utils.cxx -o build/temp.linux-x86_64-2.7/mat_utils.o | |
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default] | |
mpicc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/dist-packages/petsc/include -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c instant_module_81cc3b239b71f9e22c25de888db576b6854f0f33_wrap.cxx -o build/temp.linux-x86_64-2.7/instant_module_81cc3b239b71f9e22c25de888db576b6854f0f33_wrap.o | |
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enable |