Dear all,

I was wondering if there is a way to create the coordinates vector for
MatNullSpaceCreateRigidBody? I tried traversing all the nodes in the mesh
by doing something like:

coords->init (no_nodes*dim, no_local_nodes*dim, false, PARALLEL);

coords->zero();

 MeshBase::const_node_iterator n = mesh.nodes_begin();

const MeshBase::const_node_iterator end_n = mesh.nodes_end();

 for (;n!=end_n;++n)

{

const Node* node = *n;

const dof_id_type global_dof_u = node-dof_number(elasticity_system_no, 0,0);

const dof_id_type global_dof_v = node-dof_number(elasticity_system_no, 1,0);

const dof_id_type global_dof_w = node-dof_number(elasticity_system_no, 2,0);


 const Number x = (*node)(0);

const Number y = (*node)(1);

coords->set(global_dof_u,x);

coords->set(global_dof_v,y);

const Number z = (*node)(2);

coords->set(global_dof_w,z);

}



with a first order elasticity system (I'm pretty sure the numbering for the
variables in elasticity corresponds to those of the PETSc coordinate vector
this way).

But the Nullspace created by MatNullSpaceCreateRigidBody does not seem to
be working (KSP diverges when I set it through KSPSetNullSpace)!!??

As always thank you for the help,
Ata
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to