ARudik / feelpp

Automatically exported from code.google.com/p/feelpp
0 stars 0 forks source link

error when load an element_type from a database #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
See example in testsuite/feeldiscr/test_element_serialize

What is the expected output? What do you see instead?
Expected : to load an element_type from an existing database
Instead : std::logic_error: load function: invalid number of degrees of freedom 
( from serialize in functionspace )

Please use labels and text to provide additional information.
Needed by CRB

Original issue reported on code.google.com by stephane...@gmail.com on 30 Jun 2012 at 2:18

GoogleCodeExporter commented 9 years ago
is the mesh regenerated between saving and loading?
if that is the case then it is normal that you don't get the same number of 
degrees of freedom, from one run to another of gmsh you may not get the same 
mesh and hence the same number of degrees of freedom and degrees of freedom 
table for that matter.

Original comment by christop...@feelpp.org on 30 Jun 2012 at 2:35

GoogleCodeExporter commented 9 years ago
The mesh was regenerated but when loading from database the element was not 
linked to the function space and that was the mistake.
I will fix that on the test I have introduced in testsuite
Thanks

Original comment by stephane...@gmail.com on 30 Jun 2012 at 4:05

GoogleCodeExporter commented 9 years ago
it is now possible to save the mesh in binary format (see mymesh.cpp)
if you use this functionality you should never this problem again.
It is probablement better to do that anyway to make sure that all the data are 
consistent
 mesh -> functionspace -> function ->...

should this be be closed as "invalid" now ?

Original comment by christop...@feelpp.org on 30 Jun 2012 at 4:19

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 23804690f49a.

Original comment by christop...@feelpp.org on 2 Jul 2012 at 9:28

GoogleCodeExporter commented 9 years ago
As shown by test_element_serialize there is no problem to save/load one 
element_type in the database.
On the other hand I have a problem to load a vector of element_type with still 
the same error message : 
std::logic_error: load function: invalid number of degrees of freedom
I have updated test_element_serialize to show that

Concerning mymesh.cpp it seems that there is a problem when running in 
sequential ( it crash )

Original comment by stephane...@gmail.com on 2 Jul 2012 at 9:41

GoogleCodeExporter commented 9 years ago

Original comment by stephane...@gmail.com on 2 Jul 2012 at 1:51

GoogleCodeExporter commented 9 years ago
As I said, there is a problem during the load of a vector of elements.
As a workaround it's possible to save separately each elements and then when 
loading, to rebuild the vector.
I have updated the file test_element_serialize to show this

Original comment by stephane...@gmail.com on 5 Jul 2012 at 9:14