I am running an FEM-calculation together with custom calculations (can be
MPI-based) on a cluster. Now I do not need each part of the program to
execute the same calculations. Instead I intended to use the following code:
In the class definition:
class FEM_calculations{
private:
propagation_module module;
public:
//Everything else
}
and in the run()-function of the dealII-code:
void FEM_calculations::run()
{
//Initialization
if(Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
{
module = propagation_module(parameters);
module.create_time_steps(parameters, start_time, max_time,
pulse_duration, int((max_time - start_time)/time_step));
}
//Execute calculations
if(Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
{
module.propagate_pulse(parameters, cur_step);
module.prepare_interpolation();
}
//Everything else
}
Finally, I want to access the results on all nodes in the
assemble-system()-function:
void FEM_calculations::assemble_system()
{
do_something_with_result(module.propagation_result);
}
But now it looks like as if only the first node gets the result of the
calculations, but the others do not, instead defaulting to the default
values of the calculation function when not initialized. Is there a way I
can still run the functions module.propagate_pulse() and
module.prepare_interpolation() still only from the first node, but getting
the result to all other nodes? Or do I have to run the function on every
node (i.e. remove the if()-clauses)? How should I then handle the fact that
my custom function can benefit from being run on multiple nodes at once?
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.