diff --git a/FDTD/operator_mpi.cpp b/FDTD/operator_mpi.cpp index d091caa..e5b80ef 100644 --- a/FDTD/operator_mpi.cpp +++ b/FDTD/operator_mpi.cpp @@ -175,3 +175,28 @@ void Operator_MPI::Reset() Delete(); Operator_SSE_Compressed::Reset(); } + +string Operator_MPI::PrependRank(string name) +{ + stringstream out_name; + if (m_MPI_Enabled) + out_name << "ID" << m_MyID << "_" << name; + else + out_name << name; + return out_name.str(); +} + +void Operator_MPI::DumpOperator2File(string filename) +{ + Operator_SSE_Compressed::DumpOperator2File(PrependRank(filename)); +} + +void Operator_MPI::DumpMaterial2File(string filename) +{ + Operator_SSE_Compressed::DumpMaterial2File(PrependRank(filename)); +} + +void Operator_MPI::DumpPEC2File( string filename ) +{ + Operator_SSE_Compressed::DumpPEC2File(PrependRank(filename)); +} diff --git a/FDTD/operator_mpi.h b/FDTD/operator_mpi.h index 902507b..81f940c 100644 --- a/FDTD/operator_mpi.h +++ b/FDTD/operator_mpi.h @@ -54,6 +54,12 @@ protected: //the up and down neighbors, -1 if non for the given direction int m_NeighborUp[3]; int m_NeighborDown[3]; + + string PrependRank(string name); + + virtual void DumpOperator2File(string filename); + virtual void DumpMaterial2File(string filename); + virtual void DumpPEC2File( string filename ); }; #endif // OPERATOR_MPI_H