On 09/27/2016 06:44 AM, Deepak Gupta wrote:
Dear All,
Below is a simple piece of code where one finite element has a different
p-order compared to the rest. Thus, I expect certain hanging_node_constraints
(which is 4) in the output. What I cannot figure out is why I get *zero
*constraints when I check the hanging constraints a second time? More can be
understood from the code below which forms part of the setup_system() function
in my code. The associated output follows the code.
boundary_values.clear();
dof_handler.distribute_dofs(fe_collection);
hanging_node_constraints.clear();
DoFTools::make_hanging_node_constraints(dof_handler,
hanging_node_constraints);
boundary_info(); //created by me for updating rhe boundary indicators
//Applying the boundary conditions
BoundaryValues<dim> boundary_v;
VectorTools::interpolate_boundary_values(dof_handler,
42,
boundary_v,
boundary_values);
//hanging_node_constraints.close();
std::cout<< "No.of degrees of freedom: " << dof_handler.n_dofs() << "\n";
std::cout<<"No. of hanging node constraints :
"<<hanging_node_constraints.n_constraints()<<std::endl;
boundary_values.clear();
hanging_node_constraints.clear();
DoFTools::make_hanging_node_constraints(dof_handler,
hanging_node_constraints);
boundary_info(); //created by me for updating rhe boundary indicators
//Applying the boundary conditions
VectorTools::interpolate_boundary_values(dof_handler,
42,
boundary_v,
boundary_values);
hanging_node_constraints.close();
std::cout<< "No.of degrees of freedom: " << dof_handler.n_dofs() << "\n";
std::cout<<"No. of hanging node constraints :
"<<hanging_node_constraints.n_constraints()<<std::endl;
*OUTPUT
No.of degrees of freedom: 6652
No. of hanging node constraints : 4
No.of degrees of freedom: 6652
No. of hanging node constraints : 0
Deepak, this looks wrong but since this is such a well tested part of the
library, I can only assume that your code is doing something wrong. But then,
I've been known to suspect the bug somewhere outside the library :-) Can you
create a small, self-contained testcase that shows the problem?
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.