Hello fellow libMesh users,
I am trying to parallelize my program, but encountered a problem.
I want to assign nodal values by looping through nodes in each
processor. The nodal values are stored in ExplicitSystem object.
.....
const int sys_num_ex = system_ex.number();
const unsigned int v_var = system_ex.variable_number("v");
// get the solution vectors
AutoPtr< NumericVector< Number > > solution_ex = system_ex.solution;
// iterate through nodes to set the nodal variables
MeshBase::const_node_iterator node_it = mesh.local_nodes_begin();
const MeshBase::const_node_iterator node_end = mesh.local_nodes_end();
for (; node_it != node_end; ++node_it){
const Node* node = *node_it;
// calculate v for each node
.....
.....
const int v_dof = node->dof_number(sys_num_ex, v_var, 0);
(solution_ex.get())->close();
(solution_ex.get())->set(v_dof, v);
(solution_ex.get())->close();
}
// return the solution vector pointers
system_ex.solution = solution_ex;
.....
The program works with one processor, but it just freezes after going
through a few loops when I run it with two or more processors.
Does anybody know what I am doing wrong?
Thanks,
Yusuke
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users