Skip to content

Commit 8400895

Browse files
committed
Fix more issues
1 parent 6c1e93a commit 8400895

File tree

14 files changed

+24
-36
lines changed

14 files changed

+24
-36
lines changed

src/ale/4C_ale_resulttest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void ALE::AleResultTest::test_node(
3939

4040
if (isnodeofanybody == 0)
4141
{
42-
FOUR_C_THROW("Node {} does not belong to discretization {}", node + 1, aledis_->name());
42+
FOUR_C_THROW("Node {} does not belong to discretization {}", node, aledis_->name());
4343
}
4444
else
4545
{

src/art_net/4C_art_net_artery_resulttest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void Arteries::ArteryResultTest::test_node(
5353

5454
if (isnodeofanybody == 0)
5555
{
56-
FOUR_C_THROW("Node {} does not belong to discretization {}", node + 1, dis_->name());
56+
FOUR_C_THROW("Node {} does not belong to discretization {}", node, dis_->name());
5757
}
5858
else
5959
{

src/core/io/src/4C_io_meshreader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ namespace
694694
parser.consume("COORD");
695695
auto coords = parser.read<std::vector<double>>(3);
696696

697-
max_node_id = std::max(max_node_id, nodeid) + 1;
697+
max_node_id = std::max(max_node_id, nodeid);
698698
std::vector<std::shared_ptr<Core::FE::Discretization>> dis =
699699
find_dis_node(element_readers, nodeid);
700700

@@ -714,7 +714,7 @@ namespace
714714
auto coords = parser.read<std::vector<double>>(3);
715715
double weight = parser.read<double>();
716716

717-
max_node_id = std::max(max_node_id, cpid) + 1;
717+
max_node_id = std::max(max_node_id, cpid);
718718
if (cpid != line_count + 1)
719719
FOUR_C_THROW(
720720
"Reading of control points {} failed: They must be numbered consecutive!!", cpid);
@@ -748,7 +748,7 @@ namespace
748748
const int nodeid = parser.read<int>();
749749
parser.consume("COORD");
750750
auto coords = parser.read<std::vector<double>>(3);
751-
max_node_id = std::max(max_node_id, nodeid) + 1;
751+
max_node_id = std::max(max_node_id, nodeid);
752752

753753
while (!parser.at_end())
754754
{

src/fluid/4C_fluid_result_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void FLD::FluidResultTest::test_node(
5252

5353
if (isnodeofanybody == 0)
5454
{
55-
FOUR_C_THROW("Node {} does not belong to discretization {}", node + 1, fluiddis_->name());
55+
FOUR_C_THROW("Node {} does not belong to discretization {}", node, fluiddis_->name());
5656
}
5757
else
5858
{

src/fluid_xfluid/4C_fluid_xfluid_resulttest.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ FOUR_C_NAMESPACE_OPEN
1919

2020

2121
FLD::XFluidResultTest::XFluidResultTest(const FLD::XFluid& xfluid)
22-
: Core::Utils::ResultTest("XFLUID"),
23-
discret_(xfluid.discret_),
24-
velnp_(xfluid.state_->velnp_),
25-
node_from_zero_(true)
22+
: Core::Utils::ResultTest("XFLUID"), discret_(xfluid.discret_), velnp_(xfluid.state_->velnp_)
2623
{
2724
}
2825

@@ -31,11 +28,8 @@ FLD::XFluidResultTest::XFluidResultTest(const FLD::XFluidFluid& xfluid)
3128
discret_(xfluid.discret_),
3229
velnp_(xfluid.state_->velnp_),
3330
coupl_discret_(xfluid.embedded_fluid_->discretization()),
34-
coupl_velnp_(xfluid.embedded_fluid_->velnp()),
35-
node_from_zero_(false)
31+
coupl_velnp_(xfluid.embedded_fluid_->velnp())
3632
{
37-
// Todo: remove the "node_from_zero" flag for fluidfluid:
38-
// adapt the test cases!
3933
}
4034

4135
void FLD::XFluidResultTest::test_node(
@@ -46,9 +40,6 @@ void FLD::XFluidResultTest::test_node(
4640

4741
int node = container.get<int>("NODE");
4842

49-
// Todo: remove!
50-
if (node_from_zero_) node -= 1;
51-
5243
if (dis == discret_->name())
5344
{
5445
test_node(container, nerr, test_count, node, *discret_, *velnp_);
@@ -71,7 +62,7 @@ void FLD::XFluidResultTest::test_node(const Core::IO::InputParameterContainer& c
7162

7263
if (isnodeofanybody == 0)
7364
{
74-
FOUR_C_THROW("Node {} does not belong to discretization {}", node + 1, discret.name());
65+
FOUR_C_THROW("Node {} does not belong to discretization {}", node, discret.name());
7566
}
7667
else
7768
{

src/fluid_xfluid/4C_fluid_xfluid_resulttest.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ namespace FLD
6565

6666
/// solution vector for additional coupling discretization
6767
std::shared_ptr<const Core::LinAlg::Vector<double>> coupl_velnp_;
68-
69-
/// take care of node numbering off-by-one (will be removed soon)
70-
const bool node_from_zero_;
7168
};
7269

7370
} // namespace FLD

src/fsi/src/utils/4C_fsi_resulttest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void FSI::FSIResultTest::test_node(
212212

213213
if (isnodeofanybody == 0)
214214
{
215-
FOUR_C_THROW("Node {} does not belong to discretization {}", node + 1, slavedisc_->name());
215+
FOUR_C_THROW("Node {} does not belong to discretization {}", node, slavedisc_->name());
216216
}
217217
else
218218
{

src/lubrication/src/4C_lubrication_resulttest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void Lubrication::ResultTest::test_node(
4646

4747
if (isnodeofanybody == 0)
4848
{
49-
FOUR_C_THROW("Node {} does not belong to discretization {}", node + 1, dis_->name());
49+
FOUR_C_THROW("Node {} does not belong to discretization {}", node, dis_->name());
5050
}
5151
else
5252
{

src/porofluid_pressure_based/4C_porofluid_pressure_based_resulttest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ void PoroPressureBased::ResultTest::test_node(
4747

4848
if (isnodeofanybody == 0)
4949
{
50-
FOUR_C_THROW("Node {} does not belong to discretization {}", node + 1,
51-
porotimint_.discretization()->name());
50+
FOUR_C_THROW(
51+
"Node {} does not belong to discretization {}", node, porotimint_.discretization()->name());
5252
}
5353
else
5454
{

src/scatra/4C_scatra_resulttest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void ScaTra::ScaTraResultTest::test_node(
4242

4343
if (isnodeofanybody == 0)
4444
{
45-
FOUR_C_THROW("Node {} does not belong to discretization {}", node + 1,
45+
FOUR_C_THROW("Node {} does not belong to discretization {}", node,
4646
scatratimint_->discretization()->name());
4747
}
4848
else

0 commit comments

Comments
 (0)