feelpp / feelpp

:gem: Feel++: Finite Element Embedded Language and Library in C++
https://docs.feelpp.org
GNU Lesser General Public License v3.0
303 stars 66 forks source link

Non existing marked elements #389

Closed jbwahl closed 10 years ago

jbwahl commented 10 years ago

There is nothing to check if an used marked element is empty or not at the moment. This is not an issue since the user is supposed to know his geometry but it can leads (on osx at least) to unexpected error messages.

For instance if you run (on osx) feelpp_qs_ns in sequential and without the proper geometry, you get the following error :


[0]PETSC ERROR: --------------------- Error Message ------------------------------------ [0]PETSC ERROR: Invalid pointer! [0]PETSC ERROR: Null Pointer: Parameter # 3! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Release Version 3.4.4, Mar, 13, 2014 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: ./feelpp_qs_ns on a arch-darwin-cxx-debug named irma-dhcp-14.u-strasbg.fr by wahl Wed Jun 25 16:55:59 2014 [0]PETSC ERROR: Libraries linked from /usr/local/Cellar/petsc/3.4.4/arch-darwin-cxx-debug/lib [0]PETSC ERROR: Configure run at Mon Mar 31 11:29:17 2014 [0]PETSC ERROR: Configure options --prefix=/usr/local/Cellar/petsc/3.4.4/arch-darwin-cxx-debug --with-debugging=1 --with-pic=1 --with-shared-libraries --with-clanguage=C++ --with-scalapack=1 --with-scalapack-include=/usr/local/include/ --with-scalapack-lib="[/usr/local/lib/libscalapack.a]" --with-cholmod=1 --with-cholmod-include=/usr/local/include/ --with-cholmod-lib="[/usr/local/lib/libcholmod.a,/usr/local/lib/libcolamd.a]" --with-umfpack=1 --with-umfpack-include=/usr/local/include/ --with-umfpack-lib="[/usr/local/lib/libumfpack.a,/usr/local/lib/libcholmod.a,/usr/local/lib/libcolamd.a,/usr/local/lib/libamd.a,/usr/local/lib/libsuitesparseconfig.a]" --with-ptscotch=1 --with-ptscotch-include=/usr/local/opt/scotch5/include/ --with-ptscotch-lib="[/usr/local/opt/scotch5/lib/libptesmumps.a,/usr/local/opt/scotch5/lib/libptscotch.a,/usr/local/opt/scotch5/lib/libptscotcherr.a]" --with-mumps=1 --with-mumps-include=/usr/local/include --with-mumps-lib="[/usr/local/lib/libdmumps.a,/usr/local/lib/libzmumps.a,/usr/local/lib/libsmumps.a,/usr/local/lib/libcmumps.a,/usr/local/lib/libmumps_common.a,/usr/local/lib/libpord.a]" [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: VecSetValues() line 868 in /tmp/petsc-jEOY/petsc-3.4.4/src/vec/vec/interface/rvector.c [0]PETSC ERROR: addVector() line 150 in "unknowndirectory/"/Users/wahl/Feelpp/feelpp/feel/feelalg/vectorpetsc.cpp


This happens because the on function try to create a vector with no dofs.

We could add some kind of verification when markedfaces or markedelements is called ?

aancel commented 10 years ago

Indeed, I can reproduce this error on OS X

jbwahl commented 10 years ago

In feelvf/on.hpp the line 502 : CHECK( dofs.size() > 0 ) << "Invalid number of Dirichlet dof, should be > 0 "; is commented but this check should solve the issue.