Correct production of ghost cells for OASIS

This commit is contained in:
Matthias Koefferlein 2020-11-12 00:27:49 +01:00
parent 888b0936f7
commit 6c8f802444
1 changed files with 13 additions and 2 deletions

View File

@ -1152,8 +1152,14 @@ OASISWriter::reset_modal_variables ()
static bool must_write_cell (const db::Cell &cref)
{
// don't write ghost cells if not empty and don't write proxy cells which are not employed
return (! cref.is_ghost_cell () || ! cref.empty ()) && (! cref.is_proxy () || ! cref.is_top ());
// Don't write proxy cells which are not employed
return ! cref.is_proxy () || ! cref.is_top ();
}
static bool skip_cell_body (const db::Cell &cref)
{
// Skip cell bodies for ghost cells unless empty (they are not longer ghost cells in this case)
return cref.is_ghost_cell () && cref.empty ();
}
void
@ -1600,6 +1606,11 @@ OASISWriter::write (db::Layout &layout, tl::OutputStream &stream, const db::Save
const db::Cell &cref (layout.cell (*cell));
mp_cell = &cref;
// skip cell body if the cell is not to be written
if (skip_cell_body (cref)) {
continue;
}
// cell header
cell_positions.insert (std::make_pair (*cell, mp_stream->pos ()));