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, 31 May 2019 20:18:41 -0400 (EDT)

branch: devel-tetsuo-houbolt
commit 32d11c1a088abc0ed831bd91207a015692e964b8
Author: Tetsuo Koyama <address@hidden>
Date:   Fri May 31 00:26:28 2019 +0900

    Revert "Add Houbolt method tests"
    
    This reverts commit eacdc60869472c2d88cfeeb50f9311ab8ed92b0d.
---
 tests/heat_equation.cc    | 29 ++++-------------------------
 tests/heat_equation.param |  3 ---
 2 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/tests/heat_equation.cc b/tests/heat_equation.cc
index c2c78be..4943475 100644
--- a/tests/heat_equation.cc
+++ b/tests/heat_equation.cc
@@ -103,7 +103,6 @@ struct heat_equation_problem {
   plain_vector U, V;
 
   scalar_type dt, T, theta;
-  size_type scheme;
 
   std::string datafilename;
   bgeot::md_param PARAM;
@@ -151,7 +150,6 @@ void heat_equation_problem::init(void) {
   scalar_type FT = PARAM.real_value("FT", "parameter for exact solution");
   dt = PARAM.real_value("DT", "Time step");
   T = PARAM.real_value("T", "final time");
-  scheme = PARAM.int_value("SCHEME", "Time integration scheme");
   theta = PARAM.real_value("THETA", "Theta method parameter");
   sol_c = PARAM.real_value("C", "Diffusion coefficient");
   residual = PARAM.real_value("RESIDUAL");
@@ -245,16 +243,7 @@ bool heat_equation_problem::solve(void) {
        DIRICHLET_BOUNDARY_NUM, "DirichletData");
 
   // transient part.
-  switch (scheme) {
-  case 1 : // Theta-method
-    getfem::add_theta_method_for_first_order(model, "u", theta);
-    break;
-  case 2 : // Houbolt-method
-    getfem::add_Houbolt_scheme(model, "u");
-    break;
-  default : GMM_ASSERT1(false, "Unvalid time integration scheme");
-  }
-
+  getfem::add_theta_method_for_first_order(model, "u", theta);
   getfem::add_mass_brick(model, mim, "Dot_u");
   
   gmm::iteration iter(residual, 0, 40000);
@@ -272,19 +261,9 @@ bool heat_equation_problem::solve(void) {
     getfem::interpolation_function(mf_u, V, sol_dot);
   }
 
-  switch (scheme) {
-  case 1 : // Theta-method
-    gmm::copy(U, model.set_real_variable("Previous_u"));
-    if (!with_automatic_init)
-      gmm::copy(V, model.set_real_variable("Previous_Dot_u"));
-    break;
-  case 2 : // Houbolt-method
-    gmm::copy(U, model.set_real_variable("Previous_u"));
-    gmm::copy(U, model.set_real_variable("Previous2_u"));
-    gmm::copy(U, model.set_real_variable("Previous3_u"));
-    break;
-  default : GMM_ASSERT1(false, "Unvalid time integration scheme");
-  }
+  gmm::copy(U, model.set_real_variable("Previous_u"));
+  if (!with_automatic_init)
+    gmm::copy(V, model.set_real_variable("Previous_Dot_u"));
   
 
   if (with_automatic_init) {
diff --git a/tests/heat_equation.param b/tests/heat_equation.param
index 5dbc90c..3cafdd9 100644
--- a/tests/heat_equation.param
+++ b/tests/heat_equation.param
@@ -36,9 +36,6 @@ T = 1/(C*FT*FT*N*2);                 % Final time
 DT = T/50;                           % Time step
 THETA = 0.5;                         % Theta method parameter
 
-SCHEME = 2;                          % Time integration scheme
-                                     % 1 = Theta-method
-                                     % 2 = Houbolt
 
 if (N == 1)
   MESH_TYPE = 'GT_PK(1,1)';          % segments



reply via email to

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