Skip to content

Reply To: load coarse mesh data to a fine mesh

Due to recent bot attacks we have changed the sign-up process. If you want to participate in our forum, first register on this website and then send a message via our contact form.

Forums OpenLB General Topics load coarse mesh data to a fine mesh Reply To: load coarse mesh data to a fine mesh

#10971
nipinl
Participant

I made coarse and fine versions of superGeometry, SuperLattice based on resolutions Ncoarse and Nfine; and enforced same boundary conditions for both lattices separately. The simulation is planned as: Coarse run –> interpolate –> fine run; all in a single (cpp file). A helper function (provided below) is made to initialize fine lattice from Coarse.
However, I’m unsuccessful in carrying out the initialization. The provided version partially copies data to fine lattice. If I change “…uAnalytical(coarseU, false, false)” to “…uAnalytical(coarseU, true, true)” to enable communication, MPI throws following error (line “coarseU.getSuperStructure().communicate();” is commented out when false changes to true). I was wondering where exactly I’m making a mistake here.

ERROR:
[initializeFineFromCoarse] Interpolating coarse lattice onto fine lattice … [initializeFineFromCoarse] Defined rhoAnalytical … [tri-login02:00000] *** An error occurred in MPI_Bcast [tri-login02:00000] *** reported by process [2194538497,169] [tri-login02:00000] *** on communicator MPI_COMM_WORLD [tri-login02:00000] *** MPI_ERR_TRUNCATE: message truncated [tri-login02:00000] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort, [tri-login02:00000] *** and MPI will try to terminate your MPI job as well) ————————————————————————– prterun has exited due to process rank 169 with PID 0 on node tri-login02 calling “abort”. This may have caused other processes in the application to be terminated by signals sent by prterun (as reported here).

// Interpolate a coarse simulation onto the current (fine) lattice
template <typename T, typename DESCRIPTOR>
void initializeFineFromCoarse(
  SuperLattice<T, DESCRIPTOR>& sLatticeFine,
  SuperGeometry<T,3>&          superGeometryFine,
  SuperLattice<T, DESCRIPTOR>& sLatticeCoarse,
  SuperGeometry<T,3>&          superGeometryCoarse)
{
  OstreamManager clout(std::cout, "initializeFineFromCoarse");

  SuperLatticeVelocity3D<T, DESCRIPTOR> coarseU(sLatticeCoarse);

  coarseU.getSuperStructure().communicate();

  AnalyticalFfromSuperF3D<T,T> uAnalytical(coarseU, false, false);

  AnalyticalConst3D<T,T> rhoAnalytical(1.);

  sLatticeFine.defineRhoU(superGeometryFine, 1, rhoAnalytical, uAnalytical);
  sLatticeFine.iniEquilibrium(superGeometryFine, 1, rhoAnalytical, uAnalytical);

  sLatticeFine.defineRhoU(superGeometryFine, 2, rhoAnalytical, uAnalytical);
  sLatticeFine.iniEquilibrium(superGeometryFine, 2, rhoAnalytical, uAnalytical);

  sLatticeFine.initialize();
}