From 6b4e007a22f18f445c86bcd76fc5355ff9a96fde Mon Sep 17 00:00:00 2001 From: Matt Archer Date: Thu, 15 Feb 2024 17:58:33 +0000 Subject: [PATCH] create_form api fixes --- src/Elasticity.py | 2 +- src/elasticity_problem.cpp | 3 +-- src/poisson_problem.cpp | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Elasticity.py b/src/Elasticity.py index ccd8018..a24044f 100644 --- a/src/Elasticity.py +++ b/src/Elasticity.py @@ -31,7 +31,7 @@ def eps(v): return 0.5*(grad(v) + grad(v).T) def sigma(v): - return 2.0*mu*eps(v) + lmbda*tr(eps(v))*Identity(cell.geometric_dimension()) + return 2.0*mu*eps(v) + lmbda*tr(eps(v))*Identity(3) # Add forms to namespace with names a1, a2, a3 etc. aname = 'a' + str(degree) diff --git a/src/elasticity_problem.cpp b/src/elasticity_problem.cpp index e8f9cf7..6618a1d 100644 --- a/src/elasticity_problem.cpp +++ b/src/elasticity_problem.cpp @@ -181,8 +181,7 @@ elastic::problem(std::shared_ptr> mesh, int order) auto L = std::make_shared>(fem::create_form( *form_elasticity_L.at(order - 1), {V}, {{"w0", f}}, {}, {})); auto a = std::make_shared>(fem::create_form( - *form_elasticity_a.at(order - 1), {V, V}, - std::vector>>{}, {}, {})); + *form_elasticity_a.at(order - 1), {V, V}, {}, {}, {})); t0c.stop(); // Create matrices and vector, and assemble system diff --git a/src/poisson_problem.cpp b/src/poisson_problem.cpp index 923c05e..fae3776 100644 --- a/src/poisson_problem.cpp +++ b/src/poisson_problem.cpp @@ -108,8 +108,7 @@ poisson::problem(std::shared_ptr> mesh, int order) auto L = std::make_shared>(fem::create_form( *form_poisson_L.at(order - 1), {V}, {{"w0", f}, {"w1", g}}, {}, {})); auto a = std::make_shared>(fem::create_form( - *form_poisson_a.at(order - 1), {V, V}, - std::vector>>{}, {}, {})); + *form_poisson_a.at(order - 1), {V, V}, {}, {}, {})); // Create matrices and vector, and assemble system std::shared_ptr A = std::make_shared(