[cig-commits] r6332 -
short/3D/PyLith/branches/pylith-0.8/pylith3d/module
willic3 at geodynamics.org
willic3 at geodynamics.org
Wed Mar 21 10:56:44 PDT 2007
Author: willic3
Date: 2007-03-21 10:56:44 -0700 (Wed, 21 Mar 2007)
New Revision: 6332
Modified:
short/3D/PyLith/branches/pylith-0.8/pylith3d/module/scanner.cc
Log:
Altered output of BC so that the filenames are based in the
inputFileRoot basename.
Now that I think of it, I should add a new argument so it is based
on bcInputFile.
Modified: short/3D/PyLith/branches/pylith-0.8/pylith3d/module/scanner.cc
===================================================================
--- short/3D/PyLith/branches/pylith-0.8/pylith3d/module/scanner.cc 2007-03-21 17:53:55 UTC (rev 6331)
+++ short/3D/PyLith/branches/pylith-0.8/pylith3d/module/scanner.cc 2007-03-21 17:56:44 UTC (rev 6332)
@@ -139,13 +139,19 @@
FILE *f;
char bcFilename[2048];
PetscErrorCode ierr;
+ MPI_Comm comm = PETSC_COMM_WORLD;
+ PetscMPIInt rank;
+ char suff[9];
+ ierr = MPI_Comm_rank(comm, &rank);
+ sprintf(suff, "%s%d%s", ".", rank, ".bc");
+
PetscFunctionBegin;
if (mesh->debug()) {
boundaries->view("PyLith boundaries");
}
ierr = PetscStrcpy(bcFilename, baseFilename);
- ierr = PetscStrcat(bcFilename, ".bc");
+ ierr = PetscStrcat(bcFilename, suff);
// Determine if we have bc stuff
const ALE::Obj<ALE::Mesh::topology_type::label_sequence>& vertices = boundaries->getTopology()->depthStratum(patch, 0);
@@ -292,9 +298,17 @@
}
ierr = MeshView(mesh, viewer);
ierr = PetscViewerDestroy(viewer);
- debug << journal::at(__HERE__) << "[" << rank << "]Output new PyLith mesh into: " << meshOutputFile << journal::endl;
- ierr = WriteBoundary_PyLith(meshOutputFile, m);
+ char bcFilename[2048];
+ char suff[9];
+
+ sprintf(suff, "%s%d%s", ".", rank, ".bc");
+ ierr = PetscStrcpy(bcFilename, meshInputFile);
+ ierr = PetscStrcat(bcFilename, suff);
+
+ debug << journal::at(__HERE__) << "[" << rank << "]Output new PyLith mesh into: " << bcFilename << journal::endl;
+
+ ierr = WriteBoundary_PyLith(meshInputFile, m);
debug << journal::at(__HERE__) << "[" << rank << "]Wrote PyLith boundary conditions" << journal::endl;
const Obj<ALE::Mesh::topology_type::label_sequence>& vertices = m->getTopology()->depthStratum(0, 0);
More information about the cig-commits
mailing list