Hello,
I have a two-step method to be run in parallel. It gives an approximation
in the first step (FS), and solves for a correction step (CS). I have read
a lot about shared memory parallelization, but I couldn't figure out how to
do it.
The corresponding part in my current code looks as follows:
namespace ADM_deferred_correction
{
using namespace dealii;
template <int dim>
class ADM_deferred_correction_original
{
public:
ADM_deferred_correction_original(const double viscosity,
const double delta_t,
const double final_time);
void run(const unsigned int n_refinements);
private:
... other pieces
void run_FS(const unsigned int n_time_steps);
void run_CS(const unsigned int n_time_steps);
... other pieces
}
template <int dim>
void ADM_deferred_correction_original<dim>::run(const unsigned int
n_refinements)
{
setup_dofs();
initial_construction();
.
.
.
run_FS(n_time_steps);
run_CS(n_time_steps);
}
Here, run_FS(n_time_steps) is independent from CS, so I can run it a little
bit earlier but parallel to run_CS(n_time_steps). I think I can take care
of running it earlier part with mutex, but I couldn't create a working
thread for these two different runs. This might be an easy task but I just
couldn't figure out for some reason. Any reference, or a piece of code
would be greatly appreciated.
Thanks,
Mustafa.
--
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.