[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] r4969 - in /trunk/getfem: interface/tests/matlab/ src/g
From: |
Yves . Renard |
Subject: |
[Getfem-commits] r4969 - in /trunk/getfem: interface/tests/matlab/ src/getfem/ tests/ |
Date: |
Thu, 23 Apr 2015 18:56:02 -0000 |
Author: renard
Date: Thu Apr 23 20:56:02 2015
New Revision: 4969
URL: http://svn.gna.org/viewcvs/getfem?rev=4969&view=rev
Log:
minor fixes
Modified:
trunk/getfem/interface/tests/matlab/demo_laplacian.m
trunk/getfem/src/getfem/getfem_derivatives.h
trunk/getfem/tests/bilaplacian.pl
trunk/getfem/tests/elastostatic.pl
trunk/getfem/tests/heat_equation.pl
trunk/getfem/tests/laplacian.pl
trunk/getfem/tests/laplacian_with_bricks.pl
trunk/getfem/tests/schwarz_additive.pl
trunk/getfem/tests/test_range_basis.pl
trunk/getfem/tests/wave_equation.pl
Modified: trunk/getfem/interface/tests/matlab/demo_laplacian.m
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/interface/tests/matlab/demo_laplacian.m?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/interface/tests/matlab/demo_laplacian.m (original)
+++ trunk/getfem/interface/tests/matlab/demo_laplacian.m Thu Apr 23
20:56:02 2015
@@ -16,7 +16,7 @@
% Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
% Options for prescribing the Dirichlet condition
-dirichlet_version = 0; % 0 = simplification, 1 = with multipliers, 2 =
penalization, 3 = Nitsche's method
+dirichlet_version = 1; % 0 = simplification, 1 = with multipliers, 2 =
penalization, 3 = Nitsche's method
theta = 1; % Nitsche's method parameter theta
gamma0 = 0.001; % Nitsche's method parameter gamma0 (gamma = gamma0*h)
r = 1e8; % Penalization parameter
@@ -36,9 +36,9 @@
m=gf_mesh('import','structured',sprintf('GT="GT_PK(2,1)";SIZES=[1,1];NOISED=0;NSUBDIV=[%d,%d];',
NX, NX));
end
-% create a mesh_fem of for a field of dimension 1 (i.e. a scalar field)
+% Create a mesh_fem of for a field of dimension 1 (i.e. a scalar field)
mf = gf_mesh_fem(m,1);
-% assign the QK or PK fem to all convexes of the mesh_fem, and define an
+% Assign the QK or PK fem to all convexes of the mesh_fem, and define an
% integration method
if (quadrangles)
gf_mesh_fem_set(mf,'fem',gf_fem(sprintf('FEM_QK(2,%d)', K)));
@@ -48,16 +48,17 @@
mim = gf_mesh_im(m, gf_integ('IM_TRIANGLE(6)'));
end
-% detect the border of the mesh
+% Detect the border of the mesh
border = gf_mesh_get(m,'outer faces');
-% mark it as boundary #1
+% Mark it as boundary GAMMAD=1
+GAMMAD=1;
gf_mesh_set(m, 'boundary', 1, border);
if (draw)
gf_plot_mesh(m, 'regions', [1]); % the boundary edges appears in red
pause(1);
end
-% interpolate the exact solution
+% Interpolate the exact solution
% Uexact = gf_mesh_fem_get(mf, 'eval', { '10*y.*(y-1).*x.*(x-1)+10*x.^5' });
Uexact = gf_mesh_fem_get(mf, 'eval', { 'x.*sin(2*pi*x).*sin(2*pi*y)' });
% Opposite of its laplacian
@@ -66,20 +67,21 @@
md=gf_model('real');
gf_model_set(md, 'add fem variable', 'u', mf);
-gf_model_set(md, 'add Laplacian brick', mim, 'u');
+gf_model_set(md, 'add linear generic assembly brick', mim,
'Grad_u.Grad_Test_u');
+% gf_model_set(md, 'add Laplacian brick', mim, 'u');
gf_model_set(md, 'add initialized fem data', 'VolumicData', mf, F);
gf_model_set(md, 'add source term brick', mim, 'u', 'VolumicData');
gf_model_set(md, 'add initialized fem data', 'DirichletData', mf, Uexact);
switch (dirichlet_version)
case 0,
- gf_model_set(md, 'add Dirichlet condition with simplification', 'u', 1,
'DirichletData');
+ gf_model_set(md, 'add Dirichlet condition with simplification', 'u',
GAMMAD, 'DirichletData');
case 1,
- gf_model_set(md, 'add Dirichlet condition with multipliers', mim, 'u', mf,
1, 'DirichletData');
+ gf_model_set(md, 'add Dirichlet condition with multipliers', mim, 'u', mf,
GAMMAD, 'DirichletData');
case 2,
- gf_model_set(md, 'add Dirichlet condition with penalization', mim, 'u', r,
1, 'DirichletData');
+ gf_model_set(md, 'add Dirichlet condition with penalization', mim, 'u', r,
GAMMAD, 'DirichletData');
case 3,
gf_model_set(md, 'add initialized data', 'gamma0', [gamma0]);
- gf_model_set(md, 'add Dirichlet condition with Nitsche method', mim, 'u',
'gamma0', 1, theta, 'DirichletData');
+ gf_model_set(md, 'add Dirichlet condition with Nitsche method', mim, 'u',
'gamma0', GAMMAD, theta, 'DirichletData');
end
gf_model_get(md, 'solve');
U = gf_model_get(md, 'variable', 'u');
Modified: trunk/getfem/src/getfem/getfem_derivatives.h
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem/getfem_derivatives.h?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/src/getfem/getfem_derivatives.h (original)
+++ trunk/getfem/src/getfem/getfem_derivatives.h Thu Apr 23 20:56:02 2015
@@ -48,7 +48,6 @@
@param mf the source mesh_fem.
@param U the source field.
@param mf_target should be a lagrange discontinous element
- does not work with vectorial elements. ... to be done ...
@param V contains on output the gradient of U, evaluated on mf_target.
mf_target may have the same Qdim than mf, or it may
Modified: trunk/getfem/tests/bilaplacian.pl
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/bilaplacian.pl?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/tests/bilaplacian.pl (original)
+++ trunk/getfem/tests/bilaplacian.pl Thu Apr 23 20:56:02 2015
@@ -78,5 +78,6 @@
print "Convergence error: P1: $err1 $err2\n";
exit(1);
}
+`rm -f $tmp`;
print ".\n";
Modified: trunk/getfem/tests/elastostatic.pl
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/elastostatic.pl?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/tests/elastostatic.pl (original)
+++ trunk/getfem/tests/elastostatic.pl Thu Apr 23 20:56:02 2015
@@ -117,6 +117,6 @@
exit(1);
}
-
+`rm -f $tmp`;
print ".\n";
Modified: trunk/getfem/tests/heat_equation.pl
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/heat_equation.pl?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/tests/heat_equation.pl (original)
+++ trunk/getfem/tests/heat_equation.pl Thu Apr 23 20:56:02 2015
@@ -109,7 +109,7 @@
##start_program("-d N=3 -d INTEGRATION=1 -d MESH_TYPE=2 -d NX=3 -d FT=0.01");
#print ".";
-#`rm -f $tmp`;
+`rm -f $tmp`;
if ($er == 1) { exit(1); }
Modified: trunk/getfem/tests/laplacian.pl
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/laplacian.pl?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/tests/laplacian.pl (original)
+++ trunk/getfem/tests/laplacian.pl Thu Apr 23 20:56:02 2015
@@ -115,7 +115,7 @@
print ".\n";
-#`rm -f $tmp`;
+`rm -f $tmp`;
if ($er == 1) { exit(1); }
Modified: trunk/getfem/tests/laplacian_with_bricks.pl
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/laplacian_with_bricks.pl?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/tests/laplacian_with_bricks.pl (original)
+++ trunk/getfem/tests/laplacian_with_bricks.pl Thu Apr 23 20:56:02 2015
@@ -117,7 +117,7 @@
print ".\n";
-#`rm -f $tmp`;
+`rm -f $tmp`;
if ($er == 1) { exit(1); }
Modified: trunk/getfem/tests/schwarz_additive.pl
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/schwarz_additive.pl?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/tests/schwarz_additive.pl (original)
+++ trunk/getfem/tests/schwarz_additive.pl Thu Apr 23 20:56:02 2015
@@ -62,6 +62,6 @@
}
close(F); if ($?) { exit(1); }
if ($er == 1) { exit(1); }
+`rm -f $tmp`;
-
Modified: trunk/getfem/tests/test_range_basis.pl
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/test_range_basis.pl?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/tests/test_range_basis.pl (original)
+++ trunk/getfem/tests/test_range_basis.pl Thu Apr 23 20:56:02 2015
@@ -79,7 +79,7 @@
start_program("");
-#`rm -f $tmp`;
+`rm -f $tmp`;
if ($er == 1) { exit(1); }
Modified: trunk/getfem/tests/wave_equation.pl
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/tests/wave_equation.pl?rev=4969&r1=4968&r2=4969&view=diff
==============================================================================
--- trunk/getfem/tests/wave_equation.pl (original)
+++ trunk/getfem/tests/wave_equation.pl Thu Apr 23 20:56:02 2015
@@ -113,7 +113,7 @@
##start_program("-d N=3 -d INTEGRATION=1 -d MESH_TYPE=2 -d NX=3 -d FT=0.01");
#print ".";
-#`rm -f $tmp`;
+`rm -f $tmp`;
if ($er == 1) { exit(1); }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] r4969 - in /trunk/getfem: interface/tests/matlab/ src/getfem/ tests/,
Yves . Renard <=