Hi all
I want to use the mesh lshaped.xda that is used in several examples.
Although I want to set the boundary conditions using the
function add_dirichlet_boundary. Right now, I want to set all the
boundaries to have a dirichlet condition of zero. This is what I do:
// Create mesh (dim = 2)
Mesh mesh(init.comm(),dim);
// Read the mesh from a file
mesh.read("lshaped.xda");
// Get the set of boundary ids
const std::set<boundary_id_type> boundary_ids =
mesh.boundary_info->get_boundary_ids();
// Create a vector storing the variable numbers which the BC applies to
(u_var has been declared already)
std::vector<unsigned int> vars;
vars.push_back( u_var );
// We want zero displacements
ZeroFunction<Number> zero;
// We must add the Dirichlet boundary condition _before_
// we call equation_systems.init()
system.get_dof_map().add_dirichlet_boundary(libMesh::DirichletBoundary(
boundary_ids, vars, &zero ));
My problem is that the solver doesn't converge. There must be a mistake in
the way I add the BC because using a simple square mesh the code works well.
Thanks in advance
Miguel
--
*Miguel Angel Salazar de Troya*
Graduate Research Assistant
Department of Mechanical Science and Engineering
University of Illinois at Urbana-Champaign
(217) 550-2360
[email protected]
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users