Try to remove ParticipantImpl::mesh(const std::string &meshName)
#1269
Labels
maintainability
Working on this will make our lives easier in the long run as preCICE gets easier to maintain.
question
Everybody is invited to answer this question or give any hint.
Milestone
I stumbled across the public getter
ParticipantImpl::mesh(...)
when working on the documentation ofParticipantImpl
in #1249 and think we should remove this getter, because it is only used in tests and has no proper use-case to justify a public function. This is mostly motivated from a class design perspective trying to simplifyParticipantImpl
.As a compromise, we could also add this function to a fixture or the
WhiteboxAccessor
, but I think improving the tests would be the better solution. However, for most of the tests I cannot judge whether removingParticipantImpl::mesh(...)
would be ok in the context of the original goal of the test.I found the following tests that use this function:
tests/serial/whitebox/TestExplicitWithDataScaling.cpp
Easy to remove, because
testing::WhiteboxAccessor::impl(cplInterface).mesh("Test-Square-One").vertices().size()
always returnsnVertices = 4
. No need for this function.tests/parallel/TestFinalize.cpp
What is it actually testing? Can we remove this test?
tests/parallel/NearestProjectionRePartitioning.cpp
I don't understand the rationale here. But is related to #371
/home/benjamin/Programming/precice/tests/serial/mapping-scaled-consistent/helpers.cpp
Do we need to go that low here? For some functions I have the impression the purpose of these helpers lies somewhere else and not on testing the correct creation of the mesh. (Can we just remove the
BOOST_REQUIRE
calls?)tests/serial/mapping-nearest-projection/helpers.cpp
At different places. Sometimes a similar situations like above (
BOOST_REQUIRE
).testQuadMappingNearestProjectionTallKite
andtestQuadMappingNearestProjectionWideKite
are testingmesh::edgeLength(edge)
. Should this test maybe go somewhere else as a unit test, where accessing the mesh is easier?The text was updated successfully, but these errors were encountered: