getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Tetsuo Koyama
Subject: [Getfem-commits] (no subject)
Date: Fri, 7 Jun 2019 12:51:41 -0400 (EDT)

branch: devel-tetsuo-houbolt
commit 6856e93b67630fb1964e86a46e1de840549a8b73
Author: Tetsuo Koyama <address@hidden>
Date:   Sat Jun 8 01:42:56 2019 +0900

    Fix Houbolt method
---
 interface/src/gf_model_set.cc                | 9 +++++++++
 interface/tests/python/demo_wave_equation.py | 2 +-
 src/getfem_models.cc                         | 6 +++---
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/interface/src/gf_model_set.cc b/interface/src/gf_model_set.cc
index 4b9bf6d..0eff400 100644
--- a/interface/src/gf_model_set.cc
+++ b/interface/src/gf_model_set.cc
@@ -2750,6 +2750,15 @@ void gf_model_set(getfemint::mexargs_in& m_in,
        getfem::add_Newmark_scheme(*md, varname, beta, gamma);
        );
 
+    /*@SET ('add_Houbolt_scheme', @str varname)
+      Attach a Houbolt method for the time discretization of the variable
+      `varname`. Valid only if there is at most second order time derivative
+      of the variable  @*/
+    sub_command
+      ("add Houbolt scheme", 1, 1, 0, 0,
+       std::string varname = in.pop().to_string();
+       getfem::add_Houbolt_scheme(*md, varname);
+       );
 
      /*@SET ('disable bricks', @ivec bricks_indices)
        Disable a brick (the brick will no longer participate to the
diff --git a/interface/tests/python/demo_wave_equation.py 
b/interface/tests/python/demo_wave_equation.py
index bfad86b..f996315 100644
--- a/interface/tests/python/demo_wave_equation.py
+++ b/interface/tests/python/demo_wave_equation.py
@@ -97,7 +97,7 @@ A0 = 0.*U0
 
 os.system('mkdir results1');
 mf.export_to_vtk('results1/displacement_0.vtk', U0)
-mf.export_to_vkt('results1/velocity_0.vtk', V0)
+mf.export_to_vtk('results1/velocity_0.vtk', V0)
 mf.export_to_vtk('results1/acceleration_0.vtk', A0)
 
 ## Iterations
diff --git a/src/getfem_models.cc b/src/getfem_models.cc
index 87c9e80..7a8a4ad 100644
--- a/src/getfem_models.cc
+++ b/src/getfem_models.cc
@@ -1606,9 +1606,9 @@ namespace getfem {
           gmm::copy(md.complex_variable(U01), md.set_complex_variable(U02));
           gmm::copy(md.complex_variable(U), md.set_complex_variable(U01));
         } else {
-          gmm::copy(md.real_variable(U02), md.set_complex_variable(U03));
-          gmm::copy(md.real_variable(U01), md.set_complex_variable(U02));
-          gmm::copy(md.real_variable(U), md.set_complex_variable(U01));
+          gmm::copy(md.real_variable(U02), md.set_real_variable(U03));
+          gmm::copy(md.real_variable(U01), md.set_real_variable(U02));
+          gmm::copy(md.real_variable(U), md.set_real_variable(U01));
         }
       }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]