Commit 472c0114 authored by Keith Bennett's avatar Keith Bennett

Add an option for disabling obstacle boundaries

parent 11437e2d
......@@ -236,6 +236,7 @@ avtSDFFileFormat::avtSDFFileFormat(const char *filename,
use_random = 0;
use_boundary = 0;
use_allboundary = 0;
use_ob_boundary = 1;
for (int i = 0; readOpts && i < readOpts->GetNumberOfOptions(); i++) {
if (readOpts->GetName(i) == SDF_RDOPT_CONVERT_FLOAT)
use_float = readOpts->GetBool(SDF_RDOPT_CONVERT_FLOAT) ? 1 : 0;
......@@ -245,6 +246,8 @@ avtSDFFileFormat::avtSDFFileFormat(const char *filename,
use_boundary = readOpts->GetBool(SDF_RDOPT_BOUNDARY) ? 1 : 0;
else if (readOpts->GetName(i) == SDF_RDOPT_ALLBOUNDARY)
use_allboundary = readOpts->GetBool(SDF_RDOPT_ALLBOUNDARY) ? 1 : 0;
else if (readOpts->GetName(i) == SDF_RDOPT_OB_BOUNDARY)
use_ob_boundary = readOpts->GetBool(SDF_RDOPT_OB_BOUNDARY) ? 1 : 0;
else
debug1 << "Ignoring unknown option \"" << readOpts->GetName(i)
<< "\"" << endl;
......@@ -417,6 +420,10 @@ avtSDFFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
continue;
}
if (use_ob_boundary == 0 && b->mesh_id &&
memcmp(b->mesh_id, "obmsh", 5) == 0)
continue;
// Now fill the metadata for a 1d or nd scalar variable
sdf_block_t *mesh = sdf_find_block_by_id(h, b->mesh_id);
if (!mesh) continue;
......
......@@ -164,7 +164,7 @@ class avtSDFFileFormat : public avtSTMDFileFormat
protected:
// DATA MEMBERS
int rank, ncpus, ndomains, step;
int use_float, use_random, use_boundary, use_allboundary;
int use_float, use_random, use_boundary, use_allboundary, use_ob_boundary;
double time;
comm_t comm;
sdf_file_t *h;
......
......@@ -44,6 +44,7 @@ GetSDFReadOptions(void)
rv->SetBool(SDF_RDOPT_RANDOMISE, false);
rv->SetBool(SDF_RDOPT_BOUNDARY, false);
rv->SetBool(SDF_RDOPT_ALLBOUNDARY, false);
rv->SetBool(SDF_RDOPT_OB_BOUNDARY, true);
return rv;
}
......
......@@ -27,6 +27,8 @@ namespace SDFDBOptions
const char *const SDF_RDOPT_RANDOMISE = "Randomise particle data";
const char *const SDF_RDOPT_BOUNDARY = "Populate boundary variables";
const char *const SDF_RDOPT_ALLBOUNDARY = "Populate side boundary variables";
const char *const SDF_RDOPT_OB_BOUNDARY =
"Populate obstacle boundary variables";
}
// ****************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment