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: Sun, 23 Feb 2020 03:08:25 -0500 (EST)

branch: devel-tetsuo-outer_faces_in_ball
commit 752bce92ca0cdf498dabb1313d790d4dca2b111c
Author: Tetsuo Koyama <address@hidden>
AuthorDate: Tue Feb 18 00:17:45 2020 +0900

    :heavy_plus_sign: outer_faces_in_ball
---
 interface/tests/python/Makefile.am                           |  2 +-
 .../python/demo_thermo_elasticity_electrical_coupling.py     | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/interface/tests/python/Makefile.am 
b/interface/tests/python/Makefile.am
index 982f573..e6bd548 100644
--- a/interface/tests/python/Makefile.am
+++ b/interface/tests/python/Makefile.am
@@ -49,7 +49,6 @@ EXTRA_DIST=                                           \
        demo_stokes_3D_tank_draw.py                     \
        demo_finite_strain_plasticity.py                \
        demo_finite_strain_plasticity_3D.py             \
-       demo_thermo_elasticity_electrical_coupling.py   \
        demo_cracked_thermo_elastic_body.py             \
        demo_nonlinear_elasticity.py                    \
        demo_elasticity_HHO.py                          \
@@ -73,6 +72,7 @@ TESTS =                                               \
        demo_laplacian.py                               \
        demo_laplacian_HHO.py                           \
        demo_elasticity_HHO.py                          \
+       demo_thermo_elasticity_electrical_coupling.py   \
        $(optpy)
 
 AM_TESTS_ENVIRONMENT = \
diff --git 
a/interface/tests/python/demo_thermo_elasticity_electrical_coupling.py 
b/interface/tests/python/demo_thermo_elasticity_electrical_coupling.py
index a9f2ed3..c26de45 100644
--- a/interface/tests/python/demo_thermo_elasticity_electrical_coupling.py
+++ b/interface/tests/python/demo_thermo_elasticity_electrical_coupling.py
@@ -106,19 +106,31 @@ fb2 = mesh.outer_faces_with_direction([ 1., 0.], 0.01) # 
Right boundary
 fb3 = mesh.outer_faces_with_direction([-1., 0.], 0.01) # Left boundary
 fb4 = mesh.outer_faces_with_direction([0.,  1.], 0.01) # Top boundary
 fb5 = mesh.outer_faces_with_direction([0., -1.], 0.01) # Bottom boundary
+fb6 = mesh.outer_faces_in_ball([25., 12.5], 8.+0.01*h) # Left hole boundary
+fb7 = mesh.outer_faces_in_ball([50., 12.5], 8.+0.01*h) # Center hole boundary
+fb8 = mesh.outer_faces_in_ball([75., 12.5], 8.+0.01*h) # Right hole boundary
 
 RIGHT_BOUND=1; LEFT_BOUND=2; TOP_BOUND=3; BOTTOM_BOUND=4; HOLE_BOUND=5;
+HOLE1_BOUND = 6; HOLE2_BOUND = 7; HOLE3_BOUND = 8;
 
 mesh.set_region( RIGHT_BOUND, fb2)
 mesh.set_region(  LEFT_BOUND, fb3)
 mesh.set_region(   TOP_BOUND, fb4)
 mesh.set_region(BOTTOM_BOUND, fb5)
 mesh.set_region(  HOLE_BOUND, fb1)
+mesh.set_region( HOLE1_BOUND, fb6)
+mesh.set_region( HOLE2_BOUND, fb7)
+mesh.set_region( HOLE3_BOUND, fb8)
 mesh.region_subtract( RIGHT_BOUND, HOLE_BOUND)
 mesh.region_subtract(  LEFT_BOUND, HOLE_BOUND)
 mesh.region_subtract(   TOP_BOUND, HOLE_BOUND)
 mesh.region_subtract(BOTTOM_BOUND, HOLE_BOUND)
 
+mesh.region_merge(HOLE1_BOUND, HOLE2_BOUND)
+mesh.region_merge(HOLE1_BOUND, HOLE3_BOUND)
+
+assert mesh.region(HOLE_BOUND) == mesh.region(HOLE_BOUND1)
+
 if (export_mesh):
     mesh.export_to_vtk('mesh.vtk');
     print('\nYou can view the mesh for instance with');



reply via email to

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