Skip to content

Commit

Permalink
Merge Pull Request #12049 from gsjaardema/Trilinos/SEACAS-Ioss-fix-co…
Browse files Browse the repository at this point in the history
…mpare

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: IOSS: Fix bad changes from !compare to !=
PR Author: gsjaardema
  • Loading branch information
trilinos-autotester authored Jul 14, 2023
2 parents bb2b208 + 77b8bf5 commit 96adca4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/Ioss_Compare.C
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ namespace {
continue;
}

if (in_qa_record_1 == *it) {
if (in_qa_record_1 != *it) {
fmt::print(buf, VALUE_MISMATCH, "QA RECORD", in_qa_record_1, (*it));
printed = true;
overall_result = false;
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/ioss/src/Ioss_ElementTopology.C
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,15 @@ Ioss::ElementTopology *Ioss::ElementTopology::boundary_type(int bnd_number) cons

bool Ioss::ElementTopology::equal_(const Ioss::ElementTopology &rhs, bool quiet) const
{
if (this->name_ == rhs.name_) {
if (this->name_ != rhs.name_) {
if (!quiet) {
fmt::print(Ioss::OUTPUT(), "Element Topology: NAME mismatch ({} vs. {})\n",
this->name_.c_str(), rhs.name_.c_str());
}
return false;
}

if (this->masterElementName_ == rhs.masterElementName_) {
if (this->masterElementName_ != rhs.masterElementName_) {
if (!quiet) {
fmt::print(Ioss::OUTPUT(), "Element Topology: MASTER ELEMENT NAME mismatch ({} vs. {})\n",
this->masterElementName_.c_str(), rhs.masterElementName_.c_str());
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/Ioss_GroupingEntity.C
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ void Ioss::GroupingEntity::property_update(const std::string &property,
bool Ioss::GroupingEntity::equal_(const Ioss::GroupingEntity &rhs, bool quiet) const
{
bool same = true;
if (this->entityName == rhs.entityName) {
if (this->entityName != rhs.entityName) {
if (quiet) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/ioss/src/Ioss_Property.C
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Ioss::Property &Ioss::Property::operator=(Ioss::Property rhs)

bool Ioss::Property::operator==(const Ioss::Property &rhs) const
{
if (this->name_ == rhs.name_) {
if (this->name_ != rhs.name_) {
return false;
}

Expand Down Expand Up @@ -243,7 +243,7 @@ bool Ioss::Property::operator==(const Ioss::Property &rhs) const
std::string s_lhs, s_rhs;
this->get_value(&s_lhs);
rhs.get_value(&s_rhs);
if (s_lhs == s_rhs) {
if (s_lhs != s_rhs) {
return false;
}
break;
Expand Down
16 changes: 16 additions & 0 deletions packages/seacas/libraries/ioss/src/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,22 @@ TRIBITS_ADD_ADVANCED_TEST(exodus32_to_unstructured_cgns
)
endif()

IF (NOT TPL_ENABLE_MPI OR TPL_Netcdf_Enables_PNetcdf)
TRIBITS_ADD_TEST(
io_shell ARGS "${DECOMP_ARG} --compare ${CMAKE_CURRENT_SOURCE_DIR}/test/8-block.g ${CMAKE_CURRENT_SOURCE_DIR}/test/8-block.g"
NAME io_shell_compare_same_database
NOEXEPREFIX NOEXESUFFIX
COMM mpi serial
)
ENDIF()

TRIBITS_ADD_TEST(
io_shell ARGS "${DECOMP_ARG} --compare ${CMAKE_CURRENT_SOURCE_DIR}/test/multiple_zones_fields.cgns ${CMAKE_CURRENT_SOURCE_DIR}/test/multiple_zones_fields.cgns"
NAME io_shell_compare_same_database_cgns
NOEXEPREFIX NOEXESUFFIX
COMM mpi serial
)

TRIBITS_ADD_TEST(
io_shell ARGS "${DECOMP_ARG} ${JOIN_ARG} --out_type=null --in_type=generated 10x10x10+shell:xXyYzZ+sideset:xXyY+times:2+variables:element,2,nodal,3,sideset,4 null_file"
NAME generated_to_null
Expand Down

0 comments on commit 96adca4

Please sign in to comment.