Skip to content
Snippets Groups Projects
Commit fb299a3c authored by Tom Fischer's avatar Tom Fischer Committed by Dmitri Naumov
Browse files

[PL/BC/Nonuniform] Use new {exists,get}PropertyVector.

This versions check if the PropertyVector is
assigned to the requested mesh item type and has
the required number of components.
parent 0cf9a6f5
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,8 @@ createNonuniformDirichletBoundaryCondition(
config.getConfigParameter<std::string>("field_name");
auto const* const property =
boundary_mesh.getProperties().getPropertyVector<double>(field_name);
boundary_mesh.getProperties().getPropertyVector<double>(
field_name, MeshLib::MeshItemType::Node, 1);
if (!property)
{
......@@ -40,19 +41,6 @@ createNonuniformDirichletBoundaryCondition(
field_name.c_str(), boundary_mesh.getName().c_str());
}
if (property->getMeshItemType() != MeshLib::MeshItemType::Node)
{
OGS_FATAL(
"Only nodal fields are supported for non-uniform fields. Field "
"`%s' is not nodal.",
field_name.c_str());
}
if (property->getNumberOfComponents() != 1)
{
OGS_FATAL("`%s' is not a one-component field.", field_name.c_str());
}
// In case of partitioned mesh the boundary could be empty, i.e. there is no
// boundary condition.
#ifdef USE_PETSC
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment