Hi
I am having trouble writing a modified version of the assembly function of
Introduction Ex 4. Example 4 demonstrates the method to solve the Poisson
equation.
My domain consists of a 3D unstructured mesh with tetrahedral elements. I
haven't experienced any problems converting my data structures to
libmesh's. I give the nodal BC information with:

  std::vector<Number> values(1);
  MeshBase::const_node_iterator  dumnode     = mesh.nodes_begin();

  for (unsigned int i=0;i<n_nodes;i++ , dumnode++){
    if(dirichletnodes[i]){
      mesh.boundary_info->add_node(*dumnode,0); // give the id 0 to all BC
nodes

      values[0]=bc[i];
      mesh_data.set_data(*dumnode,values);
    }
  }
  mesh.boundary_info->build_side_list_from_node_list();

Where dirichletnodes is a vector<bool> which is true for BC nodes and bc is
the vector of boundary values. As far as I understand, there is not a
problem with this, since printing the info reveals the right number of
constrained dofs.
The problem is that the example (I think) uses the exact solution function
to impose boundary conditions in the element loop. I couldn't figure out a
workaround, so I am asking here, how can I impose nodal boundary conditions
in the assembly function?
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to