4
class Source(Function):
5
def eval(self, point, i):
14
class Density(Function):
15
def eval(self, point, i):
18
class SimpleBC(BoundaryCondition):
19
def eval(self, value, point, i):
23
class InitialVelocity(Function):
24
def eval(self, point, i):
28
set("ODE method", "dg");
30
set("ODE nonlinear solver", "fixed-point");
31
set("ODE linear solver", "direct");
32
set("ODE tolerance", 1.0e3);
33
set("ODE discrete tolerance", 1.0e+3);
35
set("ODE fixed time step", True);
36
set("ODE initial time step", 1.0e-2);
37
set("ODE maximum time step", 1.0e-2);
39
set("ODE save solution", False);
40
set("ODE solution file name", "primal.py");
41
set("ODE number of samples", 100);
44
nu = 0.3 # Poisson's ratio
45
E = 500.0 * 0.7 * 1.0 # Young's modulus
46
nuv = 1.0e1 # Viscosity
48
yld = 10.0 # Yield strength
49
nuplast = 5.0e-2 # Plastic viscosity
55
#load_parameters("parameters.xml")
57
coeffs = import_header("Coefficients.h")
58
#import coefficients as coeffs
65
v0 = InitialVelocity()
67
pde = DiffPDE(geometry.mesh, f, E, nu, nuv, nuplast, yld, bc, T, v0, rho)
70
print "fcount: ", pde.fcount