Hello Deal.ii Friends,

I want to set 2 constraints (P = 0 and \delta P = 0) on the scalar pressure 
variable on a single point (4, 0.1) at the outlet. Here, \delta P is the 
Newton's iteration update value for P.

I used "constraints_hp_nonzero" to interpolate the real boundary values for 
my physical problem and "constraints_newton_boundary" to interpolate the 
Newton updates values on the boundaries.

I found that one can only set one type of constraint on a singel index. 
Therefore, the following snippet code would generate errors, since I was 
trying to set 2 different constraints simultaneously on the same dof index. 

Point<dim> point(4.0, 0.1);
std::set<unsigned int> constrained_dofs;
const unsigned int pressure_component = extractor_stokes_pressure.component;
                    for (const auto &cell : 
dof_handler.active_cell_iterators())
                    {
                        if (cell->is_locally_owned() )
                        {
                            for (unsigned int v=0; 
v<GeometryInfo<dim>::vertices_per_cell; ++v)
                            {
                                if (cell->vertex(v).distance(point) < 1e-8)
                                {
                                    // get the index 
                                    unsigned int dof_index = 
cell->vertex_dof_index(v,
                                                                            
        pressure_component);

                                    if (constrained_dofs.find(dof_index) == 
constrained_dofs.end())
                                    {
                                        pcout << "index" << dof_index << 
std::endl;
                                        
//constraints_newton_boundary.add_line(dof_index);
                                        
                                        
constraints_hp_nonzero.add_line(dof_index);
                                        constrained_dofs.insert(dof_index);
                                    }
                                }
                            }
                        }
                    }

Back to my problem. 

If I want to successfully impose the 2 constraints: P=0  and delta P=0 on 
point (4,0.1), does it exist a better way? Could you kindly give me some 
hints?


I appreciate any reply to my question here. 


Regards,
Lee

-- 
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/259ea4a1-edab-451a-82c4-31f514e0ed5dn%40googlegroups.com.

Reply via email to