diff --git a/NumLib/DOF/LocalToGlobalIndexMap.cpp b/NumLib/DOF/LocalToGlobalIndexMap.cpp index d1a91bacf81e8b908e388d2a40d9daf14b5185f0..5fbabb539c10b59a05d9c117358e4eb9a98fcbbf 100644 --- a/NumLib/DOF/LocalToGlobalIndexMap.cpp +++ b/NumLib/DOF/LocalToGlobalIndexMap.cpp @@ -94,7 +94,13 @@ void LocalToGlobalIndexMap::findGlobalIndices( continue; MeshLib::Location l( mesh_id, MeshLib::MeshItemType::Node, (*n)->getID()); - indices.push_back(_mesh_component_map.getGlobalIndex(l, comp_id)); + auto const global_index = + _mesh_component_map.getGlobalIndex(l, comp_id); + if (global_index == std::numeric_limits<GlobalIndexType>::max()) + { + continue; + } + indices.push_back(global_index); } indices.shrink_to_fit(); diff --git a/Tests/Data/HydroMechanics/Linear/Confined_Compression/square_1e2.prj b/Tests/Data/HydroMechanics/Linear/Confined_Compression/square_1e2.prj index 2b32116f5abc04997dc0423f399a142652f635dd..a1f6994f54b5fec1386ef442ce9080b65f18cd8f 100644 --- a/Tests/Data/HydroMechanics/Linear/Confined_Compression/square_1e2.prj +++ b/Tests/Data/HydroMechanics/Linear/Confined_Compression/square_1e2.prj @@ -159,25 +159,10 @@ <values>0 0</values> </parameter> <parameter> - <name>pressure_ic</name> - <type>Constant</type> - <values>0</values> - </parameter> - <parameter> - <name>p_neumann</name> - <type>Constant</type> - <values>1</values> - </parameter> - <parameter> - <name>dirichlet0</name> + <name>zero</name> <type>Constant</type> <value>0</value> </parameter> - <parameter> - <name>dirichlet1</name> - <type>Constant</type> - <value>1</value> - </parameter> <parameter> <name>displacementTop</name> <type>Constant</type> @@ -209,21 +194,21 @@ <geometry>left</geometry> <type>Dirichlet</type> <component>0</component> - <parameter>dirichlet0</parameter> + <parameter>zero</parameter> </boundary_condition> <boundary_condition> <geometrical_set>square_1x1_geometry</geometrical_set> <geometry>right</geometry> <type>Dirichlet</type> <component>0</component> - <parameter>dirichlet0</parameter> + <parameter>zero</parameter> </boundary_condition> <boundary_condition> <geometrical_set>square_1x1_geometry</geometrical_set> <geometry>bottom</geometry> <type>Dirichlet</type> <component>1</component> - <parameter>dirichlet0</parameter> + <parameter>zero</parameter> </boundary_condition> <boundary_condition> <geometrical_set>square_1x1_geometry</geometrical_set> @@ -238,14 +223,23 @@ <name>pressure</name> <components>1</components> <order>1</order> - <initial_condition>pressure_ic</initial_condition> + <initial_condition>zero</initial_condition> <boundary_conditions> <boundary_condition> <geometrical_set>square_1x1_geometry</geometrical_set> <geometry>top</geometry> <type>Dirichlet</type> <component>0</component> - <parameter>dirichlet0</parameter> + <parameter>zero</parameter> + </boundary_condition> + <!-- This is for testing the Neumann bc for lower order process variable. + The test's result is not influenced by zero Neumann bc. --> + <boundary_condition> + <geometrical_set>square_1x1_geometry</geometrical_set> + <geometry>bottom</geometry> + <type>Neumann</type> + <component>0</component> + <parameter>zero</parameter> </boundary_condition> </boundary_conditions> </process_variable>