Hello, Xuesong
In the lines within the setInitialCondition such as
{dealii::Point<dim> p(0.2, 0.15); center.push_back(p);}
"p
" is a new variable that is local to the scope defined by the curly braces {}
. Even though it has the same name as the function argument (const dealii::Point<dim> &p), it is a separate variable that exists only within its block. In C++, variables declared in inner scopes (such as inside loops or blocks) can have the same name as those declared in outer scopes without causing conflicts.
That being said, I think the name of the local variable should be changed to avoid confusion. I have opened issue
#255 about this.
I hope this is helpful,
David