I'm trying to develop my CFD solver with MPI. Basically, I have the first struct with object cell contains a member U which is related to the second struct members ele1, ele2, ele3, ele4 each of them is a 2D array.
struct vectore_element{
double ele1 [N][M];
double ele2 [N][M];
double ele3 [N][M];
double ele4 [N][M];
};
struct cell center{
struct vector_element U;
}cell;
My question is, how to use scatter with these structures to divide the arrays among the tasks? and how can I send/receive part of it from one process to another?
basically, how to create the MPI data type for such data type?