[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Yves Renard |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Wed, 31 May 2017 03:06:59 -0400 (EDT) |
branch: devel-yves
commit e8d50fc334a6c8bbae573aeb7b4c956b09d91c1a
Author: Yves Renard <address@hidden>
Date: Tue May 30 16:09:34 2017 +0200
minor changes
---
interface/tests/matlab/demo_laplacian_pyramid.m | 6 +++---
src/getfem/bgeot_poly_composite.h | 11 ++++++++++-
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/interface/tests/matlab/demo_laplacian_pyramid.m
b/interface/tests/matlab/demo_laplacian_pyramid.m
index 60e6d25..0d2e5bc 100644
--- a/interface/tests/matlab/demo_laplacian_pyramid.m
+++ b/interface/tests/matlab/demo_laplacian_pyramid.m
@@ -32,7 +32,7 @@ asize = size(who('automatic_var654'));
if (asize(1)) draw = false; end;
% trace on;
-NX = 10;
+NX = 5;
if (with_pyramids)
m = gf_mesh('pyramidal', [0:1/NX:1], [0:1/NX:1], [0:1/NX:1]);
else
@@ -111,7 +111,7 @@ disp(sprintf('H1 norm of error: %g', err));
M = gf_asm('mass matrix', mim, mf);
K = gf_asm('laplacian', mim, mf, mf, ones(1, gf_mesh_fem_get(mf, 'nbdof')));
-if (0) % Drawing the shape functions on the reference element
+if (1) % Drawing the shape functions on the reference element
m2 = gf_mesh('empty', 3);
gf_mesh_set(m2, 'add convex', gf_geotrans('GT_PYRAMID(1)'), [-1 -1 0; 1,
-1, 0; -1, 1, 0; 1, 1, 0; 0, 0, 1]');
% gf_mesh_set(m2, 'add convex', gf_geotrans('GT_PYRAMID(1)'), [-1 -1 2; 1,
-1, 2; -1, 1, 2; 1, 1, 2; 0, 0, 1]');
@@ -121,7 +121,7 @@ if (0) % Drawing the shape functions on the reference
element
Utest = zeros(1,gf_mesh_fem_get(mf2, 'nbdof'));
% gf_mesh_fem_get(mf2, 'basic dof nodes')
%mim2 = gf_mesh_im(m2, gf_integ('IM_PYRAMID_COMPOSITE(IM_TETRAHEDRON(5))'));
- mim2 = gf_mesh_im(m2, gf_integ('IM_PYRAMID(IM_GAUSS_PARALLELEPIPED(3,9))'));
+ mim2 = gf_mesh_im(m2, gf_integ('IM_PYRAMID(IM_GAUSS_PARALLELEPIPED(3,5))'));
% mim2 = gf_mesh_im(m2,
gf_integ('IM_PYRAMID_COMPOSITE(IM_STRUCTURED_COMPOSITE(IM_TETRAHEDRON(5),10))'));
format long
M2 = gf_asm('mass matrix', mim2, mf2)
diff --git a/src/getfem/bgeot_poly_composite.h
b/src/getfem/bgeot_poly_composite.h
index 35c731a..5c43f65 100644
--- a/src/getfem/bgeot_poly_composite.h
+++ b/src/getfem/bgeot_poly_composite.h
@@ -106,13 +106,22 @@ namespace bgeot {
void derivative(short_type k);
base_poly &poly_of_subelt(size_type l) { return polytab[l]; }
const base_poly &poly_of_subelt(size_type l) const { return polytab[l]; }
-
+ size_type nb_subelt() const { return polytab.size(); }
polynomial_composite(bool lc = true) : local_coordinate(lc) {}
polynomial_composite(const mesh_precomposite &m, bool lc = true);
};
+ inline std::ostream &operator <<
+ (std::ostream &o, const polynomial_composite& P) {
+ o << "poly_composite [";
+ for (size_type i = 0; i < P.nb_subelt(); ++i)
+ { if (i != 0) o << ", "; o << P.poly_of_subelt(i); }
+ o << "]";
+ return o;
+ }
+
template <class ITER>
scalar_type polynomial_composite::eval(const ITER &it) const {
base_node pt(mp->dim());
- [Getfem-commits] [getfem-commits] devel-yves updated (f5ab789 -> 0619a0e), Yves Renard, 2017/05/31
- [Getfem-commits] (no subject), Yves Renard, 2017/05/31
- [Getfem-commits] (no subject), Yves Renard, 2017/05/31
- [Getfem-commits] (no subject), Yves Renard, 2017/05/31
- [Getfem-commits] (no subject), Yves Renard, 2017/05/31
- [Getfem-commits] (no subject), Yves Renard, 2017/05/31
- [Getfem-commits] (no subject),
Yves Renard <=