John, You say that you have a problem but you don't say what it is. There is no way we can help you if you don't tell us what's wrong.
Best, Bruno On Friday, February 22, 2019 at 9:42:22 AM UTC-5, yswang wrote: > > Dear Paul, > > Thanks for your quick response. My “solution-…txt” file is created from > other language (Julia), just an array. I want to use deal ii to get mesh, > then solve the minimization problem in Julia language on the mesh, and then > do mesh refinement according to the solution by using deal ii again. > I read the block_write() just now, It says that “This is done in a binary > mode, so the output is neither readable by humans nor (probably) by other > computers using a different operating system or number format.”, so I think > it is not what I want. > > Best, > John > > 在 2019年2月22日,下午9:05,Jean-Paul Pelteret <jppelte...@gmail.com> 写道: > > Dear John, > > You don’t say how you write this "solution-…txt” file, so its difficult to > say exactly what the best course of action is. Do you know about the > block_write() > <https://www.dealii.org/9.0.0/doxygen/deal.II/classVector.html#aef98e4994a6c0b20bb33b0290f8d607c> > and block_read() > <https://www.dealii.org/9.0.0/doxygen/deal.II/classVector.html#a57d77409b8591a13d5ee10c2e705593a> > functions? > It looks to me like these already do what you’re trying to implement here. > > I hope that this helps. > > Best, > Jean-Paul > > On 22 Feb 2019, at 09:13, yswang2...@sjtu.edu.cn wrote: > > Dear all, > > > I am a beginner of deal ii and C++. I want to modify some codes in step-6. > I want to load the solution from outside but I meet some problem and have > no idea how to fix it. The following is my modification, I just add a > function: > > template <*int* dim> > > *void* Step6<dim>::read_solution (const *unsigned* *int* cycle) const > > { > > *int* n = 0; > > > > ifstream File; > > File.open("solution-" + std::to_string(cycle) + ".txt"); > > while(!File.eof()) > > { > > File >> solution[n]; > > n++; > > } > > > > File.close(); > > } > > Thanks for your time and I know it’s a simple question. > > > > Bests, > > John > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > > > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > > > -- 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. For more options, visit https://groups.google.com/d/optout.