Hi all:

I am trying to put together an overset mesh code and will need to transfer 
information across overset boundaries. I also will need to have access to 
donor/acceptor cell pairs. I am having trouble being able to access 
information of the cell, like cell->bounding_box() once it is being sent 
via MPI. I can "print" the cell (std::cout) to see that I am sending and 
receiving items correctly, but this is a naive way to do it for this 
particular object. I've included a snippet of code below to demonstrate 
what I am doing. 

int sends = 0;
  for(unsigned int m=0; m<n_meshes;++m){
    if(num_sends >0 && m!=row_tria){
        MPI_Isend(send_faces, num_sends, MPI_UNSIGNED, dest[m],
                  1, mpi_communicator, &requests[sends]);
         MPI_Isend(send_cells, num_sends*size_dh, MPI_BYTE, dest[m],
                   2, mpi_communicator, &requests[sends+1]);
        sends += 2;
    }
  }

  MPI_Status recv_face_status;
  MPI_Status recv_cells_status;

  int num_faces_recvd = num_faces_to_recv;
  int recvd_faces = 0;
  int beg_index = 0;

  int *from_mesh = new int[num_faces_to_recv];

  if(mesh_rank == 0 ){
    while(num_faces_recvd > 0){
      MPI_Recv(recv_faces, max_recv_faces, MPI_UNSIGNED,
                 MPI_ANY_SOURCE, 1, mpi_communicator, &recv_face_status);
      MPI_Recv(recv_cells, max_recv_faces*size_dh, MPI_BYTE,
               MPI_ANY_SOURCE, 2, mpi_communicator, &recv_cells_status);

      MPI_Get_count(&recv_face_status, MPI_UNSIGNED, &recvd_faces);

      for(int i=0; i < recvd_faces; ++i){
        from_mesh[i+beg_index] = (recv_face_status.MPI_SOURCE * n_meshes) / 
world_size;
        tot_recv_faces[i+beg_index] = recv_faces[i];
        tot_recv_cells[i+beg_index] = recv_cells[i];
      }
      beg_index += recvd_faces;

      num_faces_recvd -= recvd_faces;

    }
  }

  MPI_Waitall(sends, requests, statuses);
  MPI_Bcast(from_mesh, num_faces_to_recv, MPI_INT, 0, mesh_comm);
  MPI_Bcast(tot_recv_faces, num_faces_to_recv, MPI_UNSIGNED, 0, mesh_comm);
  MPI_Bcast(tot_recv_cells, num_faces_to_recv*size_dh, MPI_BYTE, 0, 
mesh_comm);

  for(int oc=0; oc < num_faces_to_recv; ++oc)
  {
    unsigned int row = from_mesh[oc];

    if(row == mesh_id){
      std::cout<<"There is a problem here\n";
    }

        const dh_aci row_cell = tot_recv_cells[oc];

    DonorInfo quad_pt_matches;

    for(int n_face=0; n_face < num_faces_to_recv; ++n_face)
    {
      unsigned int face = tot_recv_faces[n_face];
      row_face.reinit(row_cell, face); //The code segfaults here
    }


  }



Okay, so in the above snippet of code I am sending faces that are on an 
overset boundary (these are just unsigned ints so sending these are easy) 
but I also need to send the corresponding cell for that face for when I go 
to compute mesh coupling entries for my system_matrix. Sending the cell and 
face should then allow me to initialize a FEFaceValue object so that I can 
extract information about the evaluate points on that face to determine 
which cells from a different triangulation (mesh) will become donor cells. 

Any help would be greatly appreciated. I hope I explained enough of what I 
am attempting, if not I can provide more information. 

Thank you,
- Justin

-- 
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 dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to