Thanks Wolfgang. I will test this. Following function should work.

best
praveen

   void add_dirichlet_constraints (const
std::map<types::global_dof_index,double> &values,
                                   ConstraintMatrix
      &constraints)
   {
      for (const auto &pair : values)
      {
         constraints.add_line (pair.first);
         constraints.set_inhomogeneity (pair.first, pair.second);
      }
   }


On 23-Jun-2016, at 11:23 AM, Wolfgang Bangerth <bange...@tamu.edu> wrote:

On 06/23/2016 12:48 AM, Praveen C wrote:


I have created a

std::map<types::global_dof_index,double> boundary_values;

I want to add this to a ConstraintMatrix but I could not find any function
to
do this.

>From the documentation, I could do

for each dirichlet dof
{
add_line(...)
set_inhomogeneity(...)
}

Is this the only way to accomplish what I want ?


Praveen -- yes, at the moment it is. But I think it would be useful to have
such a function in ConstraintMatrix. Want to give it a try? Maybe call it
add_identity_constraints()?

Cheers
W.

-- 
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.

Reply via email to