Najwa:
I assume you have taken a look at step-83, the tutorial program that
demonstrates serialization?
https://dealii.org/developer/doxygen/deal.II/step_83.html
Separately, the way to debug these sorts of problems is to create as
small a program as possible that still shows the issue. It doesn't have
to do anything useful, for example you can replace assemble_system() and
solve() by just setting the vector to ones. Can you come up with such a
minimal program?
Best
W.
On 12/2/24 06:34, Najwa Alshehri wrote:
*** Caution: EXTERNAL Sender ***
Dear All,
Thank you for your always support.
I am trying to serialize a Stokes solution in 2d ( dim for velocity +1
for pressure) to use it as a reference solution. Please stop me here if
there is a better way to do this.
Unofortunatly, for some reason that I do not know, the saved_solution is
all zeros or code breaks.
To give more details I am solving using :
, fe(FE_Q<dim>(degree + 1), dim, FE_Q<dim>(degree), 1)
with BlockVector solution. This solution is not zeros ( I checked that).
Then I open a file and save in order the following:
<<triangulation
<<fe
<<dof_handler
<<solution
using
boost::archive::text_iarchive
This finishes with no issues. I even checked if the file is unreadable
or empty, it is not.
When I deserialize to check the saved solution is matching my computed
solution, I use same fe
FESystem<dim> saved_fe(FE_Q<dim>(degree + 1), dim, FE_Q<dim>(degree), 1);
and deserialize in the following order
>>saved_triangulation
>>safe_fe
reint and distribute_dofe for the saved_dof_handler using the saved
triangulation and fe.
>>saved_dof_handler
>>saved solution
After a deep investigation, it seems like " >>saved_dof_handler" is
where the code beaks with error
"----------------------------------------------------
Exception on processing:
input stream error
Aborting!
---------------------------------------------------- "
which means that saved_dof_handler cannot be read form the saved file.
However, I checked after distributing dofs and "saved_dof_handler" has
the correct n_dofs().
In this code I was just checking, so dof_handler is not really needed
here, but in the real code it is need to write a function out of the
solution. For the sake of debugging, I removed " >>saved_dof_handler".
Removing it gives all zeros solution vector. This is suspicious, is it
connected to the saved_dof_handler??
I think I have checked many other things to find the source of the issue
with no success. Conclusion, saved triangulation and saved fe seems to
be correct.
Any one knows what is happening here? I would appreciate any guidance
one what could be a source for the issue.
Best,
Najwa
--
The deal.II project is located at http://www.dealii.org/ <https://
nam10.safelinks.protection.outlook.com/?
url=http%3A%2F%2Fwww.dealii.org%2F&data=05%7C02%7CWolfgang.Bangerth%40colostate.edu%7Cd23d2bd47fb74e7a13d008dd12d617b6%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638687432905944661%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=aL1SluRAwCThs3i1ORCDkJqgy6G5yYqZIzrus4R1hTk%3D&reserved=0>
For mailing list/forum options, see https://groups.google.com/d/forum/
dealii?hl=en <https://nam10.safelinks.protection.outlook.com/?
url=https%3A%2F%2Fgroups.google.com%2Fd%2Fforum%2Fdealii%3Fhl%3Den&data=05%7C02%7CWolfgang.Bangerth%40colostate.edu%7Cd23d2bd47fb74e7a13d008dd12d617b6%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638687432905970544%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=2qVckhsHD78WJek30A49bAR3RHjH4Zt1JpXJchZe8es%3D&reserved=0>
---
You received this message because you are subscribed to the Google
Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to dealii+unsubscr...@googlegroups.com
<mailto:dealii+unsubscr...@googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/dealii/
b2e37661-b458-4dbb-a849-52c6f1744ec2n%40googlegroups.com <https://
nam10.safelinks.protection.outlook.com/?
url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fdealii%2Fb2e37661-
b458-4dbb-
a849-52c6f1744ec2n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C02%7CWolfgang.Bangerth%40colostate.edu%7Cd23d2bd47fb74e7a13d008dd12d617b6%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638687432905991612%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=bgq9j1DMj%2BiUfEMR5WCYiQKw0IYC9OkrnVjtLUdS3GU%3D&reserved=0>.
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/dealii/bd4632fd-eebb-4fc5-bc8c-6ed96086276d%40colostate.edu.