adaptive mesh refinement for Navier Stokes

50 views
Skip to first unread message

andrew jack urombo

unread,
Jun 24, 2021, 2:40:56 AM6/24/21
to dea...@googlegroups.com

I am working on a adaptive finite elements for flows. For starters I want to base my simulation on Step 35 and introduce the refine_mesh( )  like in Step 26 to it:

See attached code snippet.

When I make I get the error message:

[ 50%] Building CXX object CMakeFiles/step-35a.dir/step-35a.cc.o
/home/dealii/examples/step-35a/step-35a.cc: In member function ‘void Step35a::NavierStokesProjection<dim>::refine_mesh(unsigned int, unsigned int)’:
/home/dealii/examples/step-35a/step-35a.cc:1057:5: error: there are no arguments to ‘setup_system’ that depend on a template parameter, so a declaration of ‘setup_system’ must be available [-fpermissive]
 1057 |     setup_system();
      |     ^~~~~~~~~~~~
/home/dealii/examples/step-35a/step-35a.cc:1057:5: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/dealii/examples/step-35a/step-35a.cc:1059:32: error: ‘previous_solution’ was not declared in this scope
 1059 |     solution_trans.interpolate(previous_solution, output_results);
      |                                ^~~~~~~~~~~~~~~~~
/home/dealii/examples/step-35a/step-35a.cc:1060:5: error: ‘constraints’ was not declared in this scope
 1060 |     constraints.distribute(output_results);
      |     ^~~~~~~~~~~
make[2]: *** [CMakeFiles/step-35a.dir/build.make:63: CMakeFiles/step-35a.dir/step-35a.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:272: CMakeFiles/step-35a.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
dealii@cd3db784d9d2:~/examples/step-35a$ ^C

Anyone with any idea how to fix this, or have implemented a similar problem in dealii.

Thank you.



-- 
mathematical sciences
15015 Ganges road
p.o box be277
belvedere
harare
zimbabwe

business:   +263.24.274.1423-36
fax : +263.24.274.1408
mobile zw1: +263.77.283.8167
mobile zw2: +263.77.412.0815
mobile ind: +91.844.867.9322
home : +263.68.215.3910

The information in this message is confidential and legally privileged. It is intended solely for the addressee(s). Access to this message by anyone else is unauthorized. If received in error, please accept our apologies and notify the sender immediately. You must also delete the original message from your machine. If you are not the intended recipient, any use, disclosure, copying, distribution or action taken in reliance of it, is prohibited and may be unlawful. The information, attachments, opinions or advice contained in this email are not the views or opinions of Harare Institute of Technology, its subsidiaries or affiliates. Although this email and any attachments are believed to be free of any virus or other defects which might affect any computer or IT system into which they are received, no responsibility is accepted by Harare Institute of Technology and/or its subsidiaries for any loss or damage arising in any way from the receipt or use thereof.

refine_mesh.cc

Bruno Turcksin

unread,
Jun 24, 2021, 8:25:10 AM6/24/21
to deal.II User Group
Hello,

The error message is pretty clear: you are calling the function setup_system() but you didn't define it. I am guessing the function exists in Step 26 but not in Step 35.

Best,

Bruno

Wells, David

unread,
Jun 24, 2021, 9:49:36 AM6/24/21
to dea...@googlegroups.com
Hi Andrew Jack,

This is a reasonable start but, as the error messages state, you need to implement some more features in your code for this to work. In particular, step-26 has a separate function that reinitializes all of the DoFs, sparsity patterns, and matrices called setup_system() - there is no equivalent ins tep-35 because that program does not use time-dependent AMR. The same goes for the solution transfer object - you will need to set up "before and after" vectors if you want to use prolongatation and restriction to transfer the solution across mesh refinements.

Best,
David Wells

From: dea...@googlegroups.com <dea...@googlegroups.com> on behalf of andrew jack urombo <jur...@hit.ac.zw>
Sent: Thursday, June 24, 2021 2:40 AM
To: dea...@googlegroups.com <dea...@googlegroups.com>
Subject: [deal.II] adaptive mesh refinement for Navier Stokes
 
--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/becdd682-abfe-17b9-54df-f240b0eca9c3%40hit.ac.zw.
Reply all
Reply to author
Forward
0 new messages