CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Split domain - files are overwritten (https://www.cfd-online.com/Forums/openfoam/95139-split-domain-files-overwritten.html)

anon_a December 7, 2011 08:55

Split domain - files are overwritten
 
I have a domain that I would like to be splitted in two parts according to a certain condition.
Therefore, I define two "labelHashSet" containing the corresponding cells and the two parts of the mesh are then extracted by "fvMeshSubset"

Code:

    labelHashSet Set1(Set1Cells);
    labelHashSet Set2(Set2Cells);

    // define condition and insert cells in each of the two sets

    fvMeshSubset subsetter(mesh);
    fvMeshSubset subsetter2(mesh);

    subsetter.setLargeCellSubset(Set1, -1, true);
    subsetter2.setLargeCellSubset(Set2, -1, true);

    subsetter.subMesh().write();
    subsetter2.subMesh().write();

The problem is that I have no control over the write() function directory and therefore the files are overwritten.
I also assume it would not be a good idea to mess with the library file. Any ideas?


All times are GMT -4. The time now is 21:37.