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: dealii@googlegroups.com <dealii@googlegroups.com> on behalf of andrew 
jack urombo <juro...@hit.ac.zw>
Sent: Thursday, June 24, 2021 2:40 AM
To: dealii@googlegroups.com <dealii@googlegroups.com>
Subject: [deal.II] adaptive mesh refinement for Navier Stokes


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.

--
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<mailto:dealii+unsubscr...@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<https://groups.google.com/d/msgid/dealii/becdd682-abfe-17b9-54df-f240b0eca9c3%40hit.ac.zw?utm_medium=email&utm_source=footer>.

-- 
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 on the web visit 
https://groups.google.com/d/msgid/dealii/BN7PR03MB435622BC39D8EC283B2EB409ED079%40BN7PR03MB4356.namprd03.prod.outlook.com.

Reply via email to