Re: [deal.II] Maybe typo on Step-40's webpage

2019-12-11 Thread Zhidong Brian Zhang
Dear, David, Thank you very much for your timely reply! Now it is clear. It is so important to double check with experts of deal.ii. I already opened a GitHub issue: https://github.com/dealii/dealii/issues/9163 Thanks Best regards, Zhidong Brian Zhang On Wednesday, December 11, 2019

[deal.II] Maybe typo on Step-40's webpage

2019-12-11 Thread Zhidong Brian Zhang
no offence), because I may miss some important point here. Thank you very much for your attention! Zhidong Brian Zhang -- 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 beca

Re: [deal.II] Vector conversion problem: between dealii::PETScWrappers::MPI::Vector and a PETSc Vec

2019-12-10 Thread Zhidong Brian Zhang
! Zhidong Brian Zhang On Saturday, December 7, 2019 at 5:50:05 PM UTC-5, David Wells wrote: > > Hi Zhidong, > > I am happy to help! > > Unfortunately, this is a part of deal.II that has some older code that > has accumulated some inconsistencies over time. Both inconsi

Re: [deal.II] Vector conversion problem: between dealii::PETScWrappers::MPI::Vector and a PETSc Vec

2019-12-04 Thread Zhidong Brian Zhang
dealii::PETScWrappers::MPI::Vector and VectorBase? I mean why not only one (I am a newbie, sorry, no offense)? For my understanding is VectorBase is a wrapper of PETSc Vec and dealii::PETScWrappers::MPI::Vector is a wrapper of VectorBase. Thank you so much for your guidance and help in adva

[deal.II] Re: How to use CellId class

2019-10-24 Thread Zhidong Brian Zhang
On Monday, October 21, 2019 at 1:42:30 AM UTC+2, Zhidong Brian Zhang wrote: >> >> Thank you very much for your prompt reply, Konrad! >> >> My confusion is the output of cell->id(), for example, >> 0_3:000 >> 0_3:200 >> 0_3:003 >> 0_3:006 >> 0_3

Re: [deal.II] How to use CellId class

2019-10-21 Thread Zhidong Brian Zhang
Hi, Dr. W. Bangerth and everyone, Thank you for your help, Dr. W. Bangerth! I have figured the solution out. I summarize it as follows in case that it can help some one else as well. *Problem summary:* In topology optimization, each cell has a scalar variable (pesudo density). So the density

Re: [deal.II] How to use CellId class

2019-10-20 Thread Zhidong Brian Zhang
Sunday, October 20, 2019 at 1:50:49 PM UTC-4, Wolfgang Bangerth wrote: > > On 10/19/19 3:01 PM, Zhidong Brian Zhang wrote: > > > > And I initialize the cell-based vector (the pesudo density in topology > > optimization) as follows, > > > > opt->locally_

[deal.II] Re: How to use CellId class

2019-10-20 Thread Zhidong Brian Zhang
Thank you very much for your prompt reply, Konrad! My confusion is the output of cell->id(), for example, 0_3:000 0_3:200 0_3:003 0_3:006 0_3:406 0_3:606 0_3:206 0_3:007 0_3:407 0_3:607 0_3:207. What type I need to use as the key in std::map? And is the map parallel-distributed? Because my

Re: [deal.II] How to use CellId class

2019-10-19 Thread Zhidong Brian Zhang
em? Thank you very much in advance! Best regards, Zhidong Brian Zhang On Saturday, October 19, 2019 at 10:56:47 AM UTC-4, Wolfgang Bangerth wrote: > > > Zhidong, > > > In short, my question is how to get the cell_id properly by using CellId > class ? > > >

Re: [deal.II] How to use CellId class

2019-10-19 Thread Zhidong Brian Zhang
Hi, Dr. W. Bangerth, Thank you so much for your timely help! I will try it and come back if I have further questions. Best regards, Zhidong Brian Zhang On Saturday, October 19, 2019 at 10:56:47 AM UTC-4, Wolfgang Bangerth wrote: > > > Zhidong, > > > In short, my ques

[deal.II] How to use CellId class

2019-10-18 Thread Zhidong Brian Zhang
Hello, everyone, In short, my question is how to get the cell_id properly by using CellId class ? I want to assign each cell with a different value (its pesudo density in topology optimization). All the values are stored in a cell-based vector x, which is initialized as follows,