[Getfem-commits] [getfem-commits] branch master updated: Fix matlab interface compilation problem for the link with external superlu library
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 59a7c206 Fix matlab interface compilation problem for the link with external superlu library 59a7c206 is described below commit 59a7c206b85101119f0159c8215a4ff8c185b89d Author: Yves Renard AuthorDate: Fri Apr 5 11:26:43 2024 +0200 Fix matlab interface compilation problem for the link with external superlu library --- interface/src/matlab/Makefile.am | 13 +++-- interface/src/matlab/gfm_mex.c | 8 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/interface/src/matlab/Makefile.am b/interface/src/matlab/Makefile.am index 9ec5c010..50d4bbf2 100644 --- a/interface/src/matlab/Makefile.am +++ b/interface/src/matlab/Makefile.am @@ -45,20 +45,17 @@ GETFEM_STATIC_LIB = ../../../src/.libs/libgetfem.a @LIBS@ if BUILDMEX if USE_MINGW_MEX -#command extremely sensitive to any modification! fragile! keep the order of the files -# (gfm_mex.c must be first, libstdc++.a must be last) +#command extremely sensitive to any modification! fragile! keep the order of +# the files (gfm_mex.c must be first, libstdc++.a must be last) gf_matlab@MATLAB_COM_EXT@: gfm_mex.c gfm_common.c ../libgetfemint.la ../gfi_array.c $(GETFEM_LIB_LA) - matlab -nodesktop -nosplash -nojvm -r "mex -v -output gf_matlab -g ./gfm_mex.c ./gfm_common.c -largeArrayDims -I. -I.. ./../gfi_array.c ../.libs/libgetfemint.a ../../../src/.libs/libgetfem.a ../../../superlu/.libs/libsuperlu.a /msys/local/lib/libsmumps.a /msys/local/lib/libcmumps.a /msys/local/lib/libdmumps.a /msys/local/lib/libzmumps.a /msys/local/lib/libmumps_common.a /msys/local/lib/libmpiseq.a /msys/local/lib/libpord.a /msys/local/lib/liblapack.a /msys/local/lib/libblas.a /msys/loca [...] + matlab -nodesktop -nosplash -nojvm -r "mex -v -output gf_matlab -g ./gfm_mex.c ./gfm_common.c -largeArrayDims -I. -I.. ./../gfi_array.c ../.libs/libgetfemint.a ../../../src/.libs/libgetfem.a $(SUPERLU_LIBS) /msys/local/lib/libsmumps.a /msys/local/lib/libcmumps.a /msys/local/lib/libdmumps.a /msys/local/lib/libzmumps.a /msys/local/lib/libmumps_common.a /msys/local/lib/libmpiseq.a /msys/local/lib/libpord.a /msys/local/lib/liblapack.a /msys/local/lib/libblas.a /msys/local/lib/libqhull.a /Mi [...] # $(GNUMEX) $(GNUMEXOPTS) -output gf_matlab -g @srcdir@/gfm_mex.c \ # @srcdir@/gfm_common.c -I@srcdir@ \ # @srcdir@/../gfi_array.c ../.libs/libgetfemint.a $(GETFEM_STATIC_LIB) @STDCPP_STATICLIBS@ - -#/c/MinGW/lib/libstdc++.a -# cmd /c "$mexbat -v -f c:/gnumex/mexopts.bat gfm_mex.c -output gfm_rpc_mexint gfi*.o gf_*.o matlabint*.o c:\\msys\\1.0\\home\\j\\getfem++-1.5\\src\\.libs\\libgetfem.a getfem_matlab.o c:\\mingw\\lib\\libstdc++.a -Ic:\\msys\\1.0\\home\\j\\mingw_liboncrpc-4.0" else !USE_MINGW_MEX if BUILDMEXRPC gf_matlab@MATLAB_COM_EXT@: ../gfi_rpc_clnt.c gfm_rpc_mexint.c gfm_common.c ../gfi_rpc_xdr.c ../gfi_array.c @@ -67,10 +64,6 @@ gf_matlab@MATLAB_COM_EXT@: ../gfi_rpc_clnt.c gfm_rpc_mexint.c gfm_common.c ../gf @srcdir@/gfm_rpc_mexint.c @srcdir@/gfm_common.c @srcdir@/../gfi_rpc_clnt.c \ @srcdir@/../gfi_rpc_xdr.c @srcdir@/../gfi_array.c || (rm $@; false) else !BUILDMEXRPC -# 2006/02/06 I remove the @STDCPP_STATICLIBS@ at the end (added to -# avoid crashes in exception throw code when parts of getfem where -# compiled with ifc (i.e. mumps)) of the command line, as it -# break the linking with g++-3.3 and matlab R14/R13 on debian (at least) .. gf_matlab@MATLAB_COM_EXT@: gfm_mex.c gfm_common.c ../libgetfemint.la ../gfi_array.c $(GETFEM_LIB_LA) $(MEX) -largeArrayDims -output gf_matlab -g CDEBUGFLAGS="$(CFLAGS)" LD="$(CXX)" \ -I@srcdir@ -I@srcdir@/.. -DMATLAB_RELEASE=@MATLAB_RELEASE@ \ diff --git a/interface/src/matlab/gfm_mex.c b/interface/src/matlab/gfm_mex.c index 979b0c7c..eb035437 100644 --- a/interface/src/matlab/gfm_mex.c +++ b/interface/src/matlab/gfm_mex.c @@ -27,8 +27,8 @@ #include "gfm_common.h" #include "getfem_interface.h" -void set_superlu_callback(int (*cb)()); -int handle_getfem_callback(); +// void set_superlu_callback(int (*cb)()); +// int handle_getfem_callback(); /* main file for the giant gf_matlab mex-file */ /* @@ -88,7 +88,7 @@ void sigint_callback(int sig) { "If you want to abort immediatly the current operation, hit CTRL-C again\n" \ "In that case, you will have to restart getfem_matlab, using 'clear functions' for example:\n", s); set_cancel_flag(1); - assert(handle_getfem_callback() == 1); + // assert(handle_getfem_callback() == 1); } void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { @@ -96,7 +96,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *p
[Getfem-commits] [getfem-commits] branch master updated: minor correction
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 07aac8aa minor correction 07aac8aa is described below commit 07aac8aa95906bbb97afce409a7f580957bf5ba3 Author: Yves Renard AuthorDate: Sat Dec 30 18:53:15 2023 +0100 minor correction --- .gitignore | 4 configure.ac | 1 + 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 4c1d7847..b846dee4 100644 --- a/.gitignore +++ b/.gitignore @@ -38,8 +38,12 @@ Makefile /_configs.sed /config.h /config.status +/config_autogenerated_not_used.h +/config_autogenerated_not_used.h.in /cubature/getfem_im_list.h /src/getfem/getfem_im_list.h +/src/getfem/stamp-h2 +/src/gmm/stamp-h3 /getfem-config /getfem-config-notinstalled /gmm-config diff --git a/configure.ac b/configure.ac index 8538453a..6f7d6c82 100644 --- a/configure.ac +++ b/configure.ac @@ -901,6 +901,7 @@ CPPFLAGS="$CPPFLAGS $MUMPSINC" save_LIBS="$LIBS"; if test "x$require_mumps" = "xno"; then found_mumps="no" + MUMPS_LIBS="" echo "Building with MUMPS explicitly disabled"; else AC_SEARCH_LIBS(smumps_c, [`echo $MUMPS_LIBS | sed -e 's/^-l//g;s/ -l/ /g'`],
[Getfem-commits] [getfem-commits] branch master updated: simplification of comparison operator for the tab_ref_reg_spaced_iterator
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new e850f907 simplification of comparison operator for the tab_ref_reg_spaced_iterator e850f907 is described below commit e850f90789c097af4336eea42a72e0eb89f221b9 Author: Renard Yves AuthorDate: Wed Dec 20 13:38:35 2023 +0100 simplification of comparison operator for the tab_ref_reg_spaced_iterator --- src/gmm/gmm_ref.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gmm/gmm_ref.h b/src/gmm/gmm_ref.h index 7c629542..43b1581c 100644 --- a/src/gmm/gmm_ref.h +++ b/src/gmm/gmm_ref.h @@ -270,14 +270,15 @@ namespace gmm { { return *(piter + *(iter_index+ii)); } bool operator ==(const iterator ) const - { return ((piter) == ((i.piter)) && iter_index == i.iter_index); } + // { return (piter == i.piter && iter_index == i.iter_index); } + { return (iter_index == i.iter_index); } bool operator !=(const iterator ) const { return !(i == *this); } bool operator < (const iterator ) const - { return ((piter) == ((i.piter)) && iter_index < i.iter_index); } + { return (iter_index < i.iter_index); } bool operator > (const iterator ) const - { return ((piter) == ((i.piter)) && iter_index > i.iter_index); } + { return (iter_index > i.iter_index); } bool operator >=(const iterator ) const - { return ((piter) == ((i.piter)) && iter_index >= i.iter_index); } + { return (iter_index >= i.iter_index); } tab_ref_index_ref_iterator_(void) {} tab_ref_index_ref_iterator_(const ITER ,
[Getfem-commits] (no subject)
branch: master commit fb3a2e86e4b3d663fc1a25aaf52784a45d6dd209 Author: Matthias Bussonnier AuthorDate: Wed Dec 13 16:26:43 2023 +0100 Typo and UTF-8 It look like there is a typo in the conditional include, I guessing you want to include only if not defined, but there is not the same number of underscore in define. Also one of the files are in ISO-8859 (latin1) I guess, which make clang show warnings for `é` and a few other character, do not change content but change to utf8, it seems to fix the warning. This has the side effect of making the diff show the correct characters instead of mojibake. --- src/getfem/getfem_fourth_order.h | 2 +- src/getfem/getfem_im_list.h | 2 +- tests/plate.cc | 22 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/getfem/getfem_fourth_order.h b/src/getfem/getfem_fourth_order.h index 1c06e324..1d3d81a7 100644 --- a/src/getfem/getfem_fourth_order.h +++ b/src/getfem/getfem_fourth_order.h @@ -35,7 +35,7 @@ @date January 6, 2006. @brief assembly procedures and bricks for fourth order pdes. */ -#ifndef GETFEM_FOURTH_ORDER_H_ +#ifndef GETFEM_FOURTH_ORDER_H__ #define GETFEM_FOURTH_ORDER_H__ #include "getfem_models.h" diff --git a/src/getfem/getfem_im_list.h b/src/getfem/getfem_im_list.h index a86ee4f5..0b145355 100644 --- a/src/getfem/getfem_im_list.h +++ b/src/getfem/getfem_im_list.h @@ -2,7 +2,7 @@ /*=== - Copyright (C) 2002-2022 Yves Renard + Copyright (C) 2002-2023 Yves Renard This file is a part of GetFEM++ diff --git a/tests/plate.cc b/tests/plate.cc index 6273a3cd..455b59aa 100644 --- a/tests/plate.cc +++ b/tests/plate.cc @@ -1,6 +1,6 @@ /*=== - Copyright (C) 2002-2020 Yves Renard, Michel Sala�n. + Copyright (C) 2002-2020 Yves Renard, Michel Salaün. This file is a part of GetFEM @@ -65,8 +65,8 @@ struct plate_problem { getfem::mesh_fem mf_theta; getfem::mesh_fem mf_rhs; /* mesh_fem for the right hand side (f(x),..) */ getfem::mesh_fem mf_coef; /* mesh_fem used to represent pde coefficients */ - scalar_type lambda, mu;/* Lam� coefficients. */ - scalar_type E, nu;/* Lam� coefficients. */ + scalar_type lambda, mu;/* Lamé coefficients. */ + scalar_type E, nu;/* Lamé coefficients. */ scalar_type epsilon; /* thickness of the plate. */ scalar_type pressure; scalar_type residual; /* max residual for the iterative solvers */ @@ -75,7 +75,7 @@ struct plate_problem { int sol_ref; // sol_ref = 0 : simple support on the vertical edges // sol_ref = 1 : homogeneous on the vertical edges // sol_ref = 2 : homogeneous on the 4 vertical - // edges with solution u3 = sin�(x)*sin�(y) + // edges with solution u3 = sin²(x)*sin²(y) scalar_type eta; // useful only if sol_ref == 2 : // eta = 0 => Kirchhoff-Love // eta = small => Mindlin @@ -153,8 +153,8 @@ void plate_problem::init(void) { LX = PARAM.real_value("LX"); LY = PARAM.real_value("LY"); - mu = PARAM.real_value("MU", "Lam� coefficient mu"); - lambda = PARAM.real_value("LAMBDA", "Lam� coefficient lambda"); + mu = PARAM.real_value("MU", "Lamé coefficient mu"); + lambda = PARAM.real_value("LAMBDA", "Lamé coefficient lambda"); epsilon = PARAM.real_value("EPSILON", "thickness of the plate"); pressure = PARAM.real_value("PRESSURE", "pressure on the top surface of the plate."); @@ -171,7 +171,7 @@ void plate_problem::init(void) { cout << "bord en appuis simple\n" ; cout << "nombre de terme pour calcul sol exacte : " << N_Four << " \n" ; // Calcul des coeeficients de Fourier de la solution exacte : - // Cas o� le chargement est seulement vertical (pas de moment appliqu�) + // Cas où le chargement est seulement vertical (pas de moment appliqué) gmm::resize( theta1_Four, N_Four, N_Four) ; gmm::resize( theta2_Four, N_Four, N_Four) ; gmm::resize( u3_Four, N_Four, N_Four) ; @@ -196,7 +196,7 @@ void plate_problem::init(void) { Jmn(2, 2) = A * A + B * B ; gmm::scale(Jmn, - E*(epsilon/2.) / (1. + nu) ) ; - // calcul du d�veloppement de Fourrier du chargement : + // calcul du développement de Fourrier du chargement :
[Getfem-commits] (no subject)
branch: master commit b41cdfe53655685161a87e563d664da3a77a7c02 Author: Matthias Bussonnier AuthorDate: Wed Dec 13 14:53:25 2023 +0100 Unconditionally inclide -lstdc++. Compiling with clang does not do that by default on macos, leading to linking failure in `make check`. --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 2bfe16bf..4c30278e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -122,7 +122,7 @@ test_continuation_SOURCES = test_continuation.cc test_gmm_matrix_functions_SOURCES = test_gmm_matrix_functions.cc AM_CPPFLAGS = -I$(top_srcdir)/src -I../src -LDADD= ../src/libgetfem.la -lm @SUPLDFLAGS@ +LDADD= ../src/libgetfem.la -lm @SUPLDFLAGS@ -lstdc++ TESTS = \ dynamic_array.pl \
[Getfem-commits] [getfem-commits] master updated (3c37cc1a -> fb3a2e86)
renard pushed a change to branch master. from 3c37cc1a minor modification for clang compatibility new 5582edc1 Explicitly opt-out of clang, got gcc specific instructions. new b41cdfe5 Unconditionally inclide -lstdc++. new fb3a2e86 Typo and UTF-8 Summary of changes: src/getfem/getfem_fourth_order.h | 2 +- src/getfem/getfem_im_list.h | 2 +- src/gmm/gmm_except.h | 2 +- tests/Makefile.am| 2 +- tests/plate.cc | 22 +++--- 5 files changed, 15 insertions(+), 15 deletions(-)
[Getfem-commits] (no subject)
branch: master commit 5582edc12a753ee7d80cadac5767462b07ce9d75 Author: Matthias Bussonnier AuthorDate: Wed Dec 13 14:51:22 2023 +0100 Explicitly opt-out of clang, got gcc specific instructions. Clangs sometime pretends to be GCC or to support GNU C extensions but does not. Thus skip GCC code when we are clang. --- src/gmm/gmm_except.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gmm/gmm_except.h b/src/gmm/gmm_except.h index 442de139..271d261f 100644 --- a/src/gmm/gmm_except.h +++ b/src/gmm/gmm_except.h @@ -394,7 +394,7 @@ inline void GMM_THROW() {} // exit(1); // } -#if defined(__GNUC__) && (__GNUC__ > 3) +#if defined(__GNUC__) && (__GNUC__ > 3) && !defined(__clang__) # define GMM_SET_EXCEPTION_DEBUG\ std::set_terminate(__gnu_cxx::__verbose_terminate_handler); #else
[Getfem-commits] [getfem-commits] branch master updated: minor modification for clang compatibility
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 3c37cc1a minor modification for clang compatibility 3c37cc1a is described below commit 3c37cc1a5019b7dce6d2f5eb6c0bc4e60a8d1ca3 Author: Renard Yves AuthorDate: Wed Dec 13 13:49:15 2023 +0100 minor modification for clang compatibility --- contrib/bimaterial_crack_test/crack.cc | 16 ++-- contrib/crack_plate/crack_bilaplacian_moment.cc| 14 +-- contrib/delaminated_crack/delaminated_crack.cc | 2 +- contrib/icare/icare.cc | 26 +++--- contrib/opt_assembly/opt_assembly.cc | 4 +- .../xfem_stab_unilat_contact.cc| 16 ++-- interface/src/gf_slice_get.cc | 2 +- src/getfem/dal_basic.h | 6 ++ src/getfem/dal_bit_vector.h| 8 ++ src/getfem/dal_tas.h | 8 +- src/getfem/getfem_generic_assembly.h | 4 +- src/getfem/getfem_mesh_fem.h | 6 +- src/getfem_contact_and_friction_large_sliding.cc | 12 +-- src/getfem_fem.cc | 4 +- src/getfem_mesh_level_set.cc | 4 +- src/getfem_mesher.cc | 2 +- src/gmm/gmm_conjugated.h | 10 ++- src/gmm/gmm_interface.h| 8 +- src/gmm/gmm_real_part.h| 4 + src/gmm/gmm_ref.h | 18 src/gmm/gmm_scaled.h | 14 ++- src/gmm/gmm_std.h | 6 +- src/gmm/gmm_sub_matrix.h | 8 +- src/gmm/gmm_sub_vector.h | 4 +- src/gmm/gmm_vector.h | 8 ++ src/gmm/gmm_vector_to_matrix.h | 8 +- tests/crack.cc | 16 ++-- tests/heat_equation.cc | 2 +- tests/integration.cc | 100 ++--- tests/nonlinear_elastostatic.cc| 2 +- tests/poly.cc | 6 +- tests/schwarz_additive.cc | 2 +- tests/test_assembly.cc | 4 +- tests/test_continuation.cc | 10 +-- tests/test_interpolated_fem.cc | 32 +++ tests/test_mat_elem.cc | 64 ++--- tests/wave_equation.cc | 2 +- 37 files changed, 274 insertions(+), 188 deletions(-) diff --git a/contrib/bimaterial_crack_test/crack.cc b/contrib/bimaterial_crack_test/crack.cc index 3dfa8903..01964c1c 100644 --- a/contrib/bimaterial_crack_test/crack.cc +++ b/contrib/bimaterial_crack_test/crack.cc @@ -148,31 +148,31 @@ struct crack_problem { std::string name_of_dof(getfem::pdof_description dof) { char s[200]; - sprintf(s, "UnknownDof[%p]", (void*)dof); + snprintf(s, 199, "UnknownDof[%p]", (void*)dof); for (dim_type d = 0; d < 4; ++d) { if (dof == getfem::lagrange_dof(d)) { - sprintf(s, "Lagrange[%d]", d); goto found; + snprintf(s, 199, "Lagrange[%d]", d); goto found; } if (dof == getfem::normal_derivative_dof(d)) { - sprintf(s, "D_n[%d]", d); goto found; + snprintf(s, 199, "D_n[%d]", d); goto found; } if (dof == getfem::global_dof(d)) { - sprintf(s, "GlobalDof[%d]", d); + snprintf(s, 199, "GlobalDof[%d]", d); } if (dof == getfem::mean_value_dof(d)) { - sprintf(s, "MeanValue[%d]", d); + snprintf(s, 199, "MeanValue[%d]", d); } if (getfem::dof_xfem_index(dof) != 0) { - sprintf(s, "Xfem[idx:%d]", int(dof_xfem_index(dof))); + snprintf(s, 199, "Xfem[idx:%d]", int(dof_xfem_index(dof))); } for (dim_type r = 0; r < d; ++r) { if (dof == getfem::derivative_dof(d, r)) { -sprintf(s, "D_%c[%d]", "xyzuvw"[r], d); goto found; +snprintf(s, 199, "D_%c[%d]", "xyzuvw"[r], d); goto found; } for (dim_type t = 0; t < d; ++t) { if (dof == getfem::second_derivative_dof(d, r, t)) { - sprintf(s, "D2%c%c[%d]", "xyzuvw"[r], "xyzuvw"[t], d); + snprintf(s, 199, "D2%c%c[%d]", "xyzuvw"[r], "xyzuvw"[t], d); goto found; } } diff --git a/contrib/crack_plate/crack_bilaplacian_moment.cc b/contrib/crack_plate/crack_bilaplacian_moment.cc index b542ad3e..405a04e2 100644 --- a/contrib/crack_plate/crack_bilaplacian_moment.cc +++ b/contrib/crack_plate/crack_bilaplacian_moment.cc @@ -79,9 +79,9 @@ size_type is_dx_dof_type(getfem::pdof_description dof){ size_type dx_dof = 0 ; for (unsigned r = 0; r < 2; ++r) { if (dof ==
[Getfem-commits] [getfem-commits] branch master updated: Adding RT and BDM elements on simplicies for any degree and dimension
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 0a9ed217 Adding RT and BDM elements on simplicies for any degree and dimension 0a9ed217 is described below commit 0a9ed2175e3357399980d347d39efc187a0ba1d9 Author: Yves Renard AuthorDate: Wed Oct 25 15:57:15 2023 +0200 Adding RT and BDM elements on simplicies for any degree and dimension --- doc/sphinx/source/userdoc/appendixA.rst | 43 ++- src/getfem_fem.cc | 487 2 files changed, 462 insertions(+), 68 deletions(-) diff --git a/doc/sphinx/source/userdoc/appendixA.rst b/doc/sphinx/source/userdoc/appendixA.rst index 4309a74d..059fd2a4 100644 --- a/doc/sphinx/source/userdoc/appendixA.rst +++ b/doc/sphinx/source/userdoc/appendixA.rst @@ -644,21 +644,23 @@ It is important to use a corresponding composite integration method. Classical vector elements - +- -Raviart-Thomas of lowest order elements -+++ +Raviart-Thomas elements .. _ud-fig-triangle_comptrois: .. figure:: images/getfemlistRT0.png :align: center :scale: 60 - RT0 elements in dimension two and three. (P+1 dof, H(div)) + Example of RT0 elements in dimension two and three. The RTk element on a simplex of dimension :math:`P` and degree :math:`K` has :math:`\dfrac{(K+P-1)!}{K!(P-1)!}` normal component degrees of freedom on each face and :math:`\dfrac{K(K+P-1)!}{K!(P-1)!}` internal Lagrange degrees of freedom. For the quadrilateral, only the lowest degree element is implemented yet. + + :math:`.\\` - .. list-table:: Raviart-Thomas of lowest order element on simplices ``"FEM_RT0(P)"`` + .. list-table:: Raviart-Thomas element on simplices on dimension :math:`P \ge 1` and degree :math:`K \ge 0`: ``"FEM_RTK(P,K)"`` :widths: 10 10 10 10 10 10 10 :header-rows: 1 @@ -670,9 +672,9 @@ Raviart-Thomas of lowest order elements - :math:`\tau`-equivalent - Polynomial - * - :math:`1` + * - :math:`K` - :math:`P` - - :math:`P+1` + - :math:`\dfrac{(K+P+1)(K+P-1)!}{K!(P-1)!}` - H(div) - Yes :math:`(Q = P)` - No @@ -700,7 +702,34 @@ Raviart-Thomas of lowest order elements - No - Yes +Brezzi-Douglas-Marini element on simplices +++ + +BDM elements on simplices of dimension :math:`P \ge 1` and degree :math:`K \ge 1` has :math:`\dfrac{(K+P-1)!}{K!(P-1)!}` normal component degrees of freedom on each face and :math:`\dfrac{(K-1)(K+P-1)!}{K!(P-1)!}` internal degrees of freedom. Not yet implemented for quadrilateral. + +:math:`.\\` + + .. list-table:: Brezzi-Douglas-Marini element on simplices on dimension :math:`P` and degree :math:`K`: ``"FEM_BDMK(P,K)"`` + :widths: 10 10 10 10 10 10 10 + :header-rows: 1 + + * - degree + - dimension + - d.o.f. number + - class + - vector + - :math:`\tau`-equivalent + - Polynomial + + * - :math:`K` + - :math:`P` + - :math:`\dfrac{(K+P)!}{K!(P-1)!}` + - H(div) + - Yes :math:`(Q = P)` + - No + - Yes + Nedelec (or Whitney) edge elements ++ diff --git a/src/getfem_fem.cc b/src/getfem_fem.cc index 20fd56e2..8ce7803a 100644 --- a/src/getfem_fem.cc +++ b/src/getfem_fem.cc @@ -1,6 +1,6 @@ /*=== - Copyright (C) 1999-2020 Yves Renard + Copyright (C) 1999-2023 Yves Renard This file is a part of GetFEM @@ -22,7 +22,7 @@ /** @file getfem_fem.cc @author Yves Renard @date December 21, 1999. -@brief implementation of some finite elements. +@brief implementation of various finite elements. */ #include "getfem/bgeot_torus.h" @@ -34,6 +34,7 @@ #include "getfem/getfem_integration.h" #include "getfem/getfem_omp.h" #include "getfem/getfem_torus.h" +#include "getfem/getfem_assembling.h" namespace getfem { @@ -785,7 +786,7 @@ namespace getfem { /* */ - /*Tensorial product of fem (for polynomial fem). */ + /*Tensorial product of fem (for polynomial fem).*/ /* */ struct tproduct_femi : public fem { @@ -1778,14 +1779,14 @@ namespace getfem { - + /* */ - /*Element RT0 on the sim
[Getfem-commits] [getfem-commits] branch master updated: minor change
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 38430cf3 minor change 38430cf3 is described below commit 38430cf32102380b9d5a975cea8916b79d12cb54 Author: Yves Renard AuthorDate: Mon Oct 23 14:16:30 2023 +0200 minor change --- interface/tests/matlab-octave/check_all_matlab.sh | 2 +- interface/tests/matlab-octave/check_all_octave.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/tests/matlab-octave/check_all_matlab.sh b/interface/tests/matlab-octave/check_all_matlab.sh index e324b9cc..dc1aba7f 100755 --- a/interface/tests/matlab-octave/check_all_matlab.sh +++ b/interface/tests/matlab-octave/check_all_matlab.sh @@ -22,7 +22,7 @@ echo "running checks..." echo " srcdir='$srcdir'" -export MATLABPATH=$(pwd)/../../src/matlab:$(pwd)/../../tests/matlab:${srcdir}:${srcdir}/../../src/matlab +export MATLABPATH=$(pwd)/../../src/matlab:$(pwd)/../../tests/matlab-octave:${srcdir}:${srcdir}/../../src/matlab echo " export MATLAB_ROOT=$MATLAB_ROOT" echo " export MATLABPATH=$MATLABPATH" diff --git a/interface/tests/matlab-octave/check_all_octave.sh b/interface/tests/matlab-octave/check_all_octave.sh index 36282a56..b06c84dc 100755 --- a/interface/tests/matlab-octave/check_all_octave.sh +++ b/interface/tests/matlab-octave/check_all_octave.sh @@ -22,7 +22,7 @@ echo "running checks..." echo " srcdir='$srcdir'" -#export MATLABPATH=$(pwd)/../../src/matlab:$(pwd)/../../tests/matlab:${srcdir}:${srcdir}/../../src/matlab +#export MATLABPATH=$(pwd)/../../src/matlab:$(pwd)/../../tests/matlab-octave:${srcdir}:${srcdir}/../../src/matlab #echo " export MATLAB_ROOT=$MATLAB_ROOT" #echo " export MATLABPATH=$MATLABPATH"
Re: [Getfem-commits] License information for GMM 3.1
Dear Emilie KULLMANN, GMM is distributed under the same Licence as Getfem : GNU Lesser General Public License and GCC Runtime Library Exception. I think, this is clearly indicated in the source files. Best regards, Yves Renard De: "KULLMANN Emilie" À: "Yves Renard" , getfem-ch...@nongnu.org, getfem-commits@nongnu.org Envoyé: Mardi 17 Octobre 2023 16:59:17 Objet: License information for GMM 3.1 Hello everyone, I’m reaching out as I found your contact information for the open source project getfem. I’m wondering under which license the asset GMM 3.1 is made available : - [ https://getfem.org/gmm/intro.html | https://getfem.org/gmm/intro.html ] Could you please let us know whether it is made available under GNU Lesser General Public License or GNU Lesser General Public License and GCC Runtime Library Exception ? Thank you so much, Cordialement / Best Regards, Emilie KULLMANN IP Process & Operations Office: +33 1 6162 3575 [ mailto:emilie.kullm...@3ds.com | emilie.kullm...@3ds.com ] [ http://www.3ds.com/ | 3DS.COM ] Dassault Systèmes SE | 10, Rue Marcel Dassault, Paris Campus | 78140 Vélizy-Villacoublay | France This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systèmes does not accept or assume any liability or responsibility for any use of or reliance on this email. Please be informed that your personal data are processed according to our data privacy policy as described on our website. Should you have any questions related to personal data protection, please contact 3DS Data Protection Officer [ https://www.3ds.com/privacy-policy/contact/ | https://www.3ds.com/privacy-policy/contact/ ]
[Getfem-commits] [getfem-commits] branch master updated: add of two scalar functions to GWFL : sqr_pos_part and sqr_neg_part
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new b91ee1de add of two scalar functions to GWFL : sqr_pos_part and sqr_neg_part b91ee1de is described below commit b91ee1def946a4295ea9ac2431c0ce35165c66c3 Author: Renard Yves AuthorDate: Wed Oct 11 12:51:12 2023 +0200 add of two scalar functions to GWFL : sqr_pos_part and sqr_neg_part --- doc/sphinx/source/userdoc/gasm_high.rst| 5 - src/getfem_generic_assembly_functions_and_operators.cc | 8 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/sphinx/source/userdoc/gasm_high.rst b/doc/sphinx/source/userdoc/gasm_high.rst index e556fa01..b4750e09 100644 --- a/doc/sphinx/source/userdoc/gasm_high.rst +++ b/doc/sphinx/source/userdoc/gasm_high.rst @@ -417,9 +417,12 @@ A certain number of predefined scalar functions can be used. The exhaustive list - ``Heaviside(t)`` (:math:`0 \mbox{ for } t < 0, 1 \mbox{ for } t \ge 0`) - ``sign(t)`` - ``abs(t)`` - - ``pos_part(t)`` (:math:`tH(t)`) - ``reg_pos_part(t, eps)`` (:math:`(t-eps/2-t^2/(2eps))H(t-eps) + t^2H(t)/(2eps)`) + - ``max(t, u)``, ``min(t, u)`` + - ``pos_part(t)`` (:math:`tH(t)`) + - ``sqr_pos_part(t)`` (:math:`(tH(t))^2`) - ``neg_part(t)`` (:math:`-tH(-t)`), ``max(t, u)``, ``min(t, u)`` + - ``sqr_neg_part(t)`` (:math:`(tH(-t))^2`) A scalar function can be applied to a scalar expression, but also to a tensor one. If is is applied to a tensor expression, is is applied componentwise and the result is a tensor with the same dimensions. For functions having two arguments (pow(t,u), min(t,u) ...) if two non-scalar arguments are passed, the dimension have to be the same. For instance "max([1;2],[0;3])" will return "[0;3]". diff --git a/src/getfem_generic_assembly_functions_and_operators.cc b/src/getfem_generic_assembly_functions_and_operators.cc index 1c889acf..0b877fed 100644 --- a/src/getfem_generic_assembly_functions_and_operators.cc +++ b/src/getfem_generic_assembly_functions_and_operators.cc @@ -77,6 +77,8 @@ namespace getfem { static scalar_type ga_Heaviside(scalar_type t) { return (t >= 0.) ? 1.: 0.; } static scalar_type ga_pos_part(scalar_type t) { return (t >= 0.) ? t : 0.; } + static scalar_type ga_sqr_pos_part(scalar_type t) + { return (t >= 0.) ? t*t : 0.; } static scalar_type ga_reg_pos_part(scalar_type t, scalar_type eps) { return (t >= eps) ? t-eps/2. : ((t <= 0) ? 0. : t*t/(2.*eps)); } static scalar_type ga_der_reg_pos_part(scalar_type t, scalar_type eps) @@ -88,6 +90,8 @@ namespace getfem { static scalar_type ga_half_sqr_pos_part(scalar_type t) { return (t >= 0.) ? 0.5*t*t : 0.; } static scalar_type ga_neg_part(scalar_type t) { return (t >= 0.) ? 0. : -t; } + static scalar_type ga_sqr_neg_part(scalar_type t) + { return (t >= 0.) ? 0. : t*t; } static scalar_type ga_half_sqr_neg_part(scalar_type t) { return (t >= 0.) ? 0. : 0.5*t*t; } static scalar_type ga_sinc(scalar_type t) {// cardinal sine function sin(t)/t @@ -507,10 +511,14 @@ namespace getfem { PREDEF_FUNCTIONS["abs"] = ga_predef_function(ga_abs, 1, "sign"); PREDEF_FUNCTIONS["pos_part"] = ga_predef_function(ga_pos_part, 1, "Heaviside"); +PREDEF_FUNCTIONS["sqr_pos_part"] + = ga_predef_function(ga_sqr_pos_part, 2, "2*pos_part(t)"); PREDEF_FUNCTIONS["half_sqr_pos_part"] = ga_predef_function(ga_half_sqr_pos_part, 1, "pos_part"); PREDEF_FUNCTIONS["neg_part"] = ga_predef_function(ga_neg_part, 1, "DER_PDFUNC_NEG_PART"); +PREDEF_FUNCTIONS["sqr_neg_part"] + = ga_predef_function(ga_sqr_neg_part, 2, "-2*neg_part(t)"); PREDEF_FUNCTIONS["half_sqr_neg_part"] = ga_predef_function(ga_half_sqr_neg_part, 2, "-neg_part(t)"); PREDEF_FUNCTIONS["reg_pos_part"]
[Getfem-commits] [getfem-commits] branch devel-tkoyama-fix-python-error deleted (was d5201a21)
renard pushed a change to branch devel-tkoyama-fix-python-error. was d5201a21 Fix Python error in new third package version The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[Getfem-commits] [getfem-commits] master updated (e41de9db -> d5201a21)
renard pushed a change to branch master. from e41de9db Fix non-UTF8 file encodings add d5201a21 Fix Python error in new third package version No new revisions were added by this update. Summary of changes: interface/src/gf_mesh_fem_get.cc | 2 +- interface/tests/python/check_export_vtu.py | 16 2 files changed, 9 insertions(+), 9 deletions(-)
[Getfem-commits] [getfem-commits] branch master updated: fix for RT0 element
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new bbc75c88 fix for RT0 element bbc75c88 is described below commit bbc75c886d2ac5b2280841aecf293cf48069079d Author: Renard Yves AuthorDate: Sat Feb 11 18:19:27 2023 +0100 fix for RT0 element --- src/getfem_fem.cc | 19 ++- src/getfem_mat_elem.cc | 4 ++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/getfem_fem.cc b/src/getfem_fem.cc index a37191b1..20fd56e2 100644 --- a/src/getfem_fem.cc +++ b/src/getfem_fem.cc @@ -1816,8 +1816,8 @@ namespace getfem { bgeot::base_small_vector n(nc); gmm::mult(gmm::transposed(K), cvr->normals()[i], n); - M(i,i) = scalar_type(1)/gmm::vect_norm2(n); - n *= M(i,i); + M(i,i) = gmm::vect_norm2(n); + n /= M(i,i); scalar_type ps = gmm::vect_sp(n, norient); if (ps < 0) M(i, i) *= scalar_type(-1); if (gmm::abs(ps) < 1E-8) @@ -1825,6 +1825,15 @@ namespace getfem { } } + // The dof of this RT0 are not the integral on the edges or faces of the + // normal component but the normal component on the midpoint of each edge/face + // The reason : easier to deal in case of nonlinear transformation (otherwise + // an integral with several Gauss points would be necessary to compute on + // edges / faces) + // Shape fonctions on the reference element for nc = 2 + // sqrt(2)(x, y) ; (x-1, y) ; (x, y-1) + // The shape functions on the real element are K \phi ||K^{-T}n_i||, where + // K is the gradient of the transformation. P1_RT0_::P1_RT0_(dim_type nc_) { nc = nc_; pgt_stored = 0; @@ -1848,7 +1857,7 @@ namespace getfem { for (size_type i = 0; i <= nc; ++i) { base_[i+j*(nc+1)] = base_poly(nc, 1, short_type(j)); if (i-1 == j) base_[i+j*(nc+1)] -= bgeot::one_poly(nc); -if (i == 0) base_[i+j*(nc+1)] /= sqrt(opt_long_scalar_type(nc)); +if (i == 0) base_[i+j*(nc+1)] *= sqrt(opt_long_scalar_type(nc)); } base_node pt(nc); @@ -1913,8 +1922,8 @@ namespace getfem { bgeot::base_small_vector n(nc); gmm::mult(gmm::transposed(K), cvr->normals()[i], n); - M(i,i) = scalar_type(1)/gmm::vect_norm2(n); - n *= M(i,i); + M(i,i) = gmm::vect_norm2(n); + n /= M(i,i); scalar_type ps = gmm::vect_sp(n, norient); if (ps < 0) M(i, i) *= scalar_type(-1); if (gmm::abs(ps) < 1E-8) diff --git a/src/getfem_mat_elem.cc b/src/getfem_mat_elem.cc index dbe49601..68236326 100644 --- a/src/getfem_mat_elem.cc +++ b/src/getfem_mat_elem.cc @@ -151,7 +151,7 @@ namespace getfem { case virtual_fem::VECTORIAL_PRIMAL_TYPE: K_reduction.push_back(k); break; case virtual_fem::VECTORIAL_DUAL_TYPE: -grad_reduction.push_back(k); break; +grad_reduction.push_back(k); break; // reduction with B default: break; } } @@ -167,7 +167,7 @@ namespace getfem { case virtual_fem::VECTORIAL_PRIMAL_TYPE: K_reduction.push_back(k); break; case virtual_fem::VECTORIAL_DUAL_TYPE: - grad_reduction.push_back(k); break; + grad_reduction.push_back(k); break; // reduction with B default: break; } if ((*it).pfi->target_dim() > 1) ++k;
[Getfem-commits] [getfem-commits] branch master updated: Correction for RT0 element
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 789efd32 Correction for RT0 element new b8db396a Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/getfem 789efd32 is described below commit 789efd327f7dfcc3b048e244466d8d41e1590a3b Author: Renard Yves AuthorDate: Fri Feb 10 15:53:24 2023 +0100 Correction for RT0 element --- src/getfem_fem.cc | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/getfem_fem.cc b/src/getfem_fem.cc index 041d7d48..a37191b1 100644 --- a/src/getfem_fem.cc +++ b/src/getfem_fem.cc @@ -1816,8 +1816,8 @@ namespace getfem { bgeot::base_small_vector n(nc); gmm::mult(gmm::transposed(K), cvr->normals()[i], n); - M(i,i) = gmm::vect_norm2(n); - n /= M(i,i); + M(i,i) = scalar_type(1)/gmm::vect_norm2(n); + n *= M(i,i); scalar_type ps = gmm::vect_sp(n, norient); if (ps < 0) M(i, i) *= scalar_type(-1); if (gmm::abs(ps) < 1E-8) @@ -1848,7 +1848,7 @@ namespace getfem { for (size_type i = 0; i <= nc; ++i) { base_[i+j*(nc+1)] = base_poly(nc, 1, short_type(j)); if (i-1 == j) base_[i+j*(nc+1)] -= bgeot::one_poly(nc); -if (i == 0) base_[i+j*(nc+1)] *= sqrt(opt_long_scalar_type(nc)); +if (i == 0) base_[i+j*(nc+1)] /= sqrt(opt_long_scalar_type(nc)); } base_node pt(nc); @@ -1913,8 +1913,8 @@ namespace getfem { bgeot::base_small_vector n(nc); gmm::mult(gmm::transposed(K), cvr->normals()[i], n); - M(i,i) = gmm::vect_norm2(n); - n /= M(i,i); + M(i,i) = scalar_type(1)/gmm::vect_norm2(n); + n *= M(i,i); scalar_type ps = gmm::vect_sp(n, norient); if (ps < 0) M(i, i) *= scalar_type(-1); if (gmm::abs(ps) < 1E-8)
[Getfem-commits] [getfem-commits] branch master updated: minor fixes
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new c42e6d2e minor fixes c42e6d2e is described below commit c42e6d2e28fe9d4d9bfaac18b1d0f724dc911d08 Author: Renard Yves AuthorDate: Fri Jul 8 14:27:34 2022 +0200 minor fixes --- doc/sphinx/Makefile.am | 2 +- doc/sphinx/source/.templates/download.html | 4 ++-- doc/sphinx/source/whatsnew/5.4.2.rst | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am index e1d39925..17c83274 100644 --- a/doc/sphinx/Makefile.am +++ b/doc/sphinx/Makefile.am @@ -161,7 +161,7 @@ upload: -rm -fr homepage *.tar.gz -mv build/html homepage -(export srcdir=$(srcdir) && $(top_srcdir)/bin/upload_html --delete homepage) - -test ! -d "getfem_site" && git clone "git\@plmlab.math.cnrs.fr:renard/getfem_site.git" + -test ! -d "getfem_site" && git clone "g...@plmlab.math.cnrs.fr:renard/getfem_site.git" -(cd homepage && rsync --delete -rlptDv . ../getfem_site/public) -(cd getfem_site && git add . && git commit -m "update" && git push origin master) -rm -fr getfem-$(DISTVERSION)-docs-html diff --git a/doc/sphinx/source/.templates/download.html b/doc/sphinx/source/.templates/download.html index 24f6fd1b..21aeb695 100644 --- a/doc/sphinx/source/.templates/download.html +++ b/doc/sphinx/source/.templates/download.html @@ -20,11 +20,11 @@ Public License, either version 3 of the license or any later version along with {%trans%}Format{%endtrans%}{%trans%}Packed as .tar.gz{%endtrans%} {%trans%}{{ project }} stable {%endtrans%} -http://download-mirror.savannah.gnu.org/releases/getfem/stable/getfem-5.4.1.tar.gz;>getfem-5.4.2.tar.gz +http://download-mirror.savannah.gnu.org/releases/getfem/stable/getfem-5.4.2.tar.gz;>getfem-5.4.2.tar.gz {%trans%}Gmm++ standalone{%endtrans%} -http://download-mirror.savannah.gnu.org/releases/getfem/stable/gmm-5.4.tar.gz;>gmm-5.4.2.tar.gz +http://download-mirror.savannah.gnu.org/releases/getfem/stable/gmm-5.4.2.tar.gz;>gmm-5.4.2.tar.gz diff --git a/doc/sphinx/source/whatsnew/5.4.2.rst b/doc/sphinx/source/whatsnew/5.4.2.rst index 3b53c624..20bc1850 100644 --- a/doc/sphinx/source/whatsnew/5.4.2.rst +++ b/doc/sphinx/source/whatsnew/5.4.2.rst @@ -1,7 +1,7 @@ .. include:: ../replaces.txt ** - What's New in |gf| 5.4.1 + What's New in |gf| 5.4.2 ** |gf| 5.4.2 is a patch version.
[Getfem-commits] [getfem-commits] branch master updated: towards release 5.4.2
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 3ca72e10 towards release 5.4.2 3ca72e10 is described below commit 3ca72e10639446d9e8ba7d80b118b9af3a851ae0 Author: Renard Yves AuthorDate: Fri Jul 8 09:34:06 2022 +0200 towards release 5.4.2 --- configure.ac | 2 +- doc/sphinx/source/.templates/download.html | 6 +++--- doc/sphinx/source/.templates/indexcontent.html | 2 +- doc/sphinx/source/whatsnew/5.4.2.rst | 2 +- extract_gmm++ | 7 ++- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index ca3f9c4d..84d685bd 100644 --- a/configure.ac +++ b/configure.ac @@ -1132,7 +1132,7 @@ BUILDDATE=`date +%D,%H:%M:%S` AC_SUBST(BUILDDATE) CONFIGURE_ARGS=$ac_configure_args AC_SUBST(CONFIGURE_ARGS) -LIBTOOL_VERSION_INFO="-version-info ${MAJOR_VERSION}:${MINOR_VERSION}:0" +LIBTOOL_VERSION_INFO="-version-info ${MAJOR_VERSION}:${MINOR_VERSION}:${PATCH_VERSION}" AC_SUBST(LIBTOOL_VERSION_INFO) dnl AC_CHECK_PROGS(RANLIB, ranlib) diff --git a/doc/sphinx/source/.templates/download.html b/doc/sphinx/source/.templates/download.html index 08fd575c..24f6fd1b 100644 --- a/doc/sphinx/source/.templates/download.html +++ b/doc/sphinx/source/.templates/download.html @@ -20,11 +20,11 @@ Public License, either version 3 of the license or any later version along with {%trans%}Format{%endtrans%}{%trans%}Packed as .tar.gz{%endtrans%} {%trans%}{{ project }} stable {%endtrans%} -http://download-mirror.savannah.gnu.org/releases/getfem/stable/getfem-5.4.1.tar.gz;>getfem-5.4.1.tar.gz +http://download-mirror.savannah.gnu.org/releases/getfem/stable/getfem-5.4.1.tar.gz;>getfem-5.4.2.tar.gz {%trans%}Gmm++ standalone{%endtrans%} -http://download-mirror.savannah.gnu.org/releases/getfem/stable/gmm-5.4.tar.gz;>gmm-5.4.tar.gz +http://download-mirror.savannah.gnu.org/releases/getfem/stable/gmm-5.4.tar.gz;>gmm-5.4.2.tar.gz @@ -33,7 +33,7 @@ Public License, either version 3 of the license or any later version along with {%trans%}Building a portable C++ library is not an easy task. We try to build it with many combinations of OS and compilers. The last stable version has been tested on the following configurations:{%endtrans%} - {%trans%}Linux with g++ (versions 7.1 to 9.0) {%endtrans%} + {%trans%}Linux with g++ (versions 7.1 to 9.4.0) {%endtrans%} {%trans%}MacOS X (with the Python, Octave and Matlab interfaces){%endtrans%} {%trans%}Windows with http://www.mingw.org;>MinGW and http://www.mingw.org/wiki/msys;>MSys diff --git a/doc/sphinx/source/.templates/indexcontent.html b/doc/sphinx/source/.templates/indexcontent.html index aab49473..6f7c9124 100644 --- a/doc/sphinx/source/.templates/indexcontent.html +++ b/doc/sphinx/source/.templates/indexcontent.html @@ -8,7 +8,7 @@ {%trans%}An open-source finite element library {%endtrans%} -{%trans%}NEW (April 2020): Version 5.4 has been released.{%endtrans%} +{%trans%}NEW (July 2022): Version 5.4.2 has been released.{%endtrans%} {%trans%}Thank you for citing https://hal.archives-ouvertes.fr/hal-02532422/document;> [GetFEM2020] in scientific works that use GetFEM.{%endtrans%} diff --git a/doc/sphinx/source/whatsnew/5.4.2.rst b/doc/sphinx/source/whatsnew/5.4.2.rst index 8874cb11..3b53c624 100644 --- a/doc/sphinx/source/whatsnew/5.4.2.rst +++ b/doc/sphinx/source/whatsnew/5.4.2.rst @@ -6,7 +6,7 @@ |gf| 5.4.2 is a patch version. -Released version, 2022/07/01. +Released version, 2022/07/08. The main changes are: diff --git a/extract_gmm++ b/extract_gmm++ index 3def475b..399e270f 100755 --- a/extract_gmm++ +++ b/extract_gmm++ @@ -22,6 +22,7 @@ eval 'exec perl -S $0 "$@"' $getfem_root = "."; $MAJOR_VERSION = "5"; $MINOR_VERSION = "4"; +$PATCH_VERSION = "2"; # $DATE_VERSION = -`date +%Y%m%d`; # $DATE_VERSION = ".0"; @@ -136,7 +137,7 @@ dnl ./configure: sh internal 2K buffer overflow on HP-UX 9.xx dnl thus, updating cache ./config.cache avoided. define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl\n -AC_INIT(gmm, $MAJOR_VERSION.$MINOR_VERSION) +AC_INIT(gmm, $MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS(config.h) AX_PREFIX_CONFIG_H(src/gmm/gmm_arch_config.h,GMM) @@ -145,6 +146,10 @@ AC_ARG_PROGRAM\n PACKAGE="gmm" MAJOR_VERSION="$MAJOR_VERSION" MINOR_VERSION="$MINOR_VERSION" +PATCH_VERSION="$PATCH_VERSION" +AC_DEFINE_UNQUOTED([MAJOR_VERSION],$MAJOR_VERSION,[Major version number]) +AC_DEFINE_UNQUOTED([MINOR_VERSION],$MINOR_VERSION,[Minor version number]) +AC_DEFINE_UNQUOTED([PATCH_VERSION],$PATCH_VERSION,[Patch version number]) dnl VERSION=\$MAJOR_VERSION.\$MINOR_VERSION$DATE_VERSION VERSION=\$MAJOR_VERSION.\$MINOR_VERSION echo "configuring \$PACKAGE \$VERSION..."\n
[Getfem-commits] [getfem-commits] branch master updated: small add
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 134e0599 small add 134e0599 is described below commit 134e0599f63052425f761cb1cc45f1944d3bacca Author: Yves Renard AuthorDate: Thu Jul 7 16:30:59 2022 +0200 small add --- interface/tests/python/demo_laplacian.py | 42 +--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/interface/tests/python/demo_laplacian.py b/interface/tests/python/demo_laplacian.py index c8736ef1..84493754 100644 --- a/interface/tests/python/demo_laplacian.py +++ b/interface/tests/python/demo_laplacian.py @@ -31,6 +31,15 @@ import numpy as np # Import basic modules import getfem as gf +plot_result = False; + +if plot_result: + import vtk + from matplotlib.pyplot import figure + import matplotlib.pyplot as plt + import meshio + from matplotlib import ticker + ## Parameters NX = 100 # Mesh parameter. Dirichlet_with_multipliers = True # Dirichlet condition with multipliers @@ -131,10 +140,37 @@ print('Error in L2 norm : ', L2error) print('Error in H1 norm : ', H1error) # Export data -mfu.export_to_pos('laplacian.pos', Ue,'Exact solution', -U,'Computed solution') +sl4 = gf.Slice(("none",), mfu, 1) +sl4.export_to_vtk('laplacian.vtk', "ascii", mfu, Ue,'Exact_solution', mfu, U,'Computed_solution') print('You can view the solution with (for example):') -print('gmsh laplacian.pos') +print('Paraview laplacian.vtk') + + +if plot_result: + reader = meshio.read('laplacian.vtk') + points = reader.points + cells = reader.cells[0].data + point_data = reader.point_data["Computed_solution"] + fig = figure(figsize=(7, 7)) + axes2 = fig.add_subplot(aspect="auto",projection='3d') + axes2.triplot(points[:, 0], points[:, 1], cells, color="gray") + contour = axes2.plot_trisurf(points[:, 0], points[:, 1], +point_data[:,0], cmap="jet") + fig.colorbar(contour) + axes2.view_init(30, 100) + fig.tight_layout() + formatter = ticker.ScalarFormatter(useMathText=True) + formatter.set_scientific(True) + axes2.yaxis.set_major_formatter(formatter) + axes2.set_title("uref") + fig.savefig("uref.pdf") + plt.show() + + + + + + if (H1error > 1e-3):
[Getfem-commits] [getfem-commits] branch master updated: removing GMM_USES_BLAS_INTERFACE
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new e6e0fc4a removing GMM_USES_BLAS_INTERFACE e6e0fc4a is described below commit e6e0fc4a60062bc221d34cf67b9e3cfafa3623af Author: Renard Yves AuthorDate: Thu Jul 7 11:07:50 2022 +0200 removing GMM_USES_BLAS_INTERFACE --- configure.ac | 14 -- 1 file changed, 14 deletions(-) diff --git a/configure.ac b/configure.ac index df29c29d..ca3f9c4d 100644 --- a/configure.ac +++ b/configure.ac @@ -656,20 +656,6 @@ dnl ACX_BLAS([ echo "OK, You have working BLAS libs !"; HAVE_VENDOR_BLAS=1 ], [e LIBS="$LIBS $BLAS_LIBS" CPPFLAGS="$CPPFLAGS -DGMM_USES_BLAS" -useblasinterface=NO -AC_ARG_ENABLE(blas_interface, - [AS_HELP_STRING([--enable-blas-interface],[enable the use of the blas call for basic algebra routines.])], - [case $enableval in - yes | "") useblasinterface=YES ;; - no) useblasinterface=NO ;; - esac], - [useblasinterface=YES] -) - -if test x$useblasinterface = xYES; then - CPPFLAGS="$CPPFLAGS -DGMM_USES_BLAS_INTERFACE" -fi - useblas64support=NO AC_ARG_ENABLE(blas64-support, [AS_HELP_STRING([--enable-blas64-support],[enable the 64 bits integer blas and lapack support])],
[Getfem-commits] [getfem-commits] branch master updated: minor modification
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 82a1d106 minor modification 82a1d106 is described below commit 82a1d1062437ebdaab3ee6f815876e4d8996a698 Author: Yves Renard AuthorDate: Thu Jun 30 13:23:09 2022 +0200 minor modification --- interface/tests/python/demo_fluide_structure_interaction.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/interface/tests/python/demo_fluide_structure_interaction.py b/interface/tests/python/demo_fluide_structure_interaction.py index fbd3bafc..0e1c463c 100644 --- a/interface/tests/python/demo_fluide_structure_interaction.py +++ b/interface/tests/python/demo_fluide_structure_interaction.py @@ -134,6 +134,7 @@ md.add_fem_data("v0", mfv) md.add_fem_data("ls", mf_ls) md.add_fem_variable("p", mfp) md.add_fem_data("p_in", mfp) +md.add_fem_data("p0", mfp) md.add_initialized_data("f", [0., -rho*g]) md.add_initialized_data("ball_v", [0., 0.]) md.add_initialized_data("v_in", [0., in_velocity]) @@ -181,11 +182,10 @@ ball_v = np.array([0., 0.]) os.system('mkdir -p FSI_results'); while t < T+1e-8: print("Solving step at t=%f" % t) - md.set_variable("v0", md.variable("v")) # Balance of forces on the ball and Verlet's scheme R = gf.asm('generic', mim_bound, 0, - '(2*mu*Sym(Grad_v)-p*Id(meshdim))*Normalized(Grad_ls)', -1, md) + '(2*mu*Sym(Grad_v)-0.5*(p+p0)*Id(meshdim))*Normalized(Grad_ls)', -1, md) # R = gf.asm('generic', mim_bound, 0, 'Normalized(Grad_ls)', -1, md) ball_pos_next = 2*ball_pos - ball_pos_prec + dt*dt*(R/ball_mass - [0, g]) ball_v = (ball_pos_next - ball_pos) / dt @@ -227,6 +227,8 @@ while t < T+1e-8: # Solve # md.solve("noisy", "lsolver", "mumps", "max_res", 1e-8) + md.set_variable("v0", md.variable("v")) + md.set_variable("p0", md.variable("p")) md.solve("max_res", 1e-8, "max_iter", 25) # Post-processing
[Getfem-commits] [getfem-commits] branch master updated: an intermediary working version
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 59601b43 an intermediary working version 59601b43 is described below commit 59601b43cc0533b35d84c82e4692cc0e21572363 Author: Yves Renard AuthorDate: Thu Jun 30 11:32:24 2022 +0200 an intermediary working version --- .../python/demo_fluide_structure_interaction.py| 67 +++--- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/interface/tests/python/demo_fluide_structure_interaction.py b/interface/tests/python/demo_fluide_structure_interaction.py index 8c10cefa..fbd3bafc 100644 --- a/interface/tests/python/demo_fluide_structure_interaction.py +++ b/interface/tests/python/demo_fluide_structure_interaction.py @@ -34,23 +34,23 @@ import numpy as np import getfem as gf gf.util('trace level', 0) -version = 1 # 1-without cut-fem and Nitsche's method, - # 2-with cut-fem +version = 1 # 1-without cut-fem and Nitsche's method, + # 2-with cut-fem -# Phisical parameters (à ajuster pour être physique ...) +# Phisical parameters nu = 0.002# cinematic viscosity rho = 1. # fluid density mu = rho * nu # dynamic viscosity g = 9.81 # gravity in_velocity = 4. # inward velocity at the center bottom ball_radius = 0.1 -ball_mass = 0.032 -ball_init_pos = np.array([0., 0.2]) +ball_mass = 0.033 +ball_init_pos = np.array([0., 0.3]) # Discretization parameters -dt = 0.01 # Time step -T = 40. # Final time -gamma0 = 1. # Nitsche's method parameter +dt = 0.01 # Time step +T = 40. # Final time +gamma0 = 1. # Nitsche's method parameter # Geometry and Mesh of the cavity W1 = 0.05 # @@ -176,20 +176,37 @@ if (version == 2): if ((version == 1) or (version == 2)): md.add_nonlinear_term(mim_bound, "-(mu*Grad_v-p*Id(meshdim))*Normalized(Grad_ls).Test_v + gamma * (v-ball_v).Test_v - (mu*Grad_Test_v)*Normalized(Grad_ls).(v-ball_v)") -t = 0 -step = 0 -ball_pos = ball_init_pos -ball_pos_prec = ball_init_pos +t = 0; step = 0; ball_pos = ball_init_pos; ball_pos_prec = ball_init_pos ball_v = np.array([0., 0.]) os.system('mkdir -p FSI_results'); while t < T+1e-8: print("Solving step at t=%f" % t) md.set_variable("v0", md.variable("v")) + + # Balance of forces on the ball and Verlet's scheme + R = gf.asm('generic', mim_bound, 0, + '(2*mu*Sym(Grad_v)-p*Id(meshdim))*Normalized(Grad_ls)', -1, md) + # R = gf.asm('generic', mim_bound, 0, 'Normalized(Grad_ls)', -1, md) + ball_pos_next = 2*ball_pos - ball_pos_prec + dt*dt*(R/ball_mass - [0, g]) + ball_v = (ball_pos_next - ball_pos) / dt md.set_variable("ball_v", ball_v) + + # Enforce the ball to remain inside the cavity + if (ball_pos_next[0] < -W/2+ball_radius) : + ball_pos_next[0] = -W/2+ball_radius; ball_v[0] *= 0. + if (ball_pos_next[0] > W/2-ball_radius) : + ball_pos_next[0] = W/2-ball_radius; ball_v[0] *= 0. + if (ball_pos_next[1] < ball_radius) : + ball_pos_next[1] = ball_radius; ball_v[1] *= 0. + if (ball_pos_next[1] > H-ball_radius) : + ball_pos_next[1] = H-ball_radius; ball_v[1] *= 0. + print ("ball position = ", ball_pos, " ball velocity = ", ball_v) + + ball_pos_mid = (ball_pos + ball_pos_next)/2 # levelset update P = mf_ls.basic_dof_nodes(); x = P[0,:]; y = P[1,:] - ULS = ((x - ball_pos[0])**2 + (y - ball_pos[1])**2) - ball_radius**2 + ULS = ((x - ball_pos_mid[0])**2 + (y - ball_pos_mid[1])**2) - ball_radius**2 ls.set_values(ULS) md.set_variable('ls', ULS) mls.adapt() @@ -212,32 +229,12 @@ while t < T+1e-8: # md.solve("noisy", "lsolver", "mumps", "max_res", 1e-8) md.solve("max_res", 1e-8, "max_iter", 25) - # Balance of forces on the ball and Verlet's scheme - R = gf.asm('generic', mim_bound, 0, - '(2*mu*Sym(Grad_v)-p*Id(meshdim))*Normalized(Grad_ls)', -1, md) - # R = gf.asm('generic', mim_bound, 0, 'Normalized(Grad_ls)', -1, md) - ball_pos_next = 2*ball_pos - ball_pos_prec + dt*dt*(R/ball_mass - [0, g]) - ball_v = (ball_pos_next - ball_pos_prec) / (2*dt) - ball_pos_prec = ball_pos - ball_pos = ball_pos_next - - # Enforce the ball to remain inside the cavity - if (ball_pos[0] < -W/2+ball_radius) : - ball_pos_prec[0] = ball_pos[0] = -W/2+ball_radius; ball_v[0] *= 0. - if (ball_pos[0] > W/2-ball_radius) : - ball_pos_prec[0] = ball_pos[0] = W/2-ball_radius; ball_v[0] *= 0. - if (ball_pos[1] < ball_radius) : - ball_pos_prec[1] = ball_pos[1] = ball_radius; ball_v[1] *= 0. - if (ball_pos[1] > H-ball_radius) : - ball_pos_prec[1] = ball
[Getfem-commits] [getfem-commits] branch master updated: minor modifications for 5.4.2 release
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 52929dd8 minor modifications for 5.4.2 release 52929dd8 is described below commit 52929dd826e7027c85e7a2de2a9162f0f381eb34 Author: Renard Yves AuthorDate: Wed Jun 29 15:14:57 2022 +0200 minor modifications for 5.4.2 release --- contrib/continuum_mechanics/Makefile.am| 12 +--- ...icity_fin_strain_lin_hardening_axisymmetric.py} | 0 ...icity_fin_strain_lin_hardening_plane_strain.py} | 36 +++--- interface/src/python/Makefile.am | 2 +- tests/Makefile.am | 6 ++-- 5 files changed, 36 insertions(+), 20 deletions(-) diff --git a/contrib/continuum_mechanics/Makefile.am b/contrib/continuum_mechanics/Makefile.am index fddd257c..dc5d9fc1 100644 --- a/contrib/continuum_mechanics/Makefile.am +++ b/contrib/continuum_mechanics/Makefile.am @@ -15,12 +15,17 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +EXTRA_DIST = \ + plasticity_fin_strain_lin_hardening_axisymmetric.py \ + plasticity_finite_strain_linear_hardening_tension_3D.py \ + plasticity_fin_strain_lin_hardening_plane_strain.py + check_PROGRAMS = CLEANFILES = if BUILDPYTHON -TESTS = plasticity_finite_strain_linear_hardening_tension_plane_strain.py +TESTS = plasticity_fin_strain_lin_hardening_plane_strain.py AM_TESTS_ENVIRONMENT = \ export PYTHONPATH=$(top_builddir)/interface/src/python; \ @@ -28,7 +33,4 @@ AM_TESTS_ENVIRONMENT = \ LOG_COMPILER = $(PYTHON) endif -EXTRA_DIST = \ - plasticity_finite_strain_linear_hardening_tension_3D.py \ - plasticity_finite_strain_linear_hardening_tension_axisymmetric.py \ - plasticity_finite_strain_linear_hardening_tension_plane_strain.py +CLEANFILES = *.vtk results/* __pycache__/* diff --git a/contrib/continuum_mechanics/plasticity_finite_strain_linear_hardening_tension_axisymmetric.py b/contrib/continuum_mechanics/plasticity_fin_strain_lin_hardening_axisymmetric.py similarity index 100% rename from contrib/continuum_mechanics/plasticity_finite_strain_linear_hardening_tension_axisymmetric.py rename to contrib/continuum_mechanics/plasticity_fin_strain_lin_hardening_axisymmetric.py diff --git a/contrib/continuum_mechanics/plasticity_finite_strain_linear_hardening_tension_plane_strain.py b/contrib/continuum_mechanics/plasticity_fin_strain_lin_hardening_plane_strain.py similarity index 91% rename from contrib/continuum_mechanics/plasticity_finite_strain_linear_hardening_tension_plane_strain.py rename to contrib/continuum_mechanics/plasticity_fin_strain_lin_hardening_plane_strain.py index a80d3257..3b3644c2 100644 --- a/contrib/continuum_mechanics/plasticity_finite_strain_linear_hardening_tension_plane_strain.py +++ b/contrib/continuum_mechanics/plasticity_fin_strain_lin_hardening_plane_strain.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# -*- coding: UTF8 -*- +# -*- coding: utf-8 -*- # Python GetFEM interface # # Copyright (C) 2020-2020 Konstantinos Poulios. @@ -62,9 +62,11 @@ mult_fem_order = 2 # dirichlet multipliers finite element order #integration_degree = 3 # 4 gauss points per quad integration_degree = 5 # 9 gauss points per quad +export_results = False; + # resultspath = "./results" -if not os.path.exists(resultspath): +if (export_results and not os.path.exists(resultspath)): os.makedirs(resultspath) tee = subprocess.Popen(["tee", "%s/tension_plane_strain.log" % resultspath], @@ -117,8 +119,9 @@ if dH > 0: pts[0,i] = x pts[1,i] -= (y*dH)/(2*H) * (1 + np.cos(2.*np.pi*x/L)) mesh.set_pts(pts) - -mesh.export_to_vtu("%s/mesh.vtu" % resultspath) + +if (export_results): + mesh.export_to_vtu("%s/mesh.vtu" % resultspath) # FEM mfN = gf.MeshFem(mesh, N) @@ -192,9 +195,15 @@ print("Model dofs: %i" % md.nbdof()) print("Displacement fem dofs: %i" % mfu.nbdof()) print("Dirichlet mult dofs: %i" % md.mesh_fem_of_variable("dirmult").nbdof()) -shutil.copyfile(os.path.abspath(sys.argv[0]),resultspath+"/"+sys.argv[0]) +if (export_results): + shutil.copyfile(os.path.abspath(sys.argv[0]),resultspath+"/"+sys.argv[0]) + starttime_overall = time.process_time() -with open("%s/tension_plane_strain.dat" % resultspath, "w") as f1: + +if (export_results): + f1 = open("%s/tension_plane_strain.dat" % resultspath, "w") + +try: for step in range(steps_t+1): md.set_variable("disp", disp*step/float(steps_t)) print('STEP %i: Solving with disp = %g' % (step, md.variable("disp"))) @@ -211,11 +220,12 @@ with open("%s/tension_plane_strain.dat" % resultspath, "w") as f1: V = gf.asm_generic(mim, 0, "1", -1, md) sigma11 = gf.asm_generic(mim, 0, "sigma(1,1)", -1, md)/V
[Getfem-commits] [getfem-commits] branch master updated: little fix on ga_instruction_contraction_switch
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 287ad65e little fix on ga_instruction_contraction_switch 287ad65e is described below commit 287ad65efa8fe34e6b961ec361a9f20a43d47656 Author: Yves Renard AuthorDate: Tue Jun 28 17:41:13 2022 +0200 little fix on ga_instruction_contraction_switch --- src/getfem_generic_assembly_compile_and_exec.cc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/getfem_generic_assembly_compile_and_exec.cc b/src/getfem_generic_assembly_compile_and_exec.cc index b2f629c5..8a6087c0 100644 --- a/src/getfem_generic_assembly_compile_and_exec.cc +++ b/src/getfem_generic_assembly_compile_and_exec.cc @@ -2996,7 +2996,7 @@ namespace getfem { } if (tc2_.sparsity() == 2) { size_type q2 = tc2.sizes()[1]; - size_type n2 = (tc2.sizes().size() > 2) ? tc2.sizes()[1] : 1; + size_type n2 = (tc2.sizes().size() > 2) ? tc2.sizes()[2] : 1; if (n2*q2 == n) { switch (n2) { case 1: @@ -3067,7 +3067,7 @@ namespace getfem { } if (tc1_.sparsity() == 2) { size_type q1 = tc1.sizes()[1]; - size_type n1 = (tc1.sizes().size() > 2) ? tc1.sizes()[1] : 1; + size_type n1 = (tc1.sizes().size() > 2) ? tc1.sizes()[2] : 1; if (n1*q1 == n) { switch (n1) { case 1: @@ -3206,7 +3206,7 @@ namespace getfem { } if (tc2_.sparsity() == 2) { size_type q2 = tc2.sizes()[1]; - size_type n2 = (tc2.sizes().size() > 2) ? tc2.sizes()[1] : 1; + size_type n2 = (tc2.sizes().size() > 2) ? tc2.sizes()[2] : 1; if (n2*q2 == n) { switch (n2) { case 1: @@ -3277,7 +3277,7 @@ namespace getfem { } if (tc1_.sparsity() == 2) { size_type q1 = tc1.sizes()[1]; - size_type n1 = (tc1.sizes().size() > 2) ? tc1.sizes()[1] : 1; + size_type n1 = (tc1.sizes().size() > 2) ? tc1.sizes()[2] : 1; if (n1*q1 == n) { switch (n1) { case 1:
[Getfem-commits] (no subject)
branch: master commit 7a26ce81e8f2587314bf8988daef9885bc928bc5 Author: Yves Renard AuthorDate: Tue Jun 28 15:49:31 2022 +0200 small improvment --- .../python/demo_fluide_structure_interaction.py| 61 +- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/interface/tests/python/demo_fluide_structure_interaction.py b/interface/tests/python/demo_fluide_structure_interaction.py index 3a5281dc..8c10cefa 100644 --- a/interface/tests/python/demo_fluide_structure_interaction.py +++ b/interface/tests/python/demo_fluide_structure_interaction.py @@ -22,7 +22,7 @@ """ Incompressible Navier-Stokes fluid in interaction with a ball in a cavity. - Middle point scheme for the fluid, Verlet scheme for the ball (not the + Middle point scheme for the fluid, Verlet's scheme for the ball (not the best but can of course be changed) This program is used to check that python-getfem is working. This is also @@ -34,12 +34,15 @@ import numpy as np import getfem as gf gf.util('trace level', 0) +version = 1 # 1-without cut-fem and Nitsche's method, + # 2-with cut-fem + # Phisical parameters (à ajuster pour être physique ...) nu = 0.002# cinematic viscosity rho = 1. # fluid density mu = rho * nu # dynamic viscosity g = 9.81 # gravity -in_velocity = 1. # inward velocity at the center bottom +in_velocity = 4. # inward velocity at the center bottom ball_radius = 0.1 ball_mass = 0.032 ball_init_pos = np.array([0., 0.2]) @@ -47,11 +50,11 @@ ball_init_pos = np.array([0., 0.2]) # Discretization parameters dt = 0.01 # Time step T = 40. # Final time -gamma0 = 1E3# Nitsche's method parameter +gamma0 = 1. # Nitsche's method parameter # Geometry and Mesh of the cavity -W1 = 0.1 # -W2 = 0.45 # H2 |_ _| +W1 = 0.05 # +W2 = 0.475# H2 |_ _| W = W1+2.*W2 # || H1 = 0.8 # || H2 = 0.2 # H1 || @@ -148,23 +151,30 @@ md.add_Dirichlet_condition_with_multipliers(mim, "v", mfv, OUT_RG2, "v_out2") md.add_Dirichlet_condition_with_multipliers(mim, "v", mfv, WALL_RG) # Diffusive terms -md.add_nonlinear_term(mim_out, "(1/dt)*rho*(v-v0).Test_v + mu*Grad_v:Grad_Test_v") +if (version == 2): + mim_t = mim_out; +else: + mim_t = mim +md.add_nonlinear_term(mim_t, "(1/dt)*rho*(v-v0).Test_v + mu*Grad_v:Grad_Test_v") # Nonlinear convective term -md.add_nonlinear_term(mim_out, "0.25*rho*((Grad_v+Grad_v0)*(v+v0)).Test_v") +md.add_nonlinear_term(mim_t, "0.25*rho*((Grad_v+Grad_v0)*(v+v0)).Test_v") # Pressure terms -md.add_nonlinear_term(mim_out, "-p*Div_Test_v - 0.5*Test_p*(Div_v+Div_v0)") +md.add_nonlinear_term(mim_t, "-p*Div_Test_v - 0.5*Test_p*(Div_v+Div_v0)") # Gravity term -md.add_nonlinear_term(mim_out, "-f.Test_v") +md.add_nonlinear_term(mim_t, "-f.Test_v") # Small ghost penalty term -md.add_linear_term(mim, "1E-4*(Grad_v-Interpolate(Grad_v, neighbor_element)):(Grad_Test_v-Interpolate(Grad_Test_v, neighbor_element))", INTERNAL_EDGES) -# md.add_linear_term(mim, "1E-7*(p-Interpolate(p, neighbor_element))*(Test_p-Interpolate(Test_p, neighbor_element))", INTERNAL_EDGES) -# Penalty term on internal dofs -Bv = gf.Spmat('empty',nbdofv) -ibv = md.add_explicit_matrix("v", "v", Bv) -Bp = gf.Spmat('empty',nbdofp) -ibp = md.add_explicit_matrix("p", "p", Bp) +if (version == 2): + md.add_linear_term(mim, "1E-6*(Grad_v-Interpolate(Grad_v, neighbor_element)):(Grad_Test_v-Interpolate(Grad_Test_v, neighbor_element))", INTERNAL_EDGES) + # md.add_linear_term(mim, "1E-7*(p-Interpolate(p, neighbor_element))*(Test_p-Interpolate(Test_p, neighbor_element))", INTERNAL_EDGES) + # Penalty term on internal dofs + Bv = gf.Spmat('empty',nbdofv) + ibv = md.add_explicit_matrix("v", "v", Bv) + Bp = gf.Spmat('empty',nbdofp) + ibp = md.add_explicit_matrix("p", "p", Bp) + # md.add_linear_term(mim_in, "1E-4*(v - ball_v).Test_v") # Nitsche's term on the FS interface -md.add_nonlinear_term(mim_bound, "-(mu*Grad_v-p*Id(meshdim))*Normalized(Grad_ls).Test_v + gamma * (v-ball_v).Test_v - (mu*Grad_Test_v)*Normalized(Grad_ls).(v-ball_v)") +if ((version == 1) or (version == 2)): + md.add_nonlinear_term(mim_bound, "-(mu*Grad_v-p*Id(meshdim))*Normalized(Grad_ls).Test_v + gamma * (v-ball_v).Test_v - (mu*Grad_Test_v)*Normalized(Grad_ls).(v-ball_v)") t = 0 step = 0 @@ -188,14 +198,15 @@ while t < T+1e-8: mim_out.adapt() # Penalization of ball internal dofs with no contribution on the boundary - idofv = np.setdi
[Getfem-commits] [getfem-commits] master updated (76a75614 -> ac2c3acb)
renard pushed a change to branch master. from 76a75614 Fix issue from #89e50dbd new 7a26ce81 small improvment add 494de109 fix bug in simplexification of pyramid elements add 63276e89 Merge branch 'master' into devel-logari81 add ea6f2828 Cosmetic changes and typo fix add d36b1a36 Stricter checks in the use of mesh regions add 5df388a5 Remove unused mesh_region option add 537a96f6 Minor improvements in finite strain plasticity brick and new demos add 5f31268e Merge branch 'master' into devel-logari81 add d87054dd Merge branch 'master' into devel-logari81 add d9bcc35a Merge branch 'master' into devel-logari81 add 60d7d962 Fix wrong point size in mesh method new ac2c3acb Merge remote-tracking branch 'origin/devel-logari81' Summary of changes: .../python/demo_fluide_structure_interaction.py| 61 +- src/getfem/getfem_mesh_region.h| 2 +- src/getfem_mesh.cc | 5 +- 3 files changed, 40 insertions(+), 28 deletions(-)
[Getfem-commits] (no subject)
branch: master commit ac2c3acbc3ce9f03c403af4cdb01f163fc597814 Merge: 7a26ce81 60d7d962 Author: Yves Renard AuthorDate: Tue Jun 28 15:50:11 2022 +0200 Merge remote-tracking branch 'origin/devel-logari81' src/getfem/getfem_mesh_region.h | 2 +- src/getfem_mesh.cc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
[Getfem-commits] [getfem-commits] branch master updated: towards release 5.4.2
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 3a613b80 towards release 5.4.2 3a613b80 is described below commit 3a613b80d06f916e4eb8bff401e1403d7a23b0cb Author: Renard Yves AuthorDate: Mon Jun 27 10:58:03 2022 +0200 towards release 5.4.2 --- INSTALL| 24 README | 2 +- doc/doxygen/Doxyfile | 2 +- interface/tests/python/Makefile.am | 6 +++--- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/INSTALL b/INSTALL index b11ce691..5de5cde3 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -# Copyright (C) 1999-2020 Yves Renard, Julien Pommier +# Copyright (C) 1999-2022 Yves Renard, Julien Pommier # # This file is a part of GetFEM++ # @@ -60,6 +60,7 @@ gmake install Basic Installation == + See also https://getfem.org/install/install_linux.html These are generic installation instructions. @@ -260,22 +261,5 @@ In principle, if they are present on your machine, you will get If this is not the case you have to install these via Xcode: http://developer.apple.com/technologies/xcode.html -Once you are sure that gcc and g++ are present, you need gmm++: see the site -http://download.gna.org/getfem/html/homepage/gmm.html -However in order to install gmm++ on your machine, once the corresponding directory has been created by unzipping the source files, you have to go to that unzipped directory and then issue the command ./configure with the following options: -./configure CC="gcc -arch i386" CXX="g++ -arch i386" CPP="gcc -E" CXXCPP="g++ -E" - - Here we are assuming that you are on an Intel i386 machine: for ppc machines change the --arch i386 -option to --arch ppc - -After this, in order to compile getfem++ you need a current version where in the source files "uint" has ben changed to "unsigned int" (in principle this is done in the most recent stable version). For instance you can download such a version at -http://math.univ-lyon1.fr/~renard/temp/getfem-4.0.tar.gz - -Then you have to to go to that unzipped directory and say in your Terminal window (for architectures other than Intel i386 see above): -./configure CC="gcc -arch i386" CXX="g++ -arch i386" CPP="gcc -E" CXXCPP="g++ -E" - -Once this step is done without getting an error message, then you issue successively the commands -make -make install +See the remain part of the installation guide on +https://getfem.org/install/install_mac.html \ No newline at end of file diff --git a/README b/README index 9e8c4968..1be7d100 100644 --- a/README +++ b/README @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -Please read BUGS, INSTALL +Please read INSTALL and see the site https://getfem.org/ diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index dbd10c3a..a12cbb23 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = GetFEM # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 5.4.1 +PROJECT_NUMBER = 5.4.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/interface/tests/python/Makefile.am b/interface/tests/python/Makefile.am index c17f64b4..61debcd2 100644 --- a/interface/tests/python/Makefile.am +++ b/interface/tests/python/Makefile.am @@ -16,7 +16,8 @@ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. if QHULL -optpy = check_levelset.py +optpy = check_levelset.py \ +demo_thermo_elasticity_electrical_coupling.py else optpy = endif @@ -47,12 +48,12 @@ EXTRA_DIST= \ demo_static_contact.py \ demo_dynamic_contact_1D.py \ demo_Mindlin_Reissner_plate.py \ +demo_thermo_elasticity_electrical_coupling.py \ demo_step_by_step.py\ demo_stokes_3D_tank.py \ 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 \ @@ -78,7 +79,6 @@ TESTS =
[Getfem-commits] [getfem-commits] branch master updated: minor fix
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 20c315d5 minor fix 20c315d5 is described below commit 20c315d50174ef3bb264a3d849a46e059f540668 Author: Renard Yves AuthorDate: Thu Jun 23 16:02:13 2022 +0200 minor fix --- interface/tests/matlab-octave/check_all_octave.sh | 2 +- interface/tests/matlab-octave/demo_refine.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/tests/matlab-octave/check_all_octave.sh b/interface/tests/matlab-octave/check_all_octave.sh index 53dd703a..36282a56 100755 --- a/interface/tests/matlab-octave/check_all_octave.sh +++ b/interface/tests/matlab-octave/check_all_octave.sh @@ -32,7 +32,7 @@ echo " srcdir='$srcdir'" # s=$(echo "s=getenv('MATLABPATH'); while (length(s)), [a,s]=strtok(s,':'); addpath(a); end; disp(pwd); check_all; pause(1)" | ${MLAB} 2>&1); -s=$(echo "addpath('../../src/octave'); addpath('${srcdir}/../../src/octave'); disp(pwd); pause(1);" | octave check_all.m 2>&1); +s=$(echo "addpath('../../src/octave'); addpath('${srcdir}/../../src/octave'); disp(pwd); pause(1); check_all; pause(1);" | octave 2>&1); # echo $s diff --git a/interface/tests/matlab-octave/demo_refine.m b/interface/tests/matlab-octave/demo_refine.m index 65849c25..70642052 100644 --- a/interface/tests/matlab-octave/demo_refine.m +++ b/interface/tests/matlab-octave/demo_refine.m @@ -68,7 +68,7 @@ gf_model_set(md, 'add Dirichlet condition with multipliers', mim, 'u', mfu, 1); -for step=1:8, +for step=1:7, gf_model_get(md, 'solve'); U = gf_model_get(md, 'variable', 'u');
[Getfem-commits] [getfem-commits] branch master updated: work in progress
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new f903c1ee work in progress f903c1ee is described below commit f903c1ee56aa227269fe11f4b838b0eb00c62048 Author: Yves Renard AuthorDate: Thu Jun 23 07:39:15 2022 +0200 work in progress --- .../python/demo_fluide_structure_interaction.py| 165 - 1 file changed, 98 insertions(+), 67 deletions(-) diff --git a/interface/tests/python/demo_fluide_structure_interaction.py b/interface/tests/python/demo_fluide_structure_interaction.py index 0beef9cf..3a5281dc 100644 --- a/interface/tests/python/demo_fluide_structure_interaction.py +++ b/interface/tests/python/demo_fluide_structure_interaction.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Python GetFEM interface # -# Copyright (C) 2015 Konstantinos Poulios. +# Copyright (C) 2022 Yves Renard. # # This file is a part of GetFEM # @@ -34,33 +34,27 @@ import numpy as np import getfem as gf gf.util('trace level', 0) -# TODO -# 4 - Faire le schéma en temps pour la balle -# 5 - Nitsche pour le Dirichlet fluide sur le pourtour de la balle -# (pénalisation de l'intrieur, un peu) -# 6 - possiblité de couplage total avec schéma implicite ? -# 7 - Dessin ? couper éventuellement (ou pas). Vorticité ? - # Phisical parameters (à ajuster pour être physique ...) nu = 0.002# cinematic viscosity -rho = 1. # Fluid density +rho = 1. # fluid density mu = rho * nu # dynamic viscosity g = 9.81 # gravity -in_velocity = 1. # in velocity at the center bottom +in_velocity = 1. # inward velocity at the center bottom ball_radius = 0.1 -ball_mass = 0.035 -ball_init_pos = [0, 0.2] +ball_mass = 0.032 +ball_init_pos = np.array([0., 0.2]) -# Time discretization parameters -dt = 0.01 -T = 5. +# Discretization parameters +dt = 0.01 # Time step +T = 40. # Final time +gamma0 = 1E3# Nitsche's method parameter # Geometry and Mesh of the cavity W1 = 0.1 # W2 = 0.45 # H2 |_ _| W = W1+2.*W2 # || -H1 = 0.95 # || -H2 = 0.05 # H1 || +H1 = 0.8 # || +H2 = 0.2 # H1 || H = H2+H1 # || # ||__|| #W2 W1 W2 @@ -81,11 +75,12 @@ m = gf.Mesh("import", "structured", "GT='%s';ORG=[%f,%f];SIZES=[%f,%f];NSUBDIV=[%i,%i]" % (geotrans, -W/2., 0., W, H, NW, NH)) -# Mesh regions (can be imported from a gmsh file for instance) +# Mesh regions IN_RG = 1 OUT_RG1 = 2 OUT_RG2 = 3 WALL_RG = 4 +INTERNAL_EDGES = 5; in_rg = m.outer_faces_in_box([-W1/2.-1e-8,-1e-8],[W1/2+1e-8,1e-8]) out_rg1 = m.outer_faces_in_box([-W/2.-1e-8,H1-1e-8],[-W/2+1e-8,H+1e-8]) out_rg2 = m.outer_faces_in_box([W/2.-1e-8,H1-1e-8],[W/2+1e-8,H+1e-8]) @@ -98,31 +93,25 @@ m.region_subtract(WALL_RG, IN_RG) m.region_subtract(WALL_RG, OUT_RG1) m.region_subtract(WALL_RG, OUT_RG2) -# Finite element spaces and integration methods -mfv_ = gf.MeshFem(m, 2) -mfv_.set_classical_fem(2) +innerf = m.inner_faces() +m.set_region(INTERNAL_EDGES, innerf) -#Il faudra éliminer les ddl sous la balle pour v et p -#kept_dofs = np.setdiff1d(np.arange(mfv_.nb_basic_dof()), -# mfv_.basic_dof_on_region(WALL_RG)) -#mfv = gf.MeshFem("partial", mfv_, kept_dofs) +# Finite element spaces and integration methods +mfv = gf.MeshFem(m, 2) +mfv.set_classical_fem(2) +nbdofv = mfv.nb_basic_dof() -mfp_ = gf.MeshFem(m, 1) -mfp_.set_classical_fem(1) -# kept_dofs = np.setdiff1d(np.arange(mfp_.nb_basic_dof()), -# mfp_.basic_dof_on_region(OUT_RG)) -# mfp = gf.MeshFem("partial", mfp_, kept_dofs) +mfp = gf.MeshFem(m, 1) +mfp.set_classical_fem(1) +nbdofp = mfp.nb_basic_dof() mim = gf.MeshIm(m, 4) - # Levelset definition and adapted integration methods ls = gf.LevelSet(m,2) mf_ls = ls.mf() -P = mf_ls.basic_dof_nodes() -x = P[0,:] -y = P[1,:] +P = mf_ls.basic_dof_nodes(); x = P[0,:]; y = P[1,:] ULS = ((x - ball_init_pos[0])**2 + (y - ball_init_pos[1])**2) - ball_radius**2 ls.set_values(ULS) mls = gf.MeshLevelSet(m) @@ -137,44 +126,59 @@ mim_out.set_integ(4) # Model definition md = gf.Model("real") -md.add_fem_variable("v", mfv_) -md.add_fem_data("v0", mfv_) +md.add_fem_variable("v", mfv) +md.add_fem_data("v0", mfv) md.add_fem_data("ls", mf_ls) -md.add_fem_variable("p", mfp_) -md.add_fem_data("p_in", mfp_) -md.add_initialized_data("f", [0, -rho*g]) -md.add_initialized_data("v_in", [0, in_velocity]) -md.add_initialized_data("v_out1", [-out_velocity, 0]) -md.add_initialized_dat
[Getfem-commits] [getfem-commits] branch master updated: towards release 5.4.2
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 084f9aed towards release 5.4.2 084f9aed is described below commit 084f9aed690f6d8184f62637f4b9721787228e21 Author: Yves Renard AuthorDate: Tue Jun 21 20:42:42 2022 +0200 towards release 5.4.2 --- src/getfem/getfem_derivatives.h | 2 +- src/getfem/getfem_mesh_slicers.h | 3 ++- src/getfem_interpolation.cc | 2 +- src/getfem_models.cc | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/getfem/getfem_derivatives.h b/src/getfem/getfem_derivatives.h index 155b6089..c605454c 100644 --- a/src/getfem/getfem_derivatives.h +++ b/src/getfem/getfem_derivatives.h @@ -231,7 +231,7 @@ namespace getfem GMM_ASSERT1(!mf_vm.is_reduced(), "Sorry, to be done"); -scalar_type vm_min, vm_max; +scalar_type vm_min = 0., vm_max = 0.; for (dal::bv_visitor i(mf_vm_dofs); !i.finished(); ++i) { VM[i] = 0; scalar_type sdiag = 0.; diff --git a/src/getfem/getfem_mesh_slicers.h b/src/getfem/getfem_mesh_slicers.h index 1e58fc9b..e69e7078 100644 --- a/src/getfem/getfem_mesh_slicers.h +++ b/src/getfem/getfem_mesh_slicers.h @@ -429,7 +429,8 @@ namespace getfem { scalar_type Fd = gmm::vect_sp(F,d); scalar_type Dd = gmm::vect_sp(D,d); scalar_type a = gmm::vect_norm2_sqr(D) - gmm::sqr(Dd); - if (a < EPS) return pt_bin.is_in(iA) ? 0. : 1./EPS; assert(a> -EPS); + if (a < EPS) return pt_bin.is_in(iA) ? 0. : 1./EPS; + assert(a> -EPS); scalar_type b = 2*(gmm::vect_sp(F,D) - Fd*Dd); scalar_type c = gmm::vect_norm2_sqr(F) - gmm::sqr(Fd) - gmm::sqr(R); return slicer_volume::trinom(a,b,c); diff --git a/src/getfem_interpolation.cc b/src/getfem_interpolation.cc index cf53ebd7..2c5206d6 100644 --- a/src/getfem_interpolation.cc +++ b/src/getfem_interpolation.cc @@ -44,7 +44,7 @@ namespace getfem { size_type mesh_trans_inv::point_on_convex(size_type cv, size_type i) const { set_iterator it = pts_cvx[cv].begin(); -for (size_type j = 0; it != pts_cvx[cv].end() && j < i; ++it, ++j); +for (size_type j = 0; it != pts_cvx[cv].end() && j < i; ++it, ++j) {} GMM_ASSERT1(it != pts_cvx[cv].end(), "internal error"); return *it; } diff --git a/src/getfem_models.cc b/src/getfem_models.cc index 17241752..3ae1927d 100644 --- a/src/getfem_models.cc +++ b/src/getfem_models.cc @@ -522,7 +522,7 @@ namespace getfem { if (term.is_matrix_term) { if (term.is_global) { bool varc = false, multc = false; - for (const std::string var : brick.vlist) { + for (const std::string : brick.vlist) { if (multname.compare(var) == 0) multc = true; if (vname.compare(var) == 0) varc = true; } @@ -691,7 +691,7 @@ namespace getfem { << vargroup.first; if (vargroup.second.size()) { bool first(true); - for (const std::string vname : vargroup.second) { + for (const std::string : vargroup.second) { ost << (first ? " " : ", ") << vname; first = false; }
[Getfem-commits] [getfem-commits] branch master updated: towards release 5.4.2
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new e29c6e03 towards release 5.4.2 e29c6e03 is described below commit e29c6e03ba682dcd61237fcb0211564bd58a9fec Author: Renard Yves AuthorDate: Tue Jun 21 11:46:05 2022 +0200 towards release 5.4.2 --- bin/extract_doc | 4 ++-- configure.ac | 4 ++-- doc/sphinx/source/replaces.txt | 4 ++-- interface/src/python/getfem_python.c | 4 ++-- interface/src/python/setup.py.in | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/extract_doc b/bin/extract_doc index 4a0dcaa4..e0f72c68 100755 --- a/bin/extract_doc +++ b/bin/extract_doc @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- python -*- # -# Copyright (C) 2004-2020 Yves Renard, Julien Pommier. +# Copyright (C) 2004-2022 Yves Renard, Julien Pommier. # # This file is a part of GetFEM # @@ -1885,7 +1885,7 @@ elif (option == 'python-com' or option == 'python-com-par'): # # Python GetFEM interface # -# Copyright (C) 2004-2020 Yves Renard, Julien Pommier. +# Copyright (C) 2004-2022 Yves Renard, Julien Pommier. # # This file is a part of GetFEM # diff --git a/configure.ac b/configure.ac index d9ae16b0..df29c29d 100644 --- a/configure.ac +++ b/configure.ac @@ -27,10 +27,10 @@ dnl thus, updating cache ./config.cache avoided. define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl -AC_INIT(getfem, 5.4.1) +AC_INIT(getfem, 5.4.2) MAJOR_VERSION="5" MINOR_VERSION="4" -PATCH_VERSION="1" +PATCH_VERSION="2" AC_DEFINE_UNQUOTED([MAJOR_VERSION],$MAJOR_VERSION,[Major version number]) AC_DEFINE_UNQUOTED([MINOR_VERSION],$MINOR_VERSION,[Minor version number]) AC_DEFINE_UNQUOTED([PATCH_VERSION],$PATCH_VERSION,[Patch version number]) diff --git a/doc/sphinx/source/replaces.txt b/doc/sphinx/source/replaces.txt index 60df7ba9..2f9f44ac 100644 --- a/doc/sphinx/source/replaces.txt +++ b/doc/sphinx/source/replaces.txt @@ -19,8 +19,8 @@ .. |sLU| replace:: *SuperLU* .. |mumps| replace:: *MUMPS* .. |sphinx| replace:: *Sphinx* -.. |version| replace:: 5.4.1 -.. |licyears| replace:: 2004-2020 +.. |version| replace:: 5.4.2 +.. |licyears| replace:: 2004-2022 .. |gfi| replace:: *getfem-interface* .. |m| replace:: `mesh` .. |mls| replace:: `mesh_level_set` diff --git a/interface/src/python/getfem_python.c b/interface/src/python/getfem_python.c index b0020ff1..beeb0cc8 100644 --- a/interface/src/python/getfem_python.c +++ b/interface/src/python/getfem_python.c @@ -1,6 +1,6 @@ /*=== - Copyright (C) 2004-2020 Julien Pommier. + Copyright (C) 2004-2022 Julien Pommier. This file is a part of GetFEM++ @@ -778,7 +778,7 @@ getfem_env(PyObject *self, PyObject *args) { word_out = PyString_FromString("GetFEM"); } else if (strcmp(word_in,"copyright") == 0) { word_out = PyString_FromString -("2004-2020 GetFEM project"); +("2004-2022 GetFEM project"); } else if (strcmp(word_in,"authors") == 0) { word_out = PyString_FromString ("Yves Renard, Julien Pommier, Konstantinos Poulios"); diff --git a/interface/src/python/setup.py.in b/interface/src/python/setup.py.in index f2e926a8..6a8445bf 100644 --- a/interface/src/python/setup.py.in +++ b/interface/src/python/setup.py.in @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Python GetFEM interface # -# Copyright (C) 2004-2020 Julien Pommier. +# Copyright (C) 2004-2022 Julien Pommier. # # This file is a part of GetFEM # @@ -68,7 +68,7 @@ getfemmod = Extension('_getfem', setup (name = 'getfem-interface', license='LGPL', - version = '5.4.1', + version = '5.4.2', maintainer="Yves Renard", maintainer_email="yves.ren...@insa-lyon.fr", description = "This is the getfem-python-interface module",
[Getfem-commits] [getfem-commits] branch master updated: towards release 5.4.2
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new c6524253 towards release 5.4.2 c6524253 is described below commit c6524253f66ab862259c3440b8060488f53478f7 Author: Renard Yves AuthorDate: Tue Jun 21 10:24:47 2022 +0200 towards release 5.4.2 --- doc/sphinx/source/whatsnew/5.4.2.rst | 17 + doc/sphinx/source/whatsnew/index.rst | 1 + 2 files changed, 18 insertions(+) diff --git a/doc/sphinx/source/whatsnew/5.4.2.rst b/doc/sphinx/source/whatsnew/5.4.2.rst new file mode 100644 index ..8874cb11 --- /dev/null +++ b/doc/sphinx/source/whatsnew/5.4.2.rst @@ -0,0 +1,17 @@ +.. include:: ../replaces.txt + +** + What's New in |gf| 5.4.1 +** + +|gf| 5.4.2 is a patch version. + +Released version, 2022/07/01. + +The main changes are: + + * Improvements in the vtu format exporting + + * Bug and memory leak fixes + + * New examples under contrib/continuum_mechanics and interface/tests/python diff --git a/doc/sphinx/source/whatsnew/index.rst b/doc/sphinx/source/whatsnew/index.rst index aec8c4e8..6eab72cc 100644 --- a/doc/sphinx/source/whatsnew/index.rst +++ b/doc/sphinx/source/whatsnew/index.rst @@ -11,6 +11,7 @@ for anyone wishing to stay up-to-date after a new release. .. toctree:: :maxdepth: 2 + 5.4.2.rst 5.4.1.rst 5.4.rst 5.3.rst
[Getfem-commits] [getfem-commits] branch upgrading_getfem_to_cpp14 deleted (was b998578a)
renard pushed a change to branch upgrading_getfem_to_cpp14. was b998578a no need for a smart pointer here. Value semantics will do. This change permanently discards the following revisions: discard b998578a no need for a smart pointer here. Value semantics will do. discard b93e8190 keyword spelling discard e7126d98 Merge branch 'master' of git.sv.gnu.org:/srv/git/getfem into upgrading_getfem_to_cpp14 discard cefabdb8 returning the fix that disappeared after the merge discard 8f8b8a22 Merge branch 'debug_assembly_breakage' of git.sv.gnu.org:/srv/git/getfem into upgrading_getfem_to_cpp14 discard cead721a more concise comparison discard 0213e2dc Merge branch 'master' of git.sv.gnu.org:/srv/git/getfem into upgrading_getfem_to_cpp14 discard 776b81d5 c++14 as a default compilation standard discard 3b66c0cc replacing a local shared pointer that wasn't sharing anything with a unique_ptr discard 0325c78f c-style keyword register is depreciated in the latest standards of C++ discard 02f74a1c no more boost discard 8a7adc6b further eradication of boost discard 9b04251b std::toupper doesn't need locale anymore discard 7e1cc903 no need for special functions anymore discard 169948f7 no need for boost/atomic, as standard atomic is there discard 701030ad replacing boost::thread_specific_ptr with thread_local via a macro
[Getfem-commits] [getfem-commits] branch making_var_description_copyable deleted (was b8be815b)
renard pushed a change to branch making_var_description_copyable. was b8be815b changing constness to allow var_description copying This change permanently discards the following revisions: discard b8be815b changing constness to allow var_description copying
[Getfem-commits] [getfem-commits] master updated (1a8c1c22 -> ed420f9d)
renard pushed a change to branch master. from 1a8c1c22 Simple FSI example, still in progress add 8a980211 Add VTU(XML) binary option and slices add 250861de Merge remote-tracking branch 'origin' into fixmisspell add bf38e028 Update urls of translation project and documents add ed420f9d Merge remote-tracking branch 'origin/master' into fixmisspell No new revisions were added by this update. Summary of changes: doc/sphinx/.tx/config | 572 - doc/sphinx/source/project/contribute.rst | 6 +- doc/sphinx/source/tutorial/intro.rst | 2 +- doc/sphinx/source/tutorial/thermo_coupling.rst | 2 +- doc/sphinx/source/userdoc/export.rst | 3 +- 5 files changed, 292 insertions(+), 293 deletions(-)
[Getfem-commits] [getfem-commits] fixmisspell updated (bf38e028 -> ed420f9d)
renard pushed a change to branch fixmisspell. from bf38e028 Update urls of translation project and documents add 3ae01b87 fix a memory leak add 8324be3a Remove invalid assertion add 91fb8d39 Fix GWFL inconsistency in slicing of tensors with single element leading dimensions add 1acbf2a3 Code simplifications add fb978924 Fix issue with internal variables and reduced fem add 4ff15ca9 Add finite strain plasticity examples with linear isotropic hardening add 7f934b53 Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/getfem add f60023bf Fix redundant integration points in projected_fem add 6af44d98 Fix empty response error in exported vtu files add 36bcd583 Fix memory leak due to lack of base class virtual destructor add dfb5b391 Print model variables categorized as variables, disabled variables and data add 56d8db12 A attempt for making diff working with interpolate transformations add 2f17bad1 Making work the directional derivative with interpolate transformation in a very special case add 4e663f58 Convert the planetary gear example to GWFL add 0604f61a minor change add 44045b41 minor change add 8eab6bfb use region in ref_elt_dim_of_mesh add 05989af4 Add projected_fem::projected_target_region() function add 9ac4e7f2 Add truss problem example add 0241496a Rename brick addition functions and new interface function for lumped mass brick add 11c409fa Change in the web site upload add 066eb842 Just code style changes add afd2d94d MPI fixes form model residual assembly add c41f5b87 MPI fixes for affine and linear terms in nonlinear model residual add bc309aa0 Fix the compile error of nbp in ubuntu20.04 add 2b5bbe33 Add quasi-linear viscoelasticity example (finite strain) add 39dc301e Deleting the obsolete class add 0e4a5740 More informative error messages add 31df9dba Fixing mistake introduced in SHA: 93ea20ccf0e03d841f600d928764a694a0047ab8 add 7b9740ef Minor changes add a105a274 Fix m4/ac_python_devel.m4 for Python3.10 add 5bff25b6 adding major and minor version numbers to arch_config add 57e5e2d4 Bug fix for fixed size test functions in constant matrices add 71eeed57 Minor changes add 4bb1fd6e Avoid passing unused references add 5f88efb4 Support element_K and element_B interpolates in GWFL add f6e4bf85 minor modification add 97aac8bf minor fix on matrix_j2 operator add baefd5d3 correction of tangent term of matrix_j2 add 1a8c1c22 Simple FSI example, still in progress new ed420f9d Merge remote-tracking branch 'origin/master' into fixmisspell Summary of changes: .gitignore | 3 + bin/upload_html| 7 - configure.ac | 4 + contrib/Makefile.am| 3 +- .../Makefile.am| 7 +- contrib/continuum_mechanics/QLV_viscoelasticity.py | 196 +++ ...ty_finite_strain_linear_hardening_tension_3D.py | 249 + ...strain_linear_hardening_tension_axisymmetric.py | 238 + ...strain_linear_hardening_tension_plane_strain.py | 236 + .../static_contact_planetary.py| 571 + doc/sphinx/Makefile.am | 5 +- doc/sphinx/source/userdoc/gasm_high.rst| 2 + .../source/userdoc/model_linear_elasticity.rst | 4 +- interface/src/gf_model_get.cc | 17 +- interface/src/gf_model_set.cc | 35 +- interface/src/matlab/gfm_common.c | 4 +- interface/tests/matlab-octave/demo_elasticity.m| 4 +- interface/tests/python/Makefile.am | 2 + interface/tests/python/check_export_vtu.py | 120 - .../python/demo_fluide_structure_interaction.py| 210 .../tests/python/demo_nonlinear_elasticity.py | 15 +- interface/tests/python/demo_truss.py | 108 interface/tests/python/demo_wave_equation.py | 11 + m4/ac_python_devel.m4 | 2 +- src/bgeot_geotrans_inv.cc | 34 +- src/getfem/getfem_export.h | 4 +- src/getfem/getfem_generic_assembly.h | 8 +- src/getfem/getfem_generic_assembly_semantic.h | 6 +- src/getfem/getfem_generic_assembly_tree.h | 2 + src/getfem/getfem_global_function.h| 2 +- src/getfem/getfem_im_list.h| 2 +- src/getfem/getfem_models.h | 15 +- src/getfem/getfem_projected_fem.h | 4 + src/getfem_export.cc | 109 ++-- src/getfem_generic_assembly_compile_and_exec.cc| 101 ++-- src/getfem_generic_assembly_semantic.cc| 182 +--
[Getfem-commits] (no subject)
branch: fixmisspell commit ed420f9d75595c8ec67665f7854f079ffd6d5924 Merge: bf38e028 1a8c1c22 Author: Renard Yves AuthorDate: Tue Jun 21 09:02:43 2022 +0200 Merge remote-tracking branch 'origin/master' into fixmisspell .gitignore | 3 + bin/upload_html| 7 - configure.ac | 4 + contrib/Makefile.am| 3 +- contrib/{ => continuum_mechanics}/Makefile.am | 20 +- contrib/continuum_mechanics/QLV_viscoelasticity.py | 196 +++ ...ty_finite_strain_linear_hardening_tension_3D.py | 249 + ...strain_linear_hardening_tension_axisymmetric.py | 238 + ...strain_linear_hardening_tension_plane_strain.py | 236 + .../static_contact_planetary.py| 571 + doc/sphinx/Makefile.am | 5 +- doc/sphinx/source/userdoc/gasm_high.rst| 2 + .../source/userdoc/model_linear_elasticity.rst | 4 +- interface/src/gf_model_get.cc | 17 +- interface/src/gf_model_set.cc | 35 +- interface/src/matlab/gfm_common.c | 4 +- interface/tests/matlab-octave/demo_elasticity.m| 4 +- interface/tests/python/Makefile.am | 2 + interface/tests/python/check_export_vtu.py | 120 - .../python/demo_fluide_structure_interaction.py| 210 .../tests/python/demo_nonlinear_elasticity.py | 15 +- interface/tests/python/demo_truss.py | 108 interface/tests/python/demo_wave_equation.py | 11 + m4/ac_python_devel.m4 | 2 +- src/bgeot_geotrans_inv.cc | 34 +- src/getfem/getfem_export.h | 4 +- src/getfem/getfem_generic_assembly.h | 8 +- src/getfem/getfem_generic_assembly_semantic.h | 6 +- src/getfem/getfem_generic_assembly_tree.h | 2 + src/getfem/getfem_global_function.h| 2 +- src/getfem/getfem_im_list.h| 2 +- src/getfem/getfem_models.h | 15 +- src/getfem/getfem_projected_fem.h | 4 + src/getfem_export.cc | 109 ++-- src/getfem_generic_assembly_compile_and_exec.cc| 101 ++-- src/getfem_generic_assembly_semantic.cc| 182 +-- src/getfem_generic_assembly_tree.cc| 17 +- src/getfem_generic_assembly_workspace.cc | 42 +- src/getfem_model_solvers.cc| 4 +- src/getfem_models.cc | 287 ++- src/getfem_nonlinear_elasticity.cc | 37 +- src/getfem_projected_fem.cc| 25 +- 42 files changed, 2203 insertions(+), 744 deletions(-)
[Getfem-commits] [getfem-commits] branch master updated: Simple FSI example, still in progress
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 1a8c1c22 Simple FSI example, still in progress 1a8c1c22 is described below commit 1a8c1c222c1c9cbbefa5844db34426695b809fa5 Author: Renard Yves AuthorDate: Tue Jun 21 09:00:49 2022 +0200 Simple FSI example, still in progress --- .../python/demo_fluide_structure_interaction.py| 210 + 1 file changed, 210 insertions(+) diff --git a/interface/tests/python/demo_fluide_structure_interaction.py b/interface/tests/python/demo_fluide_structure_interaction.py new file mode 100644 index ..0beef9cf --- /dev/null +++ b/interface/tests/python/demo_fluide_structure_interaction.py @@ -0,0 +1,210 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Python GetFEM interface +# +# Copyright (C) 2015 Konstantinos Poulios. +# +# This file is a part of GetFEM +# +# GetFEM is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version along with the GCC Runtime Library +# Exception either version 3.1 or (at your option) any later version. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License and GCC Runtime Library Exception for more details. +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# + + +""" Incompressible Navier-Stokes fluid in interaction with a ball in a cavity. + Middle point scheme for the fluid, Verlet scheme for the ball (not the + best but can of course be changed) + + This program is used to check that python-getfem is working. This is also + a good example of use of GetFEM. +""" + +import os +import numpy as np +import getfem as gf +gf.util('trace level', 0) + +# TODO +# 4 - Faire le schéma en temps pour la balle +# 5 - Nitsche pour le Dirichlet fluide sur le pourtour de la balle +# (pénalisation de l'intrieur, un peu) +# 6 - possiblité de couplage total avec schéma implicite ? +# 7 - Dessin ? couper éventuellement (ou pas). Vorticité ? + +# Phisical parameters (à ajuster pour être physique ...) +nu = 0.002# cinematic viscosity +rho = 1. # Fluid density +mu = rho * nu # dynamic viscosity +g = 9.81 # gravity +in_velocity = 1. # in velocity at the center bottom +ball_radius = 0.1 +ball_mass = 0.035 +ball_init_pos = [0, 0.2] + +# Time discretization parameters +dt = 0.01 +T = 5. + +# Geometry and Mesh of the cavity +W1 = 0.1 # +W2 = 0.45 # H2 |_ _| +W = W1+2.*W2 # || +H1 = 0.95 # || +H2 = 0.05 # H1 || +H = H2+H1 # || + # ||__|| + #W2 W1 W2 +NH = 40 +NW = 40 +DH = H / NH; DW = W / NW; +print("Number of elements: ", W1/DW, W2/DW, H1/DH, H2/DH) +if (abs(W1 / DW - round(W1/DW)) + abs(W2 / DW - round(W2/DW)) ++ abs(H1 / DH - round(H1/DH)) + abs(H2 / DH != round(H2/DH)) > 1E-8) : + print("Discretization error"); exit(1) + +out_velocity = W1*in_velocity / (2.*H2); +Reynold = rho*in_velocity*H/mu +print("Reynold = ", Reynold) + +geotrans = "GT_QK(2,2)" +m = gf.Mesh("import", "structured", +"GT='%s';ORG=[%f,%f];SIZES=[%f,%f];NSUBDIV=[%i,%i]" +% (geotrans, -W/2., 0., W, H, NW, NH)) + +# Mesh regions (can be imported from a gmsh file for instance) +IN_RG = 1 +OUT_RG1 = 2 +OUT_RG2 = 3 +WALL_RG = 4 +in_rg = m.outer_faces_in_box([-W1/2.-1e-8,-1e-8],[W1/2+1e-8,1e-8]) +out_rg1 = m.outer_faces_in_box([-W/2.-1e-8,H1-1e-8],[-W/2+1e-8,H+1e-8]) +out_rg2 = m.outer_faces_in_box([W/2.-1e-8,H1-1e-8],[W/2+1e-8,H+1e-8]) +wall_rg = m.outer_faces() +m.set_region(IN_RG, in_rg) +m.set_region(OUT_RG1, out_rg1) +m.set_region(OUT_RG2, out_rg2) +m.set_region(WALL_RG, wall_rg) +m.region_subtract(WALL_RG, IN_RG) +m.region_subtract(WALL_RG, OUT_RG1) +m.region_subtract(WALL_RG, OUT_RG2) + +# Finite element spaces and integration methods +mfv_ = gf.MeshFem(m, 2) +mfv_.set_classical_fem(2) + +#Il faudra éliminer les ddl sous la balle pour v et p +#kept_dofs = np.setdiff1d(np.arange(mfv_.nb_basic_dof()), +# mfv_.basic_dof_on_region(WALL_RG)) +#mfv = gf.MeshFem("partial", mfv_, kept_dofs) + +mfp_ = gf.MeshFem(m, 1) +mfp_.set_classical_fem(1) +# kept_dofs =
[Getfem-commits] [getfem-commits] branch master updated: correction of tangent term of matrix_j2
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new baefd5d3 correction of tangent term of matrix_j2 baefd5d3 is described below commit baefd5d34aaf3e18e4b80c1690be9120c3332e8f Author: Renard Yves AuthorDate: Tue Jun 14 13:54:50 2022 +0200 correction of tangent term of matrix_j2 --- .../tests/python/demo_nonlinear_elasticity.py | 15 ++ src/getfem_nonlinear_elasticity.cc | 34 ++ 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/interface/tests/python/demo_nonlinear_elasticity.py b/interface/tests/python/demo_nonlinear_elasticity.py index f3aae75d..4a8074a6 100644 --- a/interface/tests/python/demo_nonlinear_elasticity.py +++ b/interface/tests/python/demo_nonlinear_elasticity.py @@ -30,13 +30,15 @@ gf.util_trace_level(1) dirichlet_version = 2 # 1 = simplification, 2 = penalisation test_tangent_matrix = False# Test or not tangent system validity -incompressible = False;# Incompressibility option -explicit_potential = False;# Elasticity law with explicit potential +incompressible = False # Incompressibility option +explicit_potential = False # Elasticity law with explicit potential # lawname = 'Ciarlet Geymonat' # params = [1.,1.,0.25] -lawname = 'SaintVenant Kirchhoff' -params = [1.,1.] +# lawname = 'SaintVenant Kirchhoff' +# params = [1.,1.] +lawname = 'Compressible Mooney Rivlin' +params = [1.,1.,2.] if (incompressible): lawname = 'Incompressible Mooney Rivlin' params = [1.,1.] @@ -89,10 +91,11 @@ else: md.add_macro('be_', 'Left_Cauchy_Green(F_)') md.add_initialized_data('K', [K]) md.add_initialized_data('mu', [mu]) +md.add_initialized_data('paramsIMR', [1,1,2]) _expr_1 = "(K/2)*sqr(log(J_))+(mu/2)*(Matrix_j1(be_)-3)"; _expr_2 = "(K/2)*sqr(log(J_))+(mu/2)*(pow(Det(be_),-1./3.)*Trace(be_)-3)" -md.add_nonlinear_term(mim, _expr_2); - +_expr_3 = "paramsIMR(1)*(Matrix_j1(Right_Cauchy_Green(F_))-3)+ paramsIMR(2)*(Matrix_j2(Right_Cauchy_Green(F_)) - 3)+paramsIMR(3)*sqr(J_-1)" +md.add_nonlinear_term(mim, _expr_3); # md.add_nonlinear_term(mim, 'sqr(Trace(Green_Lagrangian(Id(meshdim)+Grad_u)))/8 + Norm_sqr(Green_Lagrangian(Id(meshdim)+Grad_u))/4') # md.add_nonlinear_term(mim, '((Id(meshdim)+Grad_u)*(params(1)*Trace(Green_Lagrangian(Id(meshdim)+Grad_u))*Id(meshdim)+2*params(2)*Green_Lagrangian(Id(meshdim)+Grad_u))):Grad_Test_u') diff --git a/src/getfem_nonlinear_elasticity.cc b/src/getfem_nonlinear_elasticity.cc index 8dc3a8ef..fbfd1a80 100644 --- a/src/getfem_nonlinear_elasticity.cc +++ b/src/getfem_nonlinear_elasticity.cc @@ -1315,12 +1315,12 @@ namespace getfem { for (size_type i = 0; i < N; ++i) for (size_type j = 0; j < N; ++j) tr2 += t[i+ j*N] * t[j + i*N]; - result[0] = (tr*tr - tr2)/2; + result[0] = (tr*tr-tr2)/scalar_type(2); } // Derivative : Trace(M)I - M^T void derivative(const arg_list , size_type, -base_tensor ) const { // to be verified +base_tensor ) const { size_type N = args[0]->sizes()[0]; const base_tensor = *args[0]; scalar_type tr = scalar_type(0); @@ -1334,7 +1334,7 @@ namespace getfem { // Second derivative : I@I - \delta_{il}\delta_{jk} void second_derivative(const arg_list , size_type, size_type, - base_tensor ) const { // To be verified + base_tensor ) const { size_type N = args[0]->sizes()[0]; gmm::clear(result.as_vector()); for (size_type i = 0; i < N; ++i) @@ -1371,7 +1371,7 @@ namespace getfem { // Derivative : (I-Trace(M)*M^{-T}/3)/(det(M)^1/3) void derivative(const arg_list , size_type, -base_tensor ) const { // to be verified +base_tensor ) const { size_type N = args[0]->sizes()[0]; base_matrix M(N, N); gmm::copy(args[0]->as_vector(), M.as_vector()); @@ -1393,7 +1393,7 @@ namespace getfem { // Second derivative : (-M^{-T}@I + Trace(M)*M^{-T}_{ik}M^{-T}_{lj} // -I@M^{-T} + Trace(M)*M^{-T}@M^{-T}/3)/(3det(M)^1/3) void second_derivative(const arg_list , size_type, size_type, - base_tensor ) const { // To be verified + base_tensor ) const { size_type N = args[0]->sizes()[0]; base_matrix M(N, N); gmm::copy(args[0]->as_vector(), M.as_vector()); @@ -1440,7 +1440,6 @@ namespace getfem { tr2 += M(i,j)*M(j,i); scalar_type i2 = (tr*tr-tr2)/scalar_type(2); scalar_type det = bgeot::lu_det(&(*(M.begin())), N); - if (det > 0) result[0] = i2 / pow(det, scalar_type(2)/scalar_type(3)); else @@ -1449,7 +1448,7 @@ namespace getfem { //
[Getfem-commits] [getfem-commits] branch master updated: minor fix on matrix_j2 operator
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 97aac8bf minor fix on matrix_j2 operator 97aac8bf is described below commit 97aac8bfb35da839043bd43396361589544e4022 Author: Renard Yves AuthorDate: Mon Jun 13 15:46:09 2022 +0200 minor fix on matrix_j2 operator --- src/getfem_nonlinear_elasticity.cc | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/getfem_nonlinear_elasticity.cc b/src/getfem_nonlinear_elasticity.cc index 42581611..8dc3a8ef 100644 --- a/src/getfem_nonlinear_elasticity.cc +++ b/src/getfem_nonlinear_elasticity.cc @@ -221,8 +221,7 @@ namespace getfem { const base_matrix _ = grad_i2(); const base_matrix _ = grad_i3(); scalar_type coeff1 = scalar_type(2) / (scalar_type(3)*i3()); - scalar_type coeff2 = scalar_type(5) * coeff1 * coeff1 * i2() - / scalar_type(2); + scalar_type coeff2 = scalar_type(5)*coeff1*coeff1*i2() / scalar_type(2); ddj2 = sym_grad_grad_i2(); gmm::add(gmm::scaled(sym_grad_grad_i3().as_vector(), -i2() * coeff1), ddj2.as_vector()); @@ -1467,7 +1466,7 @@ namespace getfem { for (size_type j = 0; j < N; ++j) for (size_type i = 0; i < N; ++i, ++it) *it = (((i == j) ? tr : scalar_type(0)) - t[j+N*i] - - scalar_type(2)*i2*M(j,i)/scalar_type(3)) + - scalar_type(2)*i2*M(j,i)/(det*scalar_type(3))) / pow(det, scalar_type(2)/scalar_type(3)); GMM_ASSERT1(it == result.end(), "Internal error"); } @@ -1494,11 +1493,11 @@ namespace getfem { for (size_type i = 0; i < N; ++i, ++it) *it = ( ((i==j) ? 1. : 0.) * ((k==l) ? 1. : 0.) - ((i==l) ? 1. : 0.) * ((k==j) ? 1. : 0.) - - 2.*tr*M(j,i)*((k==l) ? 1. : 0.)/3. - + 2.*tr*M(j,i)*M(l,k)/3. - - 2.*i2*M(i,k)*M(l,j)/3. + - 2.*tr*M(j,i)*((k==l) ? 1. : 0.)/(3.*det) + + 2.*tr*M(j,i)*M(l,k)/(3.*det) + - 2.*i2*M(i,k)*M(l,j)/(3.*det) - 2.*((tr*((i==j) ? 1. : 0.))-t[j+N*i] -- 2.*i2*M(j,i)/3)*M(l,k)/3.) +- 2.*i2*M(j,i)/(3.*det))*M(l,k)/(3.*det)) / pow(det, scalar_type(2)/scalar_type(3)); } };
[Getfem-commits] (no subject)
branch: master commit f6e4bf85984fdeeb5952a39c5c0707dbad19ead2 Author: Renard Yves AuthorDate: Fri May 27 17:50:06 2022 +0200 minor modification --- doc/sphinx/source/userdoc/gasm_high.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/sphinx/source/userdoc/gasm_high.rst b/doc/sphinx/source/userdoc/gasm_high.rst index 8d4e9bab..e556fa01 100644 --- a/doc/sphinx/source/userdoc/gasm_high.rst +++ b/doc/sphinx/source/userdoc/gasm_high.rst @@ -750,6 +750,8 @@ Once a transformation is defined in the workspace/model, one can interpolate a v Interpolate(Normal, transname) Interpolate(X, transname) + Interpolate(element_K, transname) + Interpolate(element_B, transname) Interpolate(u, transname) Interpolate(Grad_u, transname) Interpolate(Div_u, transname)
[Getfem-commits] [getfem-commits] master updated (57e5e2d4 -> f6e4bf85)
renard pushed a change to branch master. from 57e5e2d4 Bug fix for fixed size test functions in constant matrices add 71eeed57 Minor changes add 4bb1fd6e Avoid passing unused references add 5f88efb4 Support element_K and element_B interpolates in GWFL new f6e4bf85 minor modification Summary of changes: doc/sphinx/source/userdoc/gasm_high.rst | 2 ++ src/getfem/getfem_generic_assembly_tree.h | 2 ++ src/getfem_generic_assembly_compile_and_exec.cc | 48 - src/getfem_generic_assembly_semantic.cc | 42 +- src/getfem_generic_assembly_tree.cc | 14 ++-- 5 files changed, 88 insertions(+), 20 deletions(-)
[Getfem-commits] [getfem-commits] branch devel-logari81-interpolate-element-matrices deleted (was 5f88efb4)
renard pushed a change to branch devel-logari81-interpolate-element-matrices. was 5f88efb4 Support element_K and element_B interpolates in GWFL The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[Getfem-commits] [getfem-commits] branch master updated: adding major and minor version numbers to arch_config
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 5bff25b6 adding major and minor version numbers to arch_config 5bff25b6 is described below commit 5bff25b6fae9bf389f9f7cc971202175b06f90a1 Author: Renard Yves AuthorDate: Mon May 2 16:49:24 2022 +0200 adding major and minor version numbers to arch_config --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 14fb3708..d9ae16b0 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,9 @@ AC_INIT(getfem, 5.4.1) MAJOR_VERSION="5" MINOR_VERSION="4" PATCH_VERSION="1" +AC_DEFINE_UNQUOTED([MAJOR_VERSION],$MAJOR_VERSION,[Major version number]) +AC_DEFINE_UNQUOTED([MINOR_VERSION],$MINOR_VERSION,[Minor version number]) +AC_DEFINE_UNQUOTED([PATCH_VERSION],$PATCH_VERSION,[Patch version number]) AC_CONFIG_SRCDIR([install-sh]) AC_CONFIG_MACRO_DIR([m4])
[Getfem-commits] [getfem-commits] master updated (7b9740ef -> a105a274)
renard pushed a change to branch master. from 7b9740ef Minor changes add a105a274 Fix m4/ac_python_devel.m4 for Python3.10 No new revisions were added by this update. Summary of changes: m4/ac_python_devel.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[Getfem-commits] [getfem-commits] branch master updated: Deleting the obsolete class
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 39dc301 Deleting the obsolete class 39dc301 is described below commit 39dc301e4328a63be0d253e91ecc391e47fbfa10 Author: Yves Renard AuthorDate: Fri Dec 10 16:13:39 2021 +0100 Deleting the obsolete class --- interface/src/matlab/gfm_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/matlab/gfm_common.c b/interface/src/matlab/gfm_common.c index 8ac129c..d1581c6 100644 --- a/interface/src/matlab/gfm_common.c +++ b/interface/src/matlab/gfm_common.c @@ -42,7 +42,7 @@ mxClassID2string(mxClassID id) { case mxUINT32_CLASS: return "UINT32"; case mxINT64_CLASS: return "INT64"; case mxUINT64_CLASS: return "UINT64"; -case mxSPARSE_CLASS: return "SPARSE"; + // case mxSPARSE_CLASS: return "SPARSE"; // Deprecated #ifdef LOGICAL_IS_A_TYPE case mxLOGICAL_CLASS: return "LOGICAL"; #endif @@ -104,7 +104,7 @@ mxarray_to_gfi_array(const mxArray *mx, gfi_array *t) t->storage.gfi_storage_u.data_uint32.data_uint32_len = n; t->storage.gfi_storage_u.data_uint32.data_uint32_val = mxGetData(mx); } break; -case mxSPARSE_CLASS: /* for older (i.e. 6.1) matlab versions... */ + // case mxSPARSE_CLASS: /* for older (i.e. 6.1) matlab versions. deprecated*/ case mxDOUBLE_CLASS: { int is_complex = mxIsComplex(mx);
[Getfem-commits] [getfem-commits] branch devel-tetsuo-2to3check deleted (was d33eb66)
renard pushed a change to branch devel-tetsuo-2to3check. was d33eb66 Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/getfem into devel-tetsuo-2to3check The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[Getfem-commits] [getfem-commits] branch phuoc deleted (was ff4b4ca)
renard pushed a change to branch phuoc. was ff4b4ca Revise vtk import code (not tested) This change permanently discards the following revisions: discard ff4b4ca Revise vtk import code (not tested) discard 3670b70 FIXED 2-space indentation discard b7d49c1 Import vtk mesh working well discard 8fd8d62 ADDED import vtk mesh
[Getfem-commits] [getfem-commits] branch ignore_empty_integration_points deleted (was d5cebf0)
renard pushed a change to branch ignore_empty_integration_points. was d5cebf0 Use consistent type. The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[Getfem-commits] [getfem-commits] branch devel-franz deleted (was 515905d)
renard pushed a change to branch devel-franz. was 515905d Pyramid element (in progress) The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[Getfem-commits] [getfem-commits] branch touched_region_for_projected_fem deleted (was b293efb)
renard pushed a change to branch touched_region_for_projected_fem. was b293efb improving naming This change permanently discards the following revisions: discard b293efb improving naming discard 3c95fe3 comment spelling discard 9c0058d less auto discard e13a082 projected_fem::touched_target_region()
Re: [Getfem-commits] please merge branch devel-tetsuo-add_lumped_mass_python_interface_squash
Dear Tetsuo, I also think that these name changes are convenient. Best regards, Yves On 10/04/2021 06:57, Tetsuo Koyama wrote: Dear Kostas and Yves @Kostas Thank you for your comment. It is a good point. I am a fan of adding brick at the end of the methods. add_isotropic_linearized_elasticity_pstrain_brick add_isotropic_linearized_elasticity_pstrain_brick add_lumped_mass_for_first_order_brick If you don't mind I will fix the name of these methods in this branch. Best regards Tetsuo 2021年4月10日(土) 4:24 Konstantinos Poulios <mailto:logar...@googlemail.com>>: Dear Tetsuo and Yves @Tetsuo thanks for this interface functions. I would like to use this opportunity to discuss about the word "brick" in the naming of our functions adding PDE term matrices. Traditionally, "brick" was only used at the end of the function name. More recently, Yves started skipping "brick" from some of the newer terms, which I think is fine. Now we have a mix with names including "brick" and some without. Apart from that, there are 3 functions that do not follow the old naming convention at all: |add_isotropic_linearized_elasticity_brick_pstrain |add_isotropic_linearized_elasticity_brick_pstrain |add_lumped_mass_brick_for_first_order||| I would like to avoid this kind of inconsistencies in the naming so that all functions for adding a PDE matrix either have "brick" at the end of their name or that they do not include it at all. For Tetsuo's function I would suggest one of add_lumped_mass_matrix_for_first_order add_lumped_mass_for_first_order_brick Both in c++ and the interfaces. What do you think? Best regards Kostas On Fri, Apr 9, 2021 at 11:23 AM Tetsuo Koyama mailto:tkoyama...@gmail.com>> wrote: Dear GetFEM project I added the lumped mass for first order to the python interface. Could you merge devel-tetsuo-add_lumped_mass_python_interface_squash ? BR Tetsuo -- Yves Renard (yves.ren...@insa-lyon.fr) tel : (33) 04.72.43.87.08 INSA-Lyon 20, rue Albert Einstein 69621 Villeurbanne Cedex, FRANCE http://math.univ-lyon1.fr/~renard -
Re: [Getfem-commits] (no subject)
Dear Tetsuo, Thank you for this additional test program on a truss problem. I integrated it to the master branch. Best regards, Yves On 21/03/2021 05:43, Tetsuo Koyama wrote: branch: devel-tetsuo-add-truss-element-squash commit 9ac4e7f2fecd7cd6bdf1a390a12d7902ca6d4771 Author: Tetsuo Koyama AuthorDate: Sun Mar 21 13:41:38 2021 +0900 Add truss problem example --- interface/tests/python/Makefile.am | 2 + interface/tests/python/demo_truss.py | 108 +++ 2 files changed, 110 insertions(+) diff --git a/interface/tests/python/Makefile.am b/interface/tests/python/Makefile.am index 813753e..c17f64b 100644 --- a/interface/tests/python/Makefile.am +++ b/interface/tests/python/Makefile.am @@ -43,6 +43,7 @@ EXTRA_DIST= \ demo_plasticity.py \ demo_plate.py \ demo_unit_disk.py \ +demo_truss.py \ demo_static_contact.py \ demo_dynamic_contact_1D.py \ demo_Mindlin_Reissner_plate.py \ @@ -71,6 +72,7 @@ TESTS = \ check_asm.py\ check_secondary_domain.py \ check_mixed_mesh.py \ + demo_truss.py \ demo_wave.py\ demo_wave_equation.py \ demo_laplacian.py \ diff --git a/interface/tests/python/demo_truss.py b/interface/tests/python/demo_truss.py new file mode 100644 index 000..2f5fb07 --- /dev/null +++ b/interface/tests/python/demo_truss.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Python GetFEM interface +# +# Copyright (C) 2021-2021 Tetsuo Koyama. +# +# This file is a part of GetFEM +# +# GetFEM is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +# + +""" 1D Truss problem test + + This program is used to check that python-getfem is working. This is + also a good example of use of python-getfem.. + + |-> x +//|EA |-> u0 +//|-+-+=> P +//| + |<---L--->|<---L--->| + + Exact solution of displacement u0 is u0 = (P*x)/(E*A). + + $Id$ +""" +import getfem as gf +import numpy as np + +# +# Physical parameters +# +E = 21E6 # Young Modulus (N/cm^2) +A = 9000.0 # Section Area (cm^2) +L = 2000.0 # Length of element (cm) +P = 200.0 # Force (N) + +# +# Numerical parameters +# + +elements_degree = 1 # Degree of the finite element methods + +# +# Mesh generation. +# +mesh = gf.Mesh("cartesian", np.array([0, L, 2*L])) + +# +# Boundary selection +# + +fleft = mesh.outer_faces_with_direction(v=[-1.0], angle=0.01) +fright = mesh.outer_faces_with_direction(v=[+1.0], angle=0.01) +NEUMANN_BOUNDARY = 1 +DIRICHLET_BOUNDARY = 2 +mesh.set_region(NEUMANN_BOUNDARY, fright) +mesh.set_region(DIRICHLET_BOUNDARY, fleft) +# +# Definition of finite elements methods and integration method +# + +mfu = gf.MeshFem(mesh, 1) # Finite element for the elastic displacement +mfu.set_classical_fem(elements_degree) +mim = gf.MeshIm(mesh, elements_degree*2) # Integration method + +# +# Model definition +# + +md = gf.Model("real") +md.add_fem_variable("u", mfu) # Displacement of the structure + +# Truss problem +md.add_initialized_data("D", [E*A]) +md.add_generic_elliptic_brick(mim, "u", "D") + +F = mfu.eval(str(P)) +md.add_initialized_fem_data("ForceData", mfu, F) +md.add_source_term_brick(mim, "u", "ForceData", NEUMANN_BOUNDARY) + +md.add_Dirichlet_condition_with_multipliers(mim, "u", elements_degree - 1, DIRICHLET_BOUNDARY) + +# +# Model solve +# +md.solve() + + +# +# Solution export +# +U = md.variable("u") + +# Interpolate the exact solution (Assuming mfu is a Lagrange fem)
[Getfem-commits] [getfem-commits] branch master updated: use region in ref_elt_dim_of_mesh
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 8eab6bf use region in ref_elt_dim_of_mesh 8eab6bf is described below commit 8eab6bfb23b19b3a0ff44f846079907ab073557c Author: Yves Renard AuthorDate: Tue Mar 9 17:47:34 2021 +0100 use region in ref_elt_dim_of_mesh --- src/getfem/getfem_generic_assembly_semantic.h | 6 +++--- src/getfem_generic_assembly_compile_and_exec.cc | 10 +- src/getfem_generic_assembly_semantic.cc | 4 ++-- src/getfem_generic_assembly_workspace.cc| 16 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/getfem/getfem_generic_assembly_semantic.h b/src/getfem/getfem_generic_assembly_semantic.h index 8685524..f3daf1f 100644 --- a/src/getfem/getfem_generic_assembly_semantic.h +++ b/src/getfem/getfem_generic_assembly_semantic.h @@ -105,9 +105,9 @@ namespace getfem { const std::string ); // Function of internal use - inline size_type ref_elt_dim_of_mesh(const mesh ) { -return m.convex_index().card() ? - m.trans_of_convex(m.convex_index().first())->dim() : size_type(0); + inline size_type ref_elt_dim_of_mesh(const mesh , const mesh_region ) { +auto v = getfem::mr_visitor(rg, m, true); +return v.finished() ? size_type(0) : m.trans_of_convex(v.cv())->dim(); } diff --git a/src/getfem_generic_assembly_compile_and_exec.cc b/src/getfem_generic_assembly_compile_and_exec.cc index 2a49bdb..3d80cc2 100644 --- a/src/getfem_generic_assembly_compile_and_exec.cc +++ b/src/getfem_generic_assembly_compile_and_exec.cc @@ -7292,7 +7292,7 @@ namespace getfem { const mesh *m = td.m; GMM_ASSERT1(m, "Internal error"); ga_semantic_analysis(gis.trees.back(), workspace, *m, - ref_elt_dim_of_mesh(*m), true, false); + ref_elt_dim_of_mesh(*m, *(td.rg)), true, false); pga_tree_node root = gis.trees.back().root; if (root) { // Compile tree @@ -7374,8 +7374,8 @@ namespace getfem { continue; ga_tree tree(*(td.ptree)); // temporary tree (not used later) ga_semantic_analysis(tree, workspace, td.mim->linked_mesh(), - ref_elt_dim_of_mesh(td.mim->linked_mesh()), - true, false); + ref_elt_dim_of_mesh(td.mim->linked_mesh(),*(td.rg)), +true, false); pga_tree_node root = tree.root; if (root) { const bool @@ -7478,8 +7478,8 @@ namespace getfem { trees.push_back(*(td.ptree)); // Semantic analysis mainly to evaluate fixed size variables and data ga_semantic_analysis(trees.back(), workspace, td.mim->linked_mesh(), - ref_elt_dim_of_mesh(td.mim->linked_mesh()), - true, false); + ref_elt_dim_of_mesh(td.mim->linked_mesh(),*(td.rg)), +true, false); pga_tree_node root = trees.back().root; if (root) { // Compile tree diff --git a/src/getfem_generic_assembly_semantic.cc b/src/getfem_generic_assembly_semantic.cc index dbb9029..ce38aaa 100644 --- a/src/getfem_generic_assembly_semantic.cc +++ b/src/getfem_generic_assembly_semantic.cc @@ -4044,11 +4044,11 @@ namespace getfem { ga_tree trans_tree; ga_read_string(expr_trans, trans_tree, workspace.macro_dictionary()); ga_semantic_analysis(trans_tree, workspace, m, - ref_elt_dim_of_mesh(m), false, false, 1); + ref_elt_dim_of_mesh(m, -1), false, false, 1); if (trans_tree.root) { ga_node_grad(trans_tree, workspace, m, trans_tree.root); ga_semantic_analysis(trans_tree, workspace, m, - ref_elt_dim_of_mesh(m), false, false, 1); + ref_elt_dim_of_mesh(m, -1), false, false, 1); GMM_ASSERT1(trans_tree.root->tensor().sizes().size() == 2, "Problem in transformation" << tname); diff --git a/src/getfem_generic_assembly_workspace.cc b/src/getfem_generic_assembly_workspace.cc index 2fa936f..38f36ef 100644 --- a/src/getfem_generic_assembly_workspace.cc +++ b/src/getfem_generic_assembly_workspace.cc @@ -492,7 +492,7 @@ namespace getfem { ftree.root->children.resize(2, nullptr); ftree.copy_node(tree.root, ftree.root, ftree.root->children[1]); ga_semantic_analysis(ftree, *this, m, - ref_elt_dim_of_mesh(m), false, function_expr); + ref_elt_dim_of_mesh(m,rg), false, function_expr); found = true;
[Getfem-commits] (no subject)
branch: master commit 44045b410513fd4b493db8dc6b861e6fc7b82a4f Author: Yves Renard AuthorDate: Tue Feb 16 09:56:13 2021 +0100 minor change --- .gitignore| 1 + src/bgeot_geotrans_inv.cc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ad82f14..5ab869d 100644 --- a/.gitignore +++ b/.gitignore @@ -171,6 +171,7 @@ Makefile /interface/src/scilab/src/c/loader.sce /interface/src/scilab/unloader.sce /interface/tests/python/*.pyc +/interface/tests/python/*.vtu /doc/sphinx/tools/ /doc/sphinx/source/scilab/cmdref* /doc/sphinx/source/python/cmdref* diff --git a/src/bgeot_geotrans_inv.cc b/src/bgeot_geotrans_inv.cc index 88eb6b4..3f0ff7e 100644 --- a/src/bgeot_geotrans_inv.cc +++ b/src/bgeot_geotrans_inv.cc @@ -226,8 +226,8 @@ namespace bgeot double factor = 1.0; base_node x0_real(N); -while (res > IN_EPS/1000.) { - if ((gmm::abs(res - res0) < IN_EPS/1000.) || (factor < IN_EPS)) { +while (res > IN_EPS/100.) { + if ((gmm::abs(res - res0) < IN_EPS/100.) || (factor < IN_EPS)) { converged = false; return point_in_convex(*pgt, x, res, IN_EPS); }
[Getfem-commits] [getfem-commits] master updated (4e663f5 -> 44045b4)
renard pushed a change to branch master. from 4e663f5 Convert the planetary gear example to GWFL new 0604f61 minor change new 44045b4 minor change Summary of changes: .gitignore| 1 + src/bgeot_geotrans_inv.cc | 10 -- 2 files changed, 5 insertions(+), 6 deletions(-)
[Getfem-commits] (no subject)
branch: master commit 0604f61a5799d34a574158d14ae708cda3af2c41 Author: Yves Renard AuthorDate: Tue Feb 16 09:45:46 2021 +0100 minor change --- src/bgeot_geotrans_inv.cc | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/bgeot_geotrans_inv.cc b/src/bgeot_geotrans_inv.cc index 8546355..88eb6b4 100644 --- a/src/bgeot_geotrans_inv.cc +++ b/src/bgeot_geotrans_inv.cc @@ -191,9 +191,8 @@ namespace bgeot bool /* throw_except */, bool project_into_element) { converged = true; - base_node x0_ref(P), diff(N); - + { // find initial guess x0_ref = pgt->geometric_nodes()[0]; scalar_type res = gmm::vect_dist2(mat_col(G, 0), xreal); @@ -220,15 +219,15 @@ namespace bgeot if (res < IN_EPS) x *= 0.999888783; // For pyramid element to avoid the singularity } - + add(pgt->transform(x, G), gmm::scaled(xreal, -1.0), diff); auto res = gmm::vect_norm2(diff); auto res0 = std::numeric_limits::max(); double factor = 1.0; base_node x0_real(N); -while (res > IN_EPS) { - if ((gmm::abs(res - res0) < IN_EPS) || (factor < IN_EPS)) { +while (res > IN_EPS/1000.) { + if ((gmm::abs(res - res0) < IN_EPS/1000.) || (factor < IN_EPS)) { converged = false; return point_in_convex(*pgt, x, res, IN_EPS); } @@ -251,7 +250,6 @@ namespace bgeot add(x0_real, gmm::scaled(xreal, -1.0), diff); res = gmm::vect_norm2(diff); } - return point_in_convex(*pgt, x, res, IN_EPS); }
[Getfem-commits] [getfem-commits] branch master updated: Making work the directional derivative with interpolate transformation in a very special case
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 2f17bad Making work the directional derivative with interpolate transformation in a very special case 2f17bad is described below commit 2f17bad1068571c33123aadbdbba5dd2ffa532a0 Author: Yves Renard AuthorDate: Sun Jan 10 20:11:44 2021 +0100 Making work the directional derivative with interpolate transformation in a very special case --- .gitignore | 1 + src/getfem_generic_assembly_semantic.cc | 41 +++-- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 3dc5d59..ad82f14 100644 --- a/.gitignore +++ b/.gitignore @@ -299,6 +299,7 @@ Makefile /contrib/xfem_contact/xfem_dirichlet /contrib/xfem_contact/xfem_stokes /contrib/xfem_stab_unilat_contact/xfem_stab_unilat_contact +/contrib/continuum_mechanics/results/ /interface/tests/*/*.vtk /interface/tests/*/*.pos /interface/tests/*/*.dx diff --git a/src/getfem_generic_assembly_semantic.cc b/src/getfem_generic_assembly_semantic.cc index b2df289..dbb9029 100644 --- a/src/getfem_generic_assembly_semantic.cc +++ b/src/getfem_generic_assembly_semantic.cc @@ -257,28 +257,45 @@ namespace getfem { break; case GA_NODE_INTERPOLATE_VAL_TEST: case GA_NODE_INTERPOLATE_GRAD_TEST: case GA_NODE_INTERPOLATE_HESS_TEST: case GA_NODE_INTERPOLATE_DIVERG_TEST: -GMM_ASSERT1(false, -"Sorry, directional derivative do not work for the moment " -"with interpolate transformations. Future work."); +if (pexpr->node_type == GA_NODE_VAL_TEST) { + pnode->name = pexpr->name; +} else { + GMM_ASSERT1(false, + "Sorry, directional derivative do not work for the " + "moment with interpolate transformations. Future work."); +} case GA_NODE_ELEMENTARY_VAL_TEST: case GA_NODE_ELEMENTARY_GRAD_TEST: case GA_NODE_ELEMENTARY_HESS_TEST: case GA_NODE_ELEMENTARY_DIVERG_TEST: -GMM_ASSERT1(false, -"Sorry, directional derivative do not work for the moment " -"with elementary transformations. Future work."); +if (pexpr->node_type == GA_NODE_VAL_TEST) { + pnode->name = pexpr->name; +} else { + GMM_ASSERT1(false, + "Sorry, directional derivative do not work for the " + "moment with elementary transformations. Future work."); +} case GA_NODE_SECONDARY_DOMAIN_VAL_TEST: case GA_NODE_SECONDARY_DOMAIN_GRAD_TEST: case GA_NODE_SECONDARY_DOMAIN_HESS_TEST: case GA_NODE_SECONDARY_DOMAIN_DIVERG_TEST: -GMM_ASSERT1(false, -"Sorry, directional derivative do not work for the moment " -"with secondary domains. Future work."); +if (pexpr->node_type == GA_NODE_VAL_TEST) { + pnode->name = pexpr->name; +} else { + GMM_ASSERT1(false, + "Sorry, directional derivative do not work for the " + "moment with secondary domains. Future work."); +} case GA_NODE_XFEM_PLUS_VAL_TEST: case GA_NODE_XFEM_PLUS_GRAD_TEST: case GA_NODE_XFEM_PLUS_HESS_TEST: case GA_NODE_XFEM_PLUS_DIVERG_TEST: case GA_NODE_XFEM_MINUS_VAL_TEST: case GA_NODE_XFEM_MINUS_GRAD_TEST: case GA_NODE_XFEM_MINUS_HESS_TEST: case GA_NODE_XFEM_MINUS_DIVERG_TEST: -GMM_ASSERT1(false, -"Sorry, directional derivative do not work for the moment " -"with Xfem_plus and Xfem_minus operations. Future work."); +if (pexpr->node_type == GA_NODE_VAL_TEST) { + pnode->name = pexpr->name; +} else { + GMM_ASSERT1(false, + "Sorry, directional derivative do not work for the " + "moment with Xfem_plus and Xfem_minus operations. " + "Future work."); +} default: break; } }
[Getfem-commits] [getfem-commits] branch master updated: A attempt for making diff working with interpolate transformations
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 56d8db1 A attempt for making diff working with interpolate transformations 56d8db1 is described below commit 56d8db12077ba5f813223561387309537030e9ed Author: Yves Renard AuthorDate: Sun Jan 10 17:26:48 2021 +0100 A attempt for making diff working with interpolate transformations --- src/getfem_generic_assembly_semantic.cc | 86 + 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/src/getfem_generic_assembly_semantic.cc b/src/getfem_generic_assembly_semantic.cc index 2cf6b18..b2df289 100644 --- a/src/getfem_generic_assembly_semantic.cc +++ b/src/getfem_generic_assembly_semantic.cc @@ -35,7 +35,7 @@ namespace getfem { static void ga_node_derivation (ga_tree , const ga_workspace , const mesh , pga_tree_node pnode, const std::string , - const std::string , size_type order); + const std::string , size_type order, bool any_trans = false); static void ga_node_grad(ga_tree , const ga_workspace , const mesh , pga_tree_node pnode); @@ -115,11 +115,11 @@ namespace getfem { static bool ga_node_mark_tree_for_variable (pga_tree_node pnode, const ga_workspace , const mesh , const std::string , - const std::string ) { + const std::string , bool any_trans = false) { bool marked = false; for (size_type i = 0; i < pnode->children.size(); ++i) if (ga_node_mark_tree_for_variable(pnode->children[i], workspace, m, - varname, interpolatename)) + varname, interpolatename, any_trans)) marked = true; bool plain_node(pnode->node_type == GA_NODE_VAL || @@ -155,7 +155,8 @@ namespace getfem { if ((plain_node || interpolate_node || secondary_node || elementary_node || xfem_node) && (pnode->name.compare(varname) == 0 && - pnode->interpolate_name.compare(interpolatename) == 0)) marked = true; + (any_trans || pnode->interpolate_name.compare(interpolatename) == 0))) + marked = true; if (interpolate_node || interpolate_test_node || pnode->node_type == GA_NODE_INTERPOLATE_X || @@ -167,7 +168,8 @@ namespace getfem { for (std::set::iterator it=vars.begin(); it != vars.end(); ++it) { if (it->varname.compare(varname) == 0 && -it->transname.compare(interpolatename) == 0) marked = true; +(any_trans || + it->transname.compare(interpolatename) == 0)) marked = true; } } pnode->marked = marked; @@ -1951,8 +1953,10 @@ namespace getfem { ga_throw_error(pnode->expr, child2->pos, "Cannot derive further " "this order two expression"); - if (ga_node_mark_tree_for_variable(child1,workspace,me,vardiff,"")) { -ga_node_derivation(tree, workspace, me, child1, vardiff,"",order+1); + if (ga_node_mark_tree_for_variable(child1,workspace,me, + vardiff,"",true)) { +ga_node_derivation(tree, workspace, me, child1, + vardiff,"",order+1, true); child1 = pnode->children[1]; ga_node_analysis(tree, workspace, child1, me, ref_elt_dim, eval_fixed_size, ignore_X, option); @@ -3226,7 +3230,7 @@ namespace getfem { pga_tree_node pnode, const std::string , const std::string , - size_type order) { + size_type order, bool any_trans) { size_type nbch = pnode->children.size(); pga_tree_node child0 = (nbch > 0) ? pnode->children[0] : 0; @@ -3267,7 +3271,8 @@ namespace getfem { bool is_diverg(pnode->node_type == GA_NODE_INTERPOLATE_DIVERG); bool ivar = (pnode->name.compare(varname) == 0 && - pnode->interpolate_name.compare(interpolatename) == 0); + (any_trans || + pnode->interpolate_name.compare(interpolatename) == 0)); bool itrans = !ivar; if (!itrans) { std::set vars; @@ -3288,9 +3293,8 @@ namespace getfem { tree.duplicate_with_addition(pnode); pnode_trans = pnode->parent->children[1]; } - if (ivar) { // Derivative wrt the interpolated variable - mi.resize(1); mi[0] = 2; + mi.resize(1); mi[0] = 2; for (size_type i = 0; i < pnode->tensor_order(); ++i) mi.push_back(pnode->
[Getfem-commits] [getfem-commits] branch master updated: fix a memory leak
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 3ae01b8 fix a memory leak new 7f934b5 Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/getfem 3ae01b8 is described below commit 3ae01b87cf08fd253b4a5658a2481df9ee9ce336 Author: Yves Renard AuthorDate: Mon Dec 28 20:09:39 2020 +0100 fix a memory leak --- src/getfem_generic_assembly_tree.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/getfem_generic_assembly_tree.cc b/src/getfem_generic_assembly_tree.cc index 37fb76e..d8cf672 100644 --- a/src/getfem_generic_assembly_tree.cc +++ b/src/getfem_generic_assembly_tree.cc @@ -1416,9 +1416,7 @@ namespace getfem { pnode_old->parent,pnode->children[0]); GMM_ASSERT1(pnode_old->children.empty(), "Internal error"); delete pnode_old; - } else { // Macro with parameters - if (gam.nb_params()+1 != pnode->children.size()) ga_throw_error(pnode->expr, pnode->pos, "Bad number of parameters in the use of macro '" @@ -1433,6 +1431,7 @@ namespace getfem { else tree.root = pnode; ga_replace_macro_params(tree, pnode, pnode_old->children); +tree.clear_node_rec(pnode_old); } } }
[Getfem-commits] [getfem-commits] fixmisspell updated (8a98021 -> 250861d)
renard pushed a change to branch fixmisspell. from 8a98021 Add VTU(XML) binary option and slices add 3507069 Fix bug in second derivative of inverse operator add 732533f Add VTU(XML) binary option add f6bc812 Support for environments without pyvista add 92ad552 Merge branch 'devel-tetsuo-xml-binary-squash' add 462698a adding a vtu file to gitignore add 4af6248 adding demo_parallel_laplacian.py in the distribution add 0f76b55 a small fix on neighbor transformation add 4f8db19 adding the import of gmsh mesh files with lower order elements in python interface add 7912c99 minor correction add fe24d85 small fix on gmsh import of N-2 dimensional elements add 9c653c4 Separate regions of identical numbers in gmsh add bbc5d76 yet another small fix in region number for gmsh import add 4164a97 fix formula typos add 103d186 Merge remote-tracking branch 'origin/fixmisspell' new 250861d Merge remote-tracking branch 'origin' into fixmisspell Summary of changes: .gitignore | 1 + .travis.yml| 1 + .../source/userdoc/model_nonlinear_elasticity.rst | 12 +- interface/src/gf_mesh.cc | 1 + interface/src/gf_mesh_fem_get.cc | 33 + interface/src/gf_mesh_get.cc | 25 interface/src/gf_slice_get.cc | 72 +++ interface/tests/python/Makefile.am | 3 + interface/tests/python/check_export_vtu.py | 66 ++ requirements.txt | 1 + src/getfem/getfem_export.h | 51 src/getfem_export.cc | 139 - src/getfem_generic_assembly_compile_and_exec.cc| 6 +- ...fem_generic_assembly_functions_and_operators.cc | 4 +- src/getfem_import.cc | 99 --- 15 files changed, 404 insertions(+), 110 deletions(-) create mode 100644 interface/tests/python/check_export_vtu.py
[Getfem-commits] (no subject)
branch: fixmisspell commit 250861de05285cec48c56c5a109da67a9db7f75e Merge: 8a98021 103d186 Author: Yves Renard AuthorDate: Fri Nov 20 08:38:21 2020 +0100 Merge remote-tracking branch 'origin' into fixmisspell .gitignore | 1 + .travis.yml| 1 + .../source/userdoc/model_nonlinear_elasticity.rst | 12 +- interface/src/gf_mesh.cc | 1 + interface/src/gf_mesh_fem_get.cc | 33 + interface/src/gf_mesh_get.cc | 25 interface/src/gf_slice_get.cc | 72 +++ interface/tests/python/Makefile.am | 3 + interface/tests/python/check_export_vtu.py | 66 ++ requirements.txt | 1 + src/getfem/getfem_export.h | 51 src/getfem_export.cc | 139 - src/getfem_generic_assembly_compile_and_exec.cc| 6 +- ...fem_generic_assembly_functions_and_operators.cc | 4 +- src/getfem_import.cc | 99 --- 15 files changed, 404 insertions(+), 110 deletions(-)
[Getfem-commits] (no subject)
branch: master commit 103d186c18658b2a78284eeec4c8ed1956bc41f9 Merge: 4164a97 511387f Author: Yves Renard AuthorDate: Fri Nov 20 08:35:46 2020 +0100 Merge remote-tracking branch 'origin/fixmisspell' doc/sphinx/source/.templates/download.html | 170 + doc/sphinx/source/.templates/gmm.html | 78 doc/sphinx/source/.templates/indexcontent.html | 126 +- doc/sphinx/source/.templates/indexsidebar.html | 20 +-- doc/sphinx/source/install/install_linux.rst| 25 5 files changed, 242 insertions(+), 177 deletions(-)
[Getfem-commits] (no subject)
branch: master commit 4164a973b3cbab2e56808a7971d8aff5248d04a8 Author: Yves Renard AuthorDate: Fri Nov 20 08:34:37 2020 +0100 fix formula typos --- doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst b/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst index af9264a..d4eeb9d 100644 --- a/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst +++ b/doc/sphinx/source/userdoc/model_nonlinear_elasticity.rst @@ -113,7 +113,7 @@ The stress in the reference configuration can be describe by the second Piola-Ki .. math:: - {\hat{\hat{\sigma}}} &= \frac{\partial}{\partial E} {W}(E) = 2\frac{\partial}{\partial C} {W}(C) + {\hat{\hat{\sigma}}} = \frac{\partial}{\partial E} {W}(E) = 2\frac{\partial}{\partial C} {W}(C) where :math:`{W}` is the density of strain energy of the material. The total strain energy is given by @@ -222,12 +222,12 @@ Incompressible material. .. math:: {d_1} = 0 - \intertext{with the additional constraint:} + \mbox{ with the additional constraint: } i_3( C) = 1 The incompressibility constraint :math:`i_3( C) = 1` is handled with a Lagrange multiplier :math:`p` (the pressure) -constraint: :math:`\sigma = -pI \rm I\hspace{-0.15em}Rightarrow {\hat{\hat{\sigma}}} = -p\nabla\Phi\nabla\Phi^{-T}\det\nabla\Phi` +constraint: :math:`\sigma = -pI \Rightarrow {\hat{\hat{\sigma}}} = -p\nabla\Phi\nabla\Phi^{-T}\det\nabla\Phi` .. math:: @@ -248,7 +248,7 @@ constraint: :math:`\sigma = -pI \rm I\hspace{-0.15em}Rightarrow {\hat{\hat{\sigm .. math:: - {W} &= a\; i_1(C) + (\frac{\mu}{2} - a)i_2(C) + (\frac{\lambda}{4} - \frac{\mu}{2} + a)i_3(C) - (\frac{\mu}{2}+\frac{\lambda}{4})\log \det(C) + {W} = a\; i_1(C) + (\frac{\mu}{2} - a)i_2(C) + (\frac{\lambda}{4} - \frac{\mu}{2} + a)i_3(C) - (\frac{\mu}{2}+\frac{\lambda}{4})\log \det(C) with :math:`\lambda, \mu` the Lame coefficients and :math:`\max(0,\frac{\mu}{2}-\frac{\lambda}{4})
[Getfem-commits] [getfem-commits] master updated (bbc5d76 -> 103d186)
renard pushed a change to branch master. from bbc5d76 yet another small fix in region number for gmsh import new 4164a97 fix formula typos add 1f059d1 Add docker images of python interface add 1c5d596 Use i18n Extension in Sphinx add 511387f Merge branch 'master' of ssh://git.sv.gnu.org:/srv/git/getfem into fixmisspell new 103d186 Merge remote-tracking branch 'origin/fixmisspell' Summary of changes: doc/sphinx/source/.templates/download.html | 170 +++-- doc/sphinx/source/.templates/gmm.html | 78 ++ doc/sphinx/source/.templates/indexcontent.html | 126 --- doc/sphinx/source/.templates/indexsidebar.html | 20 +-- doc/sphinx/source/install/install_linux.rst| 25 +++ .../source/userdoc/model_nonlinear_elasticity.rst | 12 +- 6 files changed, 248 insertions(+), 183 deletions(-)
[Getfem-commits] [getfem-commits] branch master updated: yet another small fix in region number for gmsh import
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new bbc5d76 yet another small fix in region number for gmsh import bbc5d76 is described below commit bbc5d7619d6b099fb517bd3a9abef9dbdca65100 Author: Yves Renard AuthorDate: Wed Nov 18 08:34:38 2020 +0100 yet another small fix in region number for gmsh import --- src/getfem_import.cc | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/getfem_import.cc b/src/getfem_import.cc index bd8ab50..7056697 100644 --- a/src/getfem_import.cc +++ b/src/getfem_import.cc @@ -328,15 +328,13 @@ namespace getfem { std::vector cvlst; cvlst.reserve(nb_cv); dal::bit_vector reg; for (size_type block=0; block < nb_block; ++block) { - unsigned type, region; + unsigned dimr, type, region; if (version >= 4.) { /* Format version 4 */ -f >> region >> dummy >> type >> nb_cv; - +f >> dimr >> region >> type >> nb_cv; if (reg.is_in(region)) { - GMM_WARNING2("Two regions have the same number, " - "modifying the region number"); - reg.add(0); reg.add(1); - region = unsigned(reg.first_false()); + GMM_WARNING2("Two regions share the same number, " + "the region numbering is modified"); + while (reg.is_in(region)) region += 5; } reg.add(region); }
[Getfem-commits] [getfem-commits] branch master updated: Separate regions of identical numbers in gmsh
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 9c653c4 Separate regions of identical numbers in gmsh 9c653c4 is described below commit 9c653c48e67c14f17d2a9535bb84bce05e118253 Author: Yves Renard AuthorDate: Tue Nov 17 21:10:02 2020 +0100 Separate regions of identical numbers in gmsh --- src/getfem_import.cc | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/getfem_import.cc b/src/getfem_import.cc index 4ee7fb4..bd8ab50 100644 --- a/src/getfem_import.cc +++ b/src/getfem_import.cc @@ -326,13 +326,20 @@ namespace getfem { // cout << "nb_bloc = " << nb_block << " nb_cv = " << nb_cv << endl; std::vector cvlst; cvlst.reserve(nb_cv); +dal::bit_vector reg; for (size_type block=0; block < nb_block; ++block) { unsigned type, region; - if (version >= 4.) /* Format version 4 */ + if (version >= 4.) { /* Format version 4 */ f >> region >> dummy >> type >> nb_cv; - - +if (reg.is_in(region)) { + GMM_WARNING2("Two regions have the same number, " + "modifying the region number"); + reg.add(0); reg.add(1); + region = unsigned(reg.first_false()); +} +reg.add(region); + } for (size_type cv=0; cv < nb_cv; ++cv) { cvlst.push_back(gmsh_cv_info());
[Getfem-commits] [getfem-commits] branch master updated: small fix on gmsh import of N-2 dimensional elements
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new fe24d85 small fix on gmsh import of N-2 dimensional elements fe24d85 is described below commit fe24d85399dbbd253ac76902bb771eed035fb815 Author: Yves Renard AuthorDate: Sun Nov 15 14:05:30 2020 +0100 small fix on gmsh import of N-2 dimensional elements --- src/getfem_import.cc | 67 ++-- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/src/getfem_import.cc b/src/getfem_import.cc index ce0b377..4ee7fb4 100644 --- a/src/getfem_import.cc +++ b/src/getfem_import.cc @@ -220,14 +220,14 @@ namespace getfem { for gmsh and gid meshes, the mesh nodes are always 3D, so for a 2D mesh if remove_last_dimension == true the z-component of nodes will be removed */ - static void import_gmsh_mesh_file(std::istream& f, mesh& m, int deprecate=0, -std::map *region_map=NULL, -std::set *lower_dim_convex_rg=NULL, -bool add_all_element_type = false, -bool remove_last_dimension = true, -std::map> *nodal_map = NULL, -bool remove_duplicated_nodes = true) - { + static void import_gmsh_mesh_file + (std::istream& f, mesh& m, int deprecate=0, + std::map *region_map=NULL, + std::set *lower_dim_convex_rg=NULL, + bool add_all_element_type = false, + bool remove_last_dimension = true, + std::map> *nodal_map = NULL, + bool remove_duplicated_nodes = true) { gmm::stream_standard_locale sl(f); // /* print general warning */ // GMM_WARNING3(" All regions must have different number!"); @@ -545,7 +545,7 @@ namespace getfem { nb_cv = cvlst.size(); if (cvlst.size()) { std::sort(cvlst.begin(), cvlst.end()); - if (cvlst.front().type == 15){ + if (cvlst.front().type == 15) { GMM_WARNING2("Only nodes defined in the mesh! No elements are added."); return; } @@ -556,8 +556,8 @@ namespace getfem { gmsh_cv_info = cvlst[cv]; bool is_node = (ci.type == 15); unsigned ci_dim = (is_node) ? 0 : ci.pgt->dim(); -//cout << "importing cv dim=" << int(ci.pgt->dim()) << " N=" << N -// << " region: " << ci.region << "\n"; +// cout << "importing cv dim=" << ci_dim << " N=" << N +// << " region: " << ci.region << " type: " << ci.type << "\n"; //main convex import if (ci_dim == N) { @@ -571,49 +571,48 @@ namespace getfem { //convex that lies within the regions of lower_dim_convex_rg //is imported explicitly as a convex. if (lower_dim_convex_rg != NULL && - lower_dim_convex_rg->find(ci.region) != lower_dim_convex_rg->end() && - !is_node){ - size_type ic = m.add_convex(ci.pgt, ci.nodes.begin()); cvok = true; - m.region(ci.region).add(ic); + lower_dim_convex_rg->find(ci.region) != lower_dim_convex_rg->end() + && !is_node) { + size_type ic = m.add_convex(ci.pgt, ci.nodes.begin()); + cvok = true; m.region(ci.region).add(ic); } //find if the convex is part of a face of higher dimension convex else{ -bgeot::mesh_structure::ind_cv_ct ct = m.convex_to_point(ci.nodes[0]); +bgeot::mesh_structure::ind_cv_ct ct=m.convex_to_point(ci.nodes[0]); for (bgeot::mesh_structure::ind_cv_ct::const_iterator it = ct.begin(); it != ct.end(); ++it) { - for (short_type face=0; - face < m.structure_of_convex(*it)->nb_faces(); ++face) { -if (m.is_convex_face_having_points(*it,face, - short_type(ci.nodes.size()), - ci.nodes.begin())) { - m.region(ci.region).add(*it,face); - cvok = true; + if (m.structure_of_convex(*it)->dim() == ci_dim + 1) { +for (short_type face=0; + face < m.structure_of_convex(*it)->nb_faces(); ++face) { + if (m.is_convex_face_having_points(*it, face, + short_type(ci.nodes.size()), +ci.nodes.begin())) { +m.region(ci.region).add(*it,face
[Getfem-commits] (no subject)
branch: master commit 7912c992daefdb88e1068f6f11ea68515a76d9d7 Author: Yves Renard AuthorDate: Wed Nov 11 14:42:19 2020 +0100 minor correction --- src/getfem_import.cc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/getfem_import.cc b/src/getfem_import.cc index b317e57..ce0b377 100644 --- a/src/getfem_import.cc +++ b/src/getfem_import.cc @@ -213,9 +213,9 @@ namespace getfem { Lower dimensions elements in the regions of lower_dim_convex_rg will be imported as independant convexes. - If add_all_element_type is set to true, convexes with less dimension - than highest dimension pgt and are not part of other element's face will - be imported as independent convexes. + If add_all_element_type is set to true, elements with lower dimension + than highest dimension and that are not part of other element's face will + be imported as independent elements. for gmsh and gid meshes, the mesh nodes are always 3D, so for a 2D mesh if remove_last_dimension == true the z-component of nodes will be removed @@ -1538,7 +1538,7 @@ namespace getfem { if (bgeot::casecmp(format,"gmsh")==0) import_gmsh_mesh_file(f,m); else if (bgeot::casecmp(format,"gmsh_with_lower_dim_elt")==0) - import_gmsh_mesh_file(f,m,0,NULL,true); + import_gmsh_mesh_file(f,m,0,NULL,NULL,true); else if (bgeot::casecmp(format,"gmshv2")==0)/* deprecate */ import_gmsh_mesh_file(f,m,2); else if (bgeot::casecmp(format,"gid")==0)
[Getfem-commits] (no subject)
branch: master commit 4f8db19099bfcdfc04fedf98f928733bed1d5941 Author: Yves Renard AuthorDate: Wed Nov 11 14:38:38 2020 +0100 adding the import of gmsh mesh files with lower order elements in python interface --- interface/src/gf_mesh.cc | 1 + src/getfem_import.cc | 11 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/interface/src/gf_mesh.cc b/interface/src/gf_mesh.cc index da4a6a2..750c26c 100644 --- a/interface/src/gf_mesh.cc +++ b/interface/src/gf_mesh.cc @@ -555,6 +555,7 @@ void gf_mesh(getfemint::mexargs_in& m_in, `format` may be: - 'gmsh' for a mesh created with `Gmsh` + - 'gmsh_with_lower_dim_elt' for a mesh created with `Gmsh` and including elements of lower dimension than the mesh - 'gid' for a mesh created with `GiD` - 'cdb' for a mesh created with `ANSYS` - 'am_fmt' for a mesh created with `EMC2`@*/ diff --git a/src/getfem_import.cc b/src/getfem_import.cc index ad46c61..b317e57 100644 --- a/src/getfem_import.cc +++ b/src/getfem_import.cc @@ -229,8 +229,8 @@ namespace getfem { bool remove_duplicated_nodes = true) { gmm::stream_standard_locale sl(f); -/* print general warning */ -GMM_WARNING3(" All regions must have different number!"); +// /* print general warning */ +// GMM_WARNING3(" All regions must have different number!"); /* print deprecate warning */ if (deprecate!=0){ @@ -610,8 +610,7 @@ namespace getfem { size_type ic = m.add_convex(ci.pgt, ci.nodes.begin()); m.region(ci.region).add(ic); cvok = true; - } - else{ + } else{ GMM_WARNING2("gmsh import ignored an element of type " << bgeot::name_of_geometric_trans(ci.pgt) << " as it does not belong to the face of another element"); @@ -1452,7 +1451,7 @@ namespace getfem { GMM_ASSERT1(f.good(), "can't open file " << filename); /* throw exceptions when an error occurs */ f.exceptions(std::ifstream::badbit | std::ifstream::failbit); - import_mesh(f, format,m); + import_mesh(f, format, m); f.close(); } catch (std::logic_error& exc) { @@ -1538,6 +1537,8 @@ namespace getfem { mesh& m) { if (bgeot::casecmp(format,"gmsh")==0) import_gmsh_mesh_file(f,m); +else if (bgeot::casecmp(format,"gmsh_with_lower_dim_elt")==0) + import_gmsh_mesh_file(f,m,0,NULL,true); else if (bgeot::casecmp(format,"gmshv2")==0)/* deprecate */ import_gmsh_mesh_file(f,m,2); else if (bgeot::casecmp(format,"gid")==0)
[Getfem-commits] [getfem-commits] master updated (0f76b55 -> 7912c99)
renard pushed a change to branch master. from 0f76b55 a small fix on neighbor transformation new 4f8db19 adding the import of gmsh mesh files with lower order elements in python interface new 7912c99 minor correction Summary of changes: interface/src/gf_mesh.cc | 1 + src/getfem_import.cc | 17 + 2 files changed, 10 insertions(+), 8 deletions(-)
[Getfem-commits] [getfem-commits] branch master updated: a small fix on neighbor transformation
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 0f76b55 a small fix on neighbor transformation 0f76b55 is described below commit 0f76b552495b5112fab430da3b15b90ab1c7ffb3 Author: Yves Renard AuthorDate: Tue Oct 27 16:32:26 2020 +0100 a small fix on neighbor transformation --- src/getfem_generic_assembly_compile_and_exec.cc | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/getfem_generic_assembly_compile_and_exec.cc b/src/getfem_generic_assembly_compile_and_exec.cc index 6eb3095..56ffbd1 100644 --- a/src/getfem_generic_assembly_compile_and_exec.cc +++ b/src/getfem_generic_assembly_compile_and_exec.cc @@ -4002,6 +4002,8 @@ namespace getfem { short_type f = ctx.face_num(); auto adj_face = m.adjacent_face(cv, f); if (adj_face.cv == size_type(-1)) { +GMM_WARNING2("Adjacent face not found, " + "probably an non-interior face"); inin.ctx.invalid_convex_num(); } else { gauss_pt_corresp gpc; @@ -4062,7 +4064,7 @@ namespace getfem { } } - if (inin.ctx.have_pgp()) { + if (inin.ctx.have_pgp() && inin.ctx.is_convex_num_valid()) { inin.ctx.set_ii(ipt); inin.pt_type = 1; inin.has_ctx = true; @@ -8266,7 +8268,7 @@ namespace getfem { } if (pspt != old_pspt) { first_gp = true; old_pspt = pspt; } if (pspt->size()) { - // iterations on Gauss points + // Iterations on Gauss points size_type first_ind = 0; if (v.f() != short_type(-1)) { gis.nbpt = pai->nb_points_on_face(v.f());
[Getfem-commits] [getfem-commits] branch master updated: adding demo_parallel_laplacian.py in the distribution
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 4af6248 adding demo_parallel_laplacian.py in the distribution 4af6248 is described below commit 4af6248a420368932645ee6c413acaff89e46f0e Author: Yves Renard AuthorDate: Mon Oct 5 16:29:36 2020 +0200 adding demo_parallel_laplacian.py in the distribution --- interface/tests/python/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/tests/python/Makefile.am b/interface/tests/python/Makefile.am index c281cc0..813753e 100644 --- a/interface/tests/python/Makefile.am +++ b/interface/tests/python/Makefile.am @@ -33,6 +33,7 @@ EXTRA_DIST= \ demo_crack.py \ demo_fictitious_domains.py \ demo_laplacian.py \ + demo_parallel_laplacian.py \ demo_laplacian_HHO.py \ demo_laplacian_pyramid.py \ demo_laplacian_DG.py\
Re: [Getfem-commits] please merge branch devel-tetsuo-xml
Dear Tetsuo, The merge is done. Best regards, Yves - Mail original - De: "Tetsuo Koyama" À: "logari81" , "yves renard" , "getfem-commits" Envoyé: Lundi 5 Octobre 2020 06:43:32 Objet: Re: [Getfem-commits] please merge branch devel-tetsuo-xml Dear Kostas and Yves I added a check in the test. Thanks. Best regards Tetsuo 2020年10月5日(月) 12:29 Tetsuo Koyama : > Dear Kostas > > > I had misunderstood the test, obviously you cannot hardcode the result > that needs to be checked. So you will just have to skip the test if pyvista > is not available. But I still believe we should not require or check for > pyvista in the configure script, just for one test case. So please add this > check in the test itself. > Got it. Thanks for your message. > > Best regards Tetsuo. > > 2020年10月5日(月) 5:42 Konstantinos Poulios : > >> Dear Tetsuo >> >> I had misunderstood the test, obviously you cannot hardcode the result >> that needs to be checked. So you will just have to skip the test if pyvista >> is not available. But I still believe we should not require or check for >> pyvista in the configure script, just for one test case. So please add this >> check in the test itself. >> >> Best regards >> Kostas >> >> On Sun, Oct 4, 2020 at 5:41 PM Tetsuo Koyama >> wrote: >> >>> Dear Yves and Kostas >>> >>> Thank you for your feedback. >>> >>> I will follow the last option. I will contact you later. >>> >>> 2020年10月4日(日) 23:39 Konstantinos Poulios : >>> >>>> Dear Tetsuo >>>> >>>> Regarding the rest of the code it looks nice and clean. No objections >>>> from my side. Thanks for the nice work. >>>> >>>> Best regards >>>> Kostas >>>> >>>> On Sun, Oct 4, 2020 at 4:23 PM Konstantinos Poulios < >>>> logar...@googlemail.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> I think the last option is the simplest. >>>>> >>>>> @Tetsuo you could substitute the lines >>>>> actual = unstructured_grid.points[:, 0] >>>>> and >>>>> actual = unstructured_grid.cell_connectivity >>>>> with >>>>> actual = [.]<--- hardcoded result >>>>> if unstructured_grid: <--- unstructured_grid==None if pyvista is >>>>> missing >>>>>actual = unstructured_grid.points[:, 0] >>>>> and >>>>> actual = [.]<--- hardcoded result >>>>> if unstructured_grid: <--- unstructured_grid==None if pyvista is >>>>> missing >>>>>actual = unstructured_grid.cell_connectivity >>>>> Otherwise thank for your code, I will also have a look at the rest. >>>>> >>>>> Best regards >>>>> Kostas >>>>> >>>>> >>>>> On Sun, Oct 4, 2020 at 4:06 PM Yves Renard >>>>> wrote: >>>>> >>>>>> >>>>>> Dear Tetsuo and Kostas, >>>>>> >>>>>> Tetsuo, thank you for your developpment. >>>>>> I understand that you introduced a new dependance on the pyvista >>>>>> python package (only for a test program). There is several possibilities >>>>>> : >>>>>> >>>>>> - Force the presence of the package in configure.ac (i.e. stop the >>>>>> configure if the package is not present) >>>>>> - Detect the presence in a configure variable such as PYTHON_PYVISTA >>>>>> and disable the test if the package is not installed (eventually warning >>>>>> at >>>>>> the end of the configure file when it is nor present) >>>>>> - Detect directly the presence of the package in the python test >>>>>> program. >>>>>> >>>>>> What do you think is the best ? >>>>>> >>>>>> Best regards, >>>>>> >>>>>> Yves >>>>>> >>>>>> >>>>>> >>>>>> - Mail original - >>>>>> De: "Tetsuo Koyama" >>>>>> À: "yves renard" , "logari81" < >>>>>> logar...@googlemail.com>, "getfem-commits" >>>>> > >>>>>> Envoyé: Dimanche 4
[Getfem-commits] [getfem-commits] branch devel-tetsuo-xml-binary-squash deleted (was f6bc812)
renard pushed a change to branch devel-tetsuo-xml-binary-squash. was f6bc812 Support for environments without pyvista The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[Getfem-commits] [getfem-commits] branch devel-tetsuo-xml-binary deleted (was fa91962)
renard pushed a change to branch devel-tetsuo-xml-binary. was fa91962 :wrench: Fix WARNING This change permanently discards the following revisions: discard fa91962 :wrench: Fix WARNING discard 0c1f43c :wastebasket: Remove vtk and vtu discard 9f6c214 :sparkles: Fix TODO discard 98d2e14 :sparkles: Fix TODO discard 029dd92 Fix type discard 32148b5 Add vtk for check discard ec7ee95 :sparkles: Fix TODO discard 4a23474 Revert tests/helmholtz.cc discard 71f3381 :sparkles: Fix TODO discard c986f21 :sparkles: Fix TODO discard 5da5045 :bulb: Remove code discard 5f41641 :sparkles: Fix TODO discard 46f6fa6 Update size print discard 82c996c Fix test error by hard coding discard aa90662 Fix test error by hard coding discard 2049e27 Update test and vtu files discard a59760a Update test and vtu files discard d528961 Update src/getfem_export.cc discard 26cc1b7 Update for pass discard 24bacd0 Update for pass discard 780c61b Update for pass discard 4afc12f Update for pass discard a2b9810 Update for pass discard 6148cde Update for pass discard 01a0825 Update check_export_vtu.py to pass discard 85c30c8 Update check_export_vtu.py discard 6bf79dd Update file name discard 5d71b15 Update check_export_vtu.py discard 6f1f1e0 Add check_m0_ascii.vtu and check_m0_binary.vtu discard edb50f0 Add vtu binary to export discard e7cf0ce convert test from vtk to pyvista discard 99ed8a6 :up: src/getfem_export.cc discard 1214c9b :up: src/getfem_export.cc discard 11b49ba :up: src/getfem_export.cc discard c83b5f1 :up: src/getfem_export.cc discard 222506e :up: src/getfem_export.cc discard 48889d8 :up: src/getfem_export.cc discard 1b45dd9 :up: src/getfem_export.cc discard 3447cb1 :up: src/getfem_export.cc discard 9ca13df :up: src/getfem/getfem_export.h discard 432ea9f :up: src/getfem/getfem_export.h discard 7891cdb :up: src/getfem/getfem_export.h discard dbb6493 :wrench: base64 discard 5fe036f :new: check_export_vtu.py discard a3c2455 :back: interface/tests/python/check_export.py discard 3e92756 :back: interface/tests/python/check_export.py discard 8e7d5fe Add binary option to vtu discard cf31482 Add binary option to vtu discard 302d69d Add base64_encode discard a79688f Add the scripting interface for vtu export discard 92740ad Add tests for VTK(XML) in check_export.py
[Getfem-commits] (no subject)
branch: master commit 462698ac29e102280a18a256573355a414586383 Author: Yves Renard AuthorDate: Mon Oct 5 10:24:49 2020 +0200 adding a vtu file to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4dd8688..3dc5d59 100644 --- a/.gitignore +++ b/.gitignore @@ -330,6 +330,7 @@ Makefile /tests/dynamic_tas /tests/elastostatic /tests/geo_trans_inv +/tests/helmholtz.vtu /tests/heat_equation /tests/helmholtz /tests/integration
[Getfem-commits] (no subject)
branch: master commit 92ad5529070ae289ae7cf48e8b2605dc030f7bc3 Merge: 3507069 f6bc812 Author: Yves Renard AuthorDate: Mon Oct 5 10:18:07 2020 +0200 Merge branch 'devel-tetsuo-xml-binary-squash' .travis.yml| 1 + interface/src/gf_mesh_fem_get.cc | 33 +++ interface/src/gf_mesh_get.cc | 25 ++ interface/src/gf_slice_get.cc | 72 +++ interface/tests/python/Makefile.am | 2 + interface/tests/python/check_export_vtu.py | 66 ++ requirements.txt | 1 + src/getfem/getfem_export.h | 51 ++- src/getfem_export.cc | 139 ++--- 9 files changed, 337 insertions(+), 53 deletions(-)
[Getfem-commits] [getfem-commits] branch master updated: fix a bug in obstacle complation in Coulomb_friction_brick_rigid_obstacle object
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new a757849 fix a bug in obstacle complation in Coulomb_friction_brick_rigid_obstacle object a757849 is described below commit a757849aac0ec7c05fa93b353793650f28bb0ff5 Author: Yves Renard AuthorDate: Mon Jul 13 15:07:06 2020 +0200 fix a bug in obstacle complation in Coulomb_friction_brick_rigid_obstacle object --- src/getfem_contact_and_friction_nodal.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/getfem_contact_and_friction_nodal.cc b/src/getfem_contact_and_friction_nodal.cc index 0f9254c..7776ec2 100644 --- a/src/getfem_contact_and_friction_nodal.cc +++ b/src/getfem_contact_and_friction_nodal.cc @@ -1528,10 +1528,7 @@ namespace getfem { for (dal::bv_visitor id(dofs); !id.finished(); ++id, ++i) if ((i % (d+1)) == 0) alpha[j++] = MM(id, id) / l; - getfem::ga_workspace gw; -getfem::ga_function f(gw, obstacle); - size_type N = d+1; getfem::model_real_plain_vector pt(N); gw.add_fixed_size_constant("X", pt); @@ -1540,6 +1537,7 @@ namespace getfem { if (N >= 3) gw.add_macro("z", "X(3)"); if (N >= 4) gw.add_macro("w", "X(4)"); +getfem::ga_function f(gw, obstacle); f.compile(); gmm::resize(gap, nbc);
[Getfem-commits] [getfem-commits] branch master updated: minor fix with a verification on im_data size
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new abd78b0 minor fix with a verification on im_data size abd78b0 is described below commit abd78b096280b4d90c0f2ff80db672b43befe3ce Author: Yves Renard AuthorDate: Sun Jun 21 13:23:41 2020 +0200 minor fix with a verification on im_data size --- src/getfem_models.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/getfem_models.cc b/src/getfem_models.cc index 2306f2a..a33ae53 100644 --- a/src/getfem_models.cc +++ b/src/getfem_models.cc @@ -2902,7 +2902,7 @@ namespace getfem { return mi; } else if (imd) { bgeot::multi_index mi = imd->tensor_size(); - size_type q = n / imd->nb_filtered_index(); + size_type q = n * imd->nb_filtered_index(); GMM_ASSERT1(q % imd->nb_tensor_elem() == 0, "Invalid mesh im data vector"); if (n > 1 || it->second.qdims.size() > 1) {
[Getfem-commits] [getfem-commits] branch master updated: minor change : suppress an output message
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 92b8ba7 minor change : suppress an output message 92b8ba7 is described below commit 92b8ba7f21b6dd4ea39f2f812493cf9f9efc Author: Yves Renard AuthorDate: Wed Jun 3 11:04:34 2020 +0200 minor change : suppress an output message --- src/getfem_omp.cc | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/getfem_omp.cc b/src/getfem_omp.cc index 4089a86..fdc1885 100644 --- a/src/getfem_omp.cc +++ b/src/getfem_omp.cc @@ -378,7 +378,6 @@ namespace getfem{ typedef int (* ptrfunc1)(); \ ptrfunc1 func1 = ptrfunc1(dlsym(NULL, "openblas_get_num_threads")); \ if (func1) openblas_get_num_threads_res = (*func1)(); \ -std::cout << "numthread = " << openblas_get_num_threads_res << std::endl; \ typedef void (* ptrfunc2)(int); \ ptrfunc2 func2 = ptrfunc2(dlsym(NULL, "openblas_set_num_threads")); \ if (func2) (*func2)(1); \ @@ -396,10 +395,8 @@ namespace getfem{ struct dummy_class_for_blas_nbthread_init { -dummy_class_for_blas_nbthread_init(void) { - std::cout << "initializing ..." << std::endl; - BLAS_FORCE_SINGLE_THREAD; -} +dummy_class_for_blas_nbthread_init(void) +{ BLAS_FORCE_SINGLE_THREAD; } }; static dummy_class_for_blas_nbthread_init dcfbnti;
Re: [Getfem-commits] please merge branch devel-tetsuo-xml
Dear all, I did the merge. Best regards, Yves - Mail original - De: "logari81" À: "Tetsuo Koyama" Cc: "yves renard" , "getfem-commits" Envoyé: Mercredi 27 Mai 2020 16:47:40 Objet: Re: [Getfem-commits] please merge branch devel-tetsuo-xml it looks good and clean. Thanks. I will do the merge later if Yves doesn't do it first. Just a minor comment. Now in modern C++ we use to rewrite the old loops like this for (size_type i=0; i < s.size(); ++i) { write_val(int(vtk_simplex_code[s[i].dim()])); } to for (const auto : s) write_val(int(vtk_simplex_code[val.dim()])); if possible. You can also drop the extra brackets {} if they are not necessary. BR Kostas On Wed, May 27, 2020 at 3:03 AM Tetsuo Koyama wrote: > P.S. branch is devel-tetsuo-xml-slices > > 2020年5月27日(水) 10:02 Tetsuo Koyama : > > > > Dear all > > > > I added the following functions and confirmed that the test passed. It > > is ready for merge. > > > 2) make exporting slices work for VTU. Based on my refactored version, > it shouldn't be difficult. > > > > I plan to add 1) 3) after this. > > > > BR Tetsuo > > > > 2020年5月26日(火) 2:01 Yves Renard : > > > > > > > > > Dear all, > > > > > > Ok, I merged the branch and I will proceed with 5.4.1 patch version. > > > > > > Best regards, > > > > > > Yves > > > > > > - Mail original - > > > De: "logari81" > > > À: "Tetsuo Koyama" > > > Cc: "getfem-commits" , "yves renard" < > yves.ren...@insa-lyon.fr> > > > Envoyé: Lundi 25 Mai 2020 15:04:23 > > > Objet: Re: [Getfem-commits] please merge branch devel-tetsuo-xml > > > > > > Dear Tetsuo, > > > > > > Great, thanks for testing and for the original vtu implementation. It > is a > > > very useful feature. > > > > > > I will let Yves do the merge. I think he will prepare a 5.4.1 version > soon > > > to fix the issues with 5.4. on Ubuntu 20.04. > > > > > > Best regards > > > Kostas > > > > > > > > > On Mon, May 25, 2020 at 2:32 PM Tetsuo Koyama > wrote: > > > > > > > Dear Kostas > > > > > > > > My test of branch devel-logari81-xml was passed. > > > > Your branch is awesome. > > > > I think it is a very good idea to add vtk as a option too. > > > > Could you merge this branch? > > > > After that I will checkout new branch to add more functionality. > > > > > > > > Best regards Tetsuo > > > > > > > > 2020年5月24日(日) 20:49 Tetsuo Koyama : > > > > > > > > > > Dear Kostas > > > > > > > > > > Sorry for my late reply and thank you for your refactoring. > > > > > I'll check it and will continue you proposal. After I finished > > > > > development, I'll contact getfem project to merge. > > > > > Thanks for your advice. > > > > > > > > > > Best regards Tetsuo > > > > > > > > > > 2020年5月24日(日) 4:13 Konstantinos Poulios : > > > > > > > > > > > > Dear Tetsuo, > > > > > > > > > > > > I have revised your code and refactored it in my > logari81-devel-xml > > > > branch. Can you test that my refactored version works as your > original > > > > version? I removed your "only_mesh" option intentionally. > > > > > > > > > > > > Moreover, it would be nice if you could: > > > > > > 1) implement the scripting interface for vtu export. > > > > > > 2) make exporting slices work for VTU. Based on my refactored > version, > > > > it shouldn't be difficult. > > > > > > 3) implement the binary version of VTU. > > > > > > > > > > > > Best regards > > > > > > Kostas > > > > > > > > > > > > On Wed, May 13, 2020 at 3:35 PM Tetsuo Koyama < > tkoyama...@gmail.com> > > > > wrote: > > > > > >> > > > > > >> I forgot to CC: in the last email, so I am re-sending it. > > > > > >> -- > > > > > >> Dear Kostas > > > > > >> > > > > > >> Thank you for your reply. > > > > > >> > Thanks for your answer. Your code looks quite nice actually. > I have
[Getfem-commits] [getfem-commits] branch devel-tetsuo-xml-slices deleted (was ea03439)
renard pushed a change to branch devel-tetsuo-xml-slices. was ea03439 Add exporting slices for VTU The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[Getfem-commits] [getfem-commits] master updated (4898a88 -> ea03439)
renard pushed a change to branch master. from 4898a88 small modifications for 5.4.1 patch version release add d156a47 Add tests for exporting slices for VTU add ea03439 Add exporting slices for VTU No new revisions were added by this update. Summary of changes: src/getfem_export.cc | 79 +++- tests/helmholtz.cc | 15 ++ 2 files changed, 70 insertions(+), 24 deletions(-)
[Getfem-commits] [getfem-commits] annotated tag v5.4.1 created (now 49fd244)
renard pushed a change to annotated tag v5.4.1. at 49fd244 (tag) tagging 4898a8846eb170ba8f6e4bdd854c5f7348d02cf9 (commit) replaces v5.4 by Yves Renard on Mon May 25 20:05:31 2020 +0200 - Log - version 5.4.1 --- No new revisions were added by this update.
[Getfem-commits] [getfem-commits] branch master updated: small modifications for 5.4.1 patch version release
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 4898a88 small modifications for 5.4.1 patch version release 4898a88 is described below commit 4898a8846eb170ba8f6e4bdd854c5f7348d02cf9 Author: Yves Renard AuthorDate: Mon May 25 20:05:04 2020 +0200 small modifications for 5.4.1 patch version release --- doc/sphinx/source/.templates/download.html | 2 +- doc/sphinx/source/whatsnew/1.7.rst | 2 +- doc/sphinx/source/whatsnew/5.4.1.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/sphinx/source/.templates/download.html b/doc/sphinx/source/.templates/download.html index 99e04c2..9af6b0e 100644 --- a/doc/sphinx/source/.templates/download.html +++ b/doc/sphinx/source/.templates/download.html @@ -20,7 +20,7 @@ Public License, either version 3 of the license or any later version along with FormatPacked as .tar.gz {{ project }} stable -http://download-mirror.savannah.gnu.org/releases/getfem/stable/getfem-5.4.tar.gz;>getfem-5.4.tar.gz +http://download-mirror.savannah.gnu.org/releases/getfem/stable/getfem-5.4.1.tar.gz;>getfem-5.4.1.tar.gz Gmm++ standalone diff --git a/doc/sphinx/source/whatsnew/1.7.rst b/doc/sphinx/source/whatsnew/1.7.rst index 102d7c9..1995039 100644 --- a/doc/sphinx/source/whatsnew/1.7.rst +++ b/doc/sphinx/source/whatsnew/1.7.rst @@ -29,7 +29,7 @@ <http://crd.lbl.gov/~xiaoye/SuperLU/>`_) is available "out of the box". - * Ability to export results to `VTK <http://www.vtk.org>`_ and + * Ability to export results to `VTK`_ and `OpenDX <http://www.opendx.org>`_. * Major changes in Gmm++ 1.7: diff --git a/doc/sphinx/source/whatsnew/5.4.1.rst b/doc/sphinx/source/whatsnew/5.4.1.rst index e64b1ce..9f44898 100644 --- a/doc/sphinx/source/whatsnew/5.4.1.rst +++ b/doc/sphinx/source/whatsnew/5.4.1.rst @@ -6,7 +6,7 @@ |gf| 5.4.1 is a patch version that fixes a problem with multithread openblas 0.3.8, used in particular in the LTS Ubuntu 20.04. -Released version, 2020/05/22. +Released version, 2020/05/25. The main changes are:
Re: [Getfem-commits] please merge branch devel-tetsuo-xml
Dear all, Ok, I merged the branch and I will proceed with 5.4.1 patch version. Best regards, Yves - Mail original - De: "logari81" À: "Tetsuo Koyama" Cc: "getfem-commits" , "yves renard" Envoyé: Lundi 25 Mai 2020 15:04:23 Objet: Re: [Getfem-commits] please merge branch devel-tetsuo-xml Dear Tetsuo, Great, thanks for testing and for the original vtu implementation. It is a very useful feature. I will let Yves do the merge. I think he will prepare a 5.4.1 version soon to fix the issues with 5.4. on Ubuntu 20.04. Best regards Kostas On Mon, May 25, 2020 at 2:32 PM Tetsuo Koyama wrote: > Dear Kostas > > My test of branch devel-logari81-xml was passed. > Your branch is awesome. > I think it is a very good idea to add vtk as a option too. > Could you merge this branch? > After that I will checkout new branch to add more functionality. > > Best regards Tetsuo > > 2020年5月24日(日) 20:49 Tetsuo Koyama : > > > > Dear Kostas > > > > Sorry for my late reply and thank you for your refactoring. > > I'll check it and will continue you proposal. After I finished > > development, I'll contact getfem project to merge. > > Thanks for your advice. > > > > Best regards Tetsuo > > > > 2020年5月24日(日) 4:13 Konstantinos Poulios : > > > > > > Dear Tetsuo, > > > > > > I have revised your code and refactored it in my logari81-devel-xml > branch. Can you test that my refactored version works as your original > version? I removed your "only_mesh" option intentionally. > > > > > > Moreover, it would be nice if you could: > > > 1) implement the scripting interface for vtu export. > > > 2) make exporting slices work for VTU. Based on my refactored version, > it shouldn't be difficult. > > > 3) implement the binary version of VTU. > > > > > > Best regards > > > Kostas > > > > > > On Wed, May 13, 2020 at 3:35 PM Tetsuo Koyama > wrote: > > >> > > >> I forgot to CC: in the last email, so I am re-sending it. > > >> -- > > >> Dear Kostas > > >> > > >> Thank you for your reply. > > >> > Thanks for your answer. Your code looks quite nice actually. I have > one question about the lines > > >> > std::vector W(Q*pmf_dof_used.card()); > > >> > gmm::copy(remove_dof_unused(V, pmf_dof_used, Q), W); > > >> > write_dataset_(V, name, qdim); > > >> > Since you do not do anything with vector W, what is the meaning of > having it? Should the last line be: > > >> > write_dataset_(W, name, qdim); > > >> > instead? > > >> Yes you are right. Sorry my test was not enough. I fixed it. > > >> > > >> > You can just make a new branch and put the outcome of your > development in one or two commits and then we can merge that branch. Sorry > for being picky, but establishing some good development habits will make > our life easier in the future. > > >> Thanks. Your advice is very helpful to me. I made new branch > > >> devel-tetsuo-xml02. It is a squash of commit of devel-tetsuo-xml. > > >> > > >> Thank you for reading. > > >> > > >> Best regards Tetsuo > > >> > > >> > > > >> > 2020年5月11日(月) 5:16 Konstantinos Poulios : > > >> > > > > >> > > Dear Tetsuo, > > >> > > > > >> > > Thanks for your answer. Your code looks quite nice actually. I > have one question about the lines > > >> > > std::vector W(Q*pmf_dof_used.card()); > > >> > > gmm::copy(remove_dof_unused(V, pmf_dof_used, Q), W); > > >> > > write_dataset_(V, name, qdim); > > >> > > Since you do not do anything with vector W, what is the meaning > of having it? Should the last line be: > > >> > > write_dataset_(W, name, qdim); > > >> > > instead? > > >> > > > > >> > > Apart from that, I think we need a bit cleaner workflow without > too many unnecessary commits. I remember that I had advised you in the past > against too large commits, but the ideal is somewhere in the middle. The > commits must in general be organized in logical units from the perspective > of someone looking at the git history. The work you have done here, I would > put it into one or two commits. All the forth and back during the > development, it doesn't need to be part of the repository history. > > >&g
[Getfem-commits] (no subject)
branch: master commit d5d2336dba04b4460fd879d01d5a728db843f5e1 Author: Yves Renard AuthorDate: Mon May 25 18:48:57 2020 +0200 preparing for 5.4.1 patch --- configure.ac| 4 ++-- doc/doxygen/Doxyfile| 2 +- doc/sphinx/source/replaces.txt | 2 +- doc/sphinx/source/whatsnew/5.4.1.rst| 17 + doc/sphinx/source/whatsnew/index.rst| 1 + interface/src/python/setup.py.in| 2 +- interface/tests/matlab-octave/check_spmat.m | 2 +- 7 files changed, 24 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 3a3a19c..a19ba7e 100644 --- a/configure.ac +++ b/configure.ac @@ -27,10 +27,10 @@ dnl thus, updating cache ./config.cache avoided. define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl -AC_INIT(getfem, 5.4) +AC_INIT(getfem, 5.4.1) MAJOR_VERSION="5" MINOR_VERSION="4" -PATCH_VERSION="" +PATCH_VERSION="1" AC_CONFIG_SRCDIR([install-sh]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index ca9f3a4..dbd10c3 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = GetFEM # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 5.4 +PROJECT_NUMBER = 5.4.1 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/doc/sphinx/source/replaces.txt b/doc/sphinx/source/replaces.txt index 5710048..709d8f3 100644 --- a/doc/sphinx/source/replaces.txt +++ b/doc/sphinx/source/replaces.txt @@ -18,7 +18,7 @@ .. |sLU| replace:: *SuperLU* .. |mumps| replace:: *MUMPS* .. |sphinx| replace:: *Sphinx* -.. |version| replace:: 5.4 +.. |version| replace:: 5.4.1 .. |licyears| replace:: 2004-2020 .. |gfi| replace:: *getfem-interface* .. |m| replace:: `mesh` diff --git a/doc/sphinx/source/whatsnew/5.4.1.rst b/doc/sphinx/source/whatsnew/5.4.1.rst new file mode 100644 index 000..e64b1ce --- /dev/null +++ b/doc/sphinx/source/whatsnew/5.4.1.rst @@ -0,0 +1,17 @@ +.. include:: ../replaces.txt + +** + What's New in |gf| 5.4.1 +** + +|gf| 5.4.1 is a patch version that fixes a problem with multithread openblas 0.3.8, used in particular in the LTS Ubuntu 20.04. + +Released version, 2020/05/22. + +The main changes are: + + * Adding a --disable-multithread-blas option to the configure to fix the problem with openblas 0.3.8 + + * Support for export in VTU format. + + diff --git a/doc/sphinx/source/whatsnew/index.rst b/doc/sphinx/source/whatsnew/index.rst index ad5a299..aec8c4e 100644 --- a/doc/sphinx/source/whatsnew/index.rst +++ b/doc/sphinx/source/whatsnew/index.rst @@ -11,6 +11,7 @@ for anyone wishing to stay up-to-date after a new release. .. toctree:: :maxdepth: 2 + 5.4.1.rst 5.4.rst 5.3.rst 5.2.rst diff --git a/interface/src/python/setup.py.in b/interface/src/python/setup.py.in index f0bed8d..f2e926a 100644 --- a/interface/src/python/setup.py.in +++ b/interface/src/python/setup.py.in @@ -68,7 +68,7 @@ getfemmod = Extension('_getfem', setup (name = 'getfem-interface', license='LGPL', - version = '5.3', + version = '5.4.1', maintainer="Yves Renard", maintainer_email="yves.ren...@insa-lyon.fr", description = "This is the getfem-python-interface module", diff --git a/interface/tests/matlab-octave/check_spmat.m b/interface/tests/matlab-octave/check_spmat.m index 1837f7a..8c3b856 100644 --- a/interface/tests/matlab-octave/check_spmat.m +++ b/interface/tests/matlab-octave/check_spmat.m @@ -34,7 +34,7 @@ function check_spmat(iverbose,idebug) asserterr('gf_spmat(''empty'',2:3)'); asserterr('gf_spmat(''empty'',0)'); end; - is_octave = exist('octave_config_info') || exist('octave_core_file_options'); + is_octave = exist('OCTAVE_VERSION', 'builtin'); % TEST EMPTY COPY FULL A = gf_spmat('empty', 5,6); B = gf_spmat('empty', 1);
[Getfem-commits] [getfem-commits] master updated (c60753e -> f4154e8)
renard pushed a change to branch master. from c60753e change option name new d5d2336 preparing for 5.4.1 patch add db725b2 Move enumeration from header file add dbeb54b Minor changes add 9f956bb Export to VTU file format (only ascii), based on the original implementation by Tetsuo Koyama new f4154e8 Merge remote-tracking branch 'origin/devel-logari81-xml' Summary of changes: configure.ac| 4 +- doc/doxygen/Doxyfile| 2 +- doc/sphinx/source/replaces.txt | 7 +- doc/sphinx/source/userdoc/export.rst| 53 --- doc/sphinx/source/whatsnew/5.4.1.rst| 17 ++ doc/sphinx/source/whatsnew/index.rst| 1 + interface/src/python/setup.py.in| 2 +- interface/tests/matlab-octave/check_spmat.m | 2 +- src/getfem/getfem_export.h | 79 - src/getfem_export.cc| 238 +++- 10 files changed, 257 insertions(+), 148 deletions(-) create mode 100644 doc/sphinx/source/whatsnew/5.4.1.rst
[Getfem-commits] (no subject)
branch: master commit f4154e8902ce267a149c2249000ff2ffa9ba55a9 Merge: d5d2336 9f956bb Author: Yves Renard AuthorDate: Mon May 25 18:49:07 2020 +0200 Merge remote-tracking branch 'origin/devel-logari81-xml' doc/sphinx/source/replaces.txt | 5 +- doc/sphinx/source/userdoc/export.rst | 53 src/getfem/getfem_export.h | 79 ++-- src/getfem_export.cc | 238 +++ 4 files changed, 233 insertions(+), 142 deletions(-)
[Getfem-commits] [getfem-commits] branch devel-logari81-xml deleted (was 9f956bb)
renard pushed a change to branch devel-logari81-xml. was 9f956bb Export to VTU file format (only ascii), based on the original implementation by Tetsuo Koyama The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[Getfem-commits] (no subject)
branch: master commit 14b574e0ef49c45ecb582bbe95342745381ebe5c Author: Yves Renard AuthorDate: Sat May 23 15:54:02 2020 +0200 regularising status of getfem_im_list.h --- .gitignore | 1 + cubature/Makefile.am | 3 --- src/Makefile.am | 7 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 796f14a..4dd8688 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ Makefile /config.h /config.status /cubature/getfem_im_list.h +/src/getfem/getfem_im_list.h /getfem-config /getfem-config-notinstalled /gmm-config diff --git a/cubature/Makefile.am b/cubature/Makefile.am index e1ad1a5..58f811c 100644 --- a/cubature/Makefile.am +++ b/cubature/Makefile.am @@ -22,8 +22,5 @@ EXTRA_DIST = $(IM_METHODS_LOC) make_getfem_im_list getfem_im_list.h getfem_im_list.h : $(IM_METHODS) $(top_srcdir)/cubature/make_getfem_im_list $(top_srcdir)/cubature - cp ./getfem_im_list.h ../src/getfem/getfem_im_list.h - - CLEANFILES = getfem_im_list.h diff --git a/src/Makefile.am b/src/Makefile.am index 085186d..16d06fc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -247,12 +247,15 @@ SRC = \ getfem_continuation.cc # getfem_enumeration_dof_para.cc +getfem/getfem_im_list.h : ../cubature/getfem_im_list.h + cp ../cubature/getfem_im_list.h getfem/getfem_im_list.h + lib_LTLIBRARIES = libgetfem.la libgetfem_la_SOURCES = $(SRC) libgetfem_la_LDFLAGS = ${LIBTOOL_VERSION_INFO} libgetfem_la_LIBADD = @SUPERLU_LIBS@ @MUMPS_LIBS@ AM_CPPFLAGS = -I$(top_srcdir)/src -I../src -I$(top_srcdir) -CLEANFILES = ii_files/* *.o.d -DISTCLEANFILES = getfem/getfem_im_list.h getfem/getfem_arch_config.h gmm/gmm_arch_config.h +CLEANFILES = ii_files/* *.o.d getfem/getfem_im_list.h +DISTCLEANFILES = getfem/getfem_arch_config.h gmm/gmm_arch_config.h
[Getfem-commits] (no subject)
branch: master commit 44541beb7541f6627382ef644948cb0db4a3b68e Author: Yves Renard AuthorDate: Fri May 22 17:49:36 2020 +0200 minor changes --- doc/sphinx/source/.templates/indexcontent.html | 2 +- interface/tests/matlab-octave/check_all.m | 19 +-- interface/tests/matlab-octave/check_mitc.m | 2 +- interface/tests/matlab-octave/check_spmat.m| 2 +- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/doc/sphinx/source/.templates/indexcontent.html b/doc/sphinx/source/.templates/indexcontent.html index d6da0b0..eaf4190 100644 --- a/doc/sphinx/source/.templates/indexcontent.html +++ b/doc/sphinx/source/.templates/indexcontent.html @@ -10,7 +10,7 @@ NEW (April 2020): Version 5.4 has been released. -Thank you for citing https://hal.archives-ouvertes.fr/hal-02532422/document;> [GetFEM2020] in scientific work using GetFEM. +Thank you for citing https://hal.archives-ouvertes.fr/hal-02532422/document;> [GetFEM2020] in scientific works that use GetFEM. Parts of the documentation: diff --git a/interface/tests/matlab-octave/check_all.m b/interface/tests/matlab-octave/check_all.m index bde1970..365ea1f 100644 --- a/interface/tests/matlab-octave/check_all.m +++ b/interface/tests/matlab-octave/check_all.m @@ -15,9 +15,10 @@ % along with this program; if not, write to the Free Software Foundation, % Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -errcnt=0; +errcnt=0; nbtests=0; t = 'check_integ [integration methods]'; try + nbtests=nbtests+1; check_integ; disp(['== ' t ': SUCCESS']); catch @@ -26,6 +27,7 @@ end; t = 'check_fem [finite element methods] '; try + nbtests=nbtests+1; check_fem; disp(['== ' t ': SUCCESS']); catch @@ -34,6 +36,7 @@ end; t = 'check_geotrans [geometric transformations] '; try + nbtests=nbtests+1; check_geotrans; disp(['== ' t ': SUCCESS']); catch @@ -42,6 +45,7 @@ end; t = 'check_workspace [objects management] '; try + nbtests=nbtests+1; check_workspace; disp(['== ' t ': SUCCESS']); catch @@ -50,6 +54,7 @@ end; t = 'check_mesh_fem [mesh_fem manipulations] '; try + nbtests=nbtests+1; check_mesh_fem; disp(['== ' t ': SUCCESS']); catch @@ -58,6 +63,7 @@ end; t = 'check_asm [assembly routines]'; try + nbtests=nbtests+1; check_asm; disp(['== ' t ': SUCCESS']); catch @@ -66,6 +72,7 @@ end; t = 'check_oo [pseudo object oriented interface] '; try + nbtests=nbtests+1; check_oo; disp(['== ' t ': SUCCESS']); catch @@ -74,6 +81,7 @@ end; t = 'check_slices [mesh slicing functions]'; try + nbtests=nbtests+1; check_slices; disp(['== ' t ': SUCCESS']); catch @@ -82,6 +90,7 @@ end; t = 'check_spmat [sparse matrix functions]'; try + nbtests=nbtests+1; check_spmat; disp(['== ' t ': SUCCESS']); catch @@ -90,6 +99,7 @@ end; t = 'check_plasticity [model brick complex generic assembly] '; try + nbtests=nbtests+1; check_plasticity; disp(['== ' t ': SUCCESS']); catch @@ -98,6 +108,7 @@ end; t = 'check_mitc [check mitc4 element and elementary transformations] '; try + nbtests=nbtests+1; check_mitc; disp(['== ' t ': SUCCESS']); catch @@ -106,6 +117,7 @@ end; t = 'demo_laplacian [model use for solving a Poisson problem] '; try + nbtests=nbtests+1; automatic_var654 = 1; demo_laplacian; disp(['== ' t ': SUCCESS']); @@ -115,6 +127,7 @@ end; t = 'demo_laplacian_DG [model use for solving a Poisson problem] '; try + nbtests=nbtests+1; automatic_var654 = 1; demo_laplacian_DG; disp(['== ' t ': SUCCESS']); @@ -124,6 +137,7 @@ end; t = 'demo_periodic_laplacian [model use for solving a Poisson problem] '; try + nbtests=nbtests+1; automatic_var654 = 1; demo_periodic_laplacian; disp(['== ' t ': SUCCESS']); @@ -133,6 +147,7 @@ end; t = 'demo_refine [adaptative refinement for an elastostatic problem] '; try + nbtests=nbtests+1; automatic_var654 = 1; demo_refine; disp(['== ' t ': SUCCESS']); @@ -142,7 +157,7 @@ end; if (errcnt), - disp(sprintf('\n\n== %d/11 tests FAILED\n', errcnt)); + disp(sprintf('\n\n== %d/%d tests FAILED\n', errcnt, nbtests)); else disp(sprintf('\n\n== All tests succeeded\n')); end; diff --git a/interface/tests/matlab-octave/check_mitc.m b/interface/tests/matlab-octave/check_mitc.m index d46db1c..99818d3 100644 --- a/interface/tests/matlab-octave/check_mitc.m +++ b/interface/tests/matlab-octave/check_mitc.m @@ -114,7 +114,7 @@ switch (dirichlet_version) case 2, gf_model_set(md, 'add Dirichlet condition with penalization', mim, 'u', r, 1, 'DirichletData'); end -gf_model_get(md, 'solve'); +gf_model_get(md, 'solve', 'noisy'); U = gf_model_get(md, 'variable', 'u'); gfassert('abs(min(U) + 0.1828) < 0.001'); diff --git a/interface/tests/matlab-octave/check_spmat.m b/interface/tests/matlab-octave/check_spmat.m index 1f26c77..1837f
[Getfem-commits] [getfem-commits] branch devel-logari81-gcc9-openmp deleted (was b776339)
renard pushed a change to branch devel-logari81-gcc9-openmp. was b776339 An option for setting open_blas_num_thread to one for fixing a freeze with openblas 0.3.8 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[Getfem-commits] [getfem-commits] master updated (a501150 -> c60753e)
renard pushed a change to branch master. from a501150 using macros in that demo file new 44541be minor changes add efe0d45 Fix compilation and test errors with --enable-openmp add b63998e Fix compilation warnings and reduce code duplication add 77d6f76 Prioritize generic blas detection add b776339 An option for setting open_blas_num_thread to one for fixing a freeze with openblas 0.3.8 new 7054fcf Merge branch 'devel-logari81-gcc9-openmp' new 14b574e regularising status of getfem_im_list.h new c60753e change option name Summary of changes: .gitignore |1 + configure.ac | 47 +- cubature/Makefile.am |3 - doc/sphinx/source/.templates/indexcontent.html |2 +- interface/tests/matlab-octave/check_all.m | 19 +- interface/tests/matlab-octave/check_mitc.m |2 +- interface/tests/matlab-octave/check_spmat.m|2 +- src/Makefile.am|7 +- src/getfem/bgeot_small_vector.h| 253 +- src/getfem/getfem_im_list.h| 6070 src/getfem/getfem_omp.h|5 +- src/getfem_omp.cc | 38 +- tests/test_kdtree.cc |2 + tests/test_small_vector.cc |3 +- 14 files changed, 3246 insertions(+), 3208 deletions(-)
[Getfem-commits] (no subject)
branch: master commit 7054fcffab590744ca8a77b88349b114535129cb Merge: 44541be b776339 Author: Yves Renard AuthorDate: Sat May 23 15:52:41 2020 +0200 Merge branch 'devel-logari81-gcc9-openmp' configure.ac| 37 +- src/getfem/bgeot_small_vector.h | 253 +- src/getfem/getfem_im_list.h | 6070 +++ src/getfem/getfem_omp.h |5 +- src/getfem_omp.cc | 38 +- tests/test_kdtree.cc|2 + tests/test_small_vector.cc |3 +- 7 files changed, 3220 insertions(+), 3188 deletions(-)
[Getfem-commits] [getfem-commits] branch master updated: using macros in that demo file
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new a501150 using macros in that demo file a501150 is described below commit a50115014db40cb9225158b5a66d1a7e7ac8c1c9 Author: Yves Renard AuthorDate: Wed Apr 29 15:40:47 2020 +0200 using macros in that demo file --- interface/tests/python/demo_nonlinear_elasticity.py | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/interface/tests/python/demo_nonlinear_elasticity.py b/interface/tests/python/demo_nonlinear_elasticity.py index ff092db..f3aae75 100644 --- a/interface/tests/python/demo_nonlinear_elasticity.py +++ b/interface/tests/python/demo_nonlinear_elasticity.py @@ -84,16 +84,13 @@ if (not(explicit_potential)): else: print("Explicit elastic potential") K = 1.2; mu = 3.0; -_F_ = "(Id(3)+Grad_u)" -_J_= "Det{F}".format(F=_F_) -_be_ = "(Left_Cauchy_Green{F})".format(F=_F_) - -_expr_1 = "{K_over_2}*sqr(log({J}))+{mu_over_2}*(Matrix_j1{be}-3)"\ - .format(K_over_2=K/2., J=_J_, mu_over_2=mu/2., be=_be_) - -_expr_2 = "{K_over_2}*sqr(log({J}))+{mu_over_2}*(pow(Det{be},-1./3.)*Trace{be}-3)"\ - .format(K_over_2=K/2., J=_J_, mu_over_2=mu/2., be=_be_) - +md.add_macro('F_', '(Id(meshdim)+Grad_u)') +md.add_macro('J_', 'Det(F_)') +md.add_macro('be_', 'Left_Cauchy_Green(F_)') +md.add_initialized_data('K', [K]) +md.add_initialized_data('mu', [mu]) +_expr_1 = "(K/2)*sqr(log(J_))+(mu/2)*(Matrix_j1(be_)-3)"; +_expr_2 = "(K/2)*sqr(log(J_))+(mu/2)*(pow(Det(be_),-1./3.)*Trace(be_)-3)" md.add_nonlinear_term(mim, _expr_2);
[Getfem-commits] [getfem-commits] branch master updated: very minor change
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 8a789d9 very minor change 8a789d9 is described below commit 8a789d9d12a125e80f424882806fedce6888bef5 Author: Yves Renard AuthorDate: Sun Apr 26 17:55:50 2020 +0200 very minor change --- src/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 5d377e9..085186d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -253,6 +253,6 @@ libgetfem_la_LDFLAGS = ${LIBTOOL_VERSION_INFO} libgetfem_la_LIBADD = @SUPERLU_LIBS@ @MUMPS_LIBS@ AM_CPPFLAGS = -I$(top_srcdir)/src -I../src -I$(top_srcdir) -CLEANFILES = ii_files/* *.o.d gmm/gmm_arch_config.h -DISTCLEANFILES = getfem/getfem_im_list.h getfem/getfem_arch_config.h +CLEANFILES = ii_files/* *.o.d +DISTCLEANFILES = getfem/getfem_im_list.h getfem/getfem_arch_config.h gmm/gmm_arch_config.h
[Getfem-commits] [getfem-commits] branch master updated: removing a mumps dependance
This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem. The following commit(s) were added to refs/heads/master by this push: new 71517be removing a mumps dependance 71517be is described below commit 71517bed3071f1c0d176e3a967c162be9ba753a0 Author: Yves Renard AuthorDate: Sun Apr 26 15:14:38 2020 +0200 removing a mumps dependance --- interface/tests/python/check_mixed_mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/tests/python/check_mixed_mesh.py b/interface/tests/python/check_mixed_mesh.py index ecb2b85..a786cf0 100644 --- a/interface/tests/python/check_mixed_mesh.py +++ b/interface/tests/python/check_mixed_mesh.py @@ -127,7 +127,7 @@ md.add_source_term_brick(mim, 'u', 'Fdata', NEUMANN_BOUNDARY) md.add_initialized_data('DirichletData', [0, 0, 0]) md.add_Dirichlet_condition_with_simplification('u', DIRICHLET_BOUNDARY,'DirichletData') -md.solve('max_res', 1E-9, 'max_iter', 100, 'noisy', 'lsolver', 'mumps', 'lsearch', 'simplest', 'alpha min', 0.8) +md.solve('max_res', 1E-9, 'max_iter', 100, 'noisy', 'lsearch', 'simplest', 'alpha min', 0.8) U = md.variable('u');