Skip to content

Commit

Permalink
resolve issues with fetching mfem boundary topo
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://edison.nersc.gov/project/projectdirs/visit/svn/visit/branches/2.13RC@32877 18c085ea-50e0-402c-830e-de6fd14e8384
  • Loading branch information
cyrush committed Jan 12, 2019
1 parent 13982e5 commit 5578b7e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
18 changes: 11 additions & 7 deletions src/databases/Blueprint/avtBlueprintDataAdaptor.C
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ ShapeNameToGeomType(const std::string &shape_name)
}
else
{
MFEM_ABORT("Unsupported Element Shape: " << shape_name);
BP_PLUGIN_ERROR("Unsupported Element Shape: " << shape_name);
}

return res;
Expand Down Expand Up @@ -840,18 +840,22 @@ avtBlueprintDataAdaptor::MFEM::MeshToMFEM(const Node &n_mesh,
topo_name = n_mesh["topologies"].schema().child_name(0);
}

MFEM_ASSERT(n_mesh.has_path("topologies/" + topo_name),
"Expected topology named \"" + topo_name + "\" "
"(node is missing path \"topologies/" + topo_name + "\")");
if(!n_mesh.has_path("topologies/" + topo_name))
{
BP_PLUGIN_ERROR("Expected topology named \"" + topo_name + "\" "
"(node is missing path \"topologies/" + topo_name + "\")");
}

// find coord set

std::string coords_name = n_mesh["topologies"][topo_name]["coordset"].as_string();


MFEM_ASSERT(n_mesh.has_path("coordsets/" + coords_name),
"Expected topology named \"" + coords_name + "\" "
"(node is missing path \"coordsets/" + coords_name + "\")");
if(!n_mesh.has_path("coordsets/" + coords_name))
{
BP_PLUGIN_ERROR("Expected topology named \"" + coords_name + "\" "
"(node is missing path \"coordsets/" + coords_name + "\")")
}

const Node &n_coordset = n_mesh["coordsets"][coords_name];
const Node &n_coordset_vals = n_coordset["values"];
Expand Down
11 changes: 9 additions & 2 deletions src/databases/Blueprint/avtBlueprintFileFormat.C
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ avtBlueprintFileFormat::ReadBlueprintMesh(int domain,
BP_PLUGIN_INFO("boundary topology path " << bnd_topo_path);
m_tree_cache->FetchBlueprintTree(domain,
bnd_topo_path,
out["boundary"]);
out["topologies"][bndry_topo_name]);
}
else
{
Expand Down Expand Up @@ -1014,11 +1014,18 @@ avtBlueprintFileFormat::GetMesh(int domain, const char *abs_meshname)
if(!blueprint::mesh::verify(data, verify_info))
{
BP_PLUGIN_INFO("blueprint::mesh::verify failed for mesh "
<< abs_meshname << " [domain " << domain << "]"
<< abs_meshname << " [domain " << domain << "]" << endl
<< "Verify Info " << endl
<< verify_info.to_json() << endl
<< "Data Schema " << endl
<< data.schema().to_json());

BP_PLUGIN_INFO("warning: "
"avtBlueprintFileFormat::GetMesh returning NULL "
<< abs_meshname
<< " [domain " << domain << "]"
<< " will be missing" << endl);
// TODO: Should we throw an error instead of blanking the domain?
return NULL;
}

Expand Down
8 changes: 4 additions & 4 deletions src/databases/Blueprint/avtBlueprintTreeCache.C
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,8 @@ avtBlueprintTreeCache::IO::LoadSidreGroup(Node &sidre_meta,
{
Node &g = g_itr.next();
string g_name = g_itr.name();
BP_PLUGIN_INFO("loading " << group_path << "/" << g_name << " as group");
std::string cld_path = group_path + "/" + g_name;
BP_PLUGIN_INFO("loading " << group_path << g_name << " as group");
std::string cld_path = group_path + g_name;
// LoadSidreGroup(g,h5_file_id,tree_root,cld_path,out[g_name]);
LoadSidreGroup(g,
tree_cache,
Expand All @@ -670,8 +670,8 @@ avtBlueprintTreeCache::IO::LoadSidreGroup(Node &sidre_meta,
{
Node &v = v_itr.next();
string v_name = v_itr.name();
BP_PLUGIN_INFO("loading " << group_path << "/" << v_name << " as view");
std::string cld_path = group_path + "/" + v_name;
BP_PLUGIN_INFO("loading " << group_path << v_name << " as view");
std::string cld_path = group_path + v_name;
// LoadSidreView(v,h5_file_id,tree_root,cld_path,out[v_name]);
LoadSidreView(v,
tree_cache,
Expand Down

0 comments on commit 5578b7e

Please sign in to comment.