Skip to content
Snippets Groups Projects
Commit 8fa30c0d authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Properly important the Python 'math' module, and use it.

In particular, I can use math.cos in the initial values.

[[Imported from SVN: r9808]]
parent bcd82778
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,4 @@ kappa = 1
dirichletVerticesPredicate = "x[1] < 0.0001 or x[1] > 0.128 - 0.0001"
# Initial deformation
#initialDeformation = "[x[0], x[1], 0.002*cos(1e4*x[0])]"
# Series expansion of the cosine, because I haven't figured out how to use math stuff in dunepython yet
initialDeformation = "[x[0], x[1], 1e-15*(1- 0.5*(1e4*x[0])*(1e4*x[0]) + (1.0/24)*(1e4*x[0])*(1e4*x[0])*(1e2*x[0])*(1e4*x[0]))]"
initialDeformation = "[x[0], x[1], 0.002*math.cos(1e4*x[0])]"
......@@ -171,6 +171,7 @@ int main (int argc, char *argv[]) try
// Start Python interpreter
Python::start();
Python::Reference main = Python::import("__main__");
Python::run("import math");
//feenableexcept(FE_INVALID);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment