47 static_assert((SolidSystem::isInert() && SolidSystem::numInertComponents == SolidSystem::numComponents)
48 || !SolidSystem::isInert(),
"numInertComponents == numComponents has to be equal to SolidSystem::isInert()");
51 using Solidstate = std::conditional_t<SolidSystem::isInert(),
57 std::cout <<
"Testing solid system '" << Dune::className<SolidSystem>() <<
"'\n";
60 std::string collectedErrors;
61 std::string collectedWarnings;
67 numComponents = SolidSystem::numComponents
72 Scalar DUNE_UNUSED val;
75 for (
int phaseIdx = 0; phaseIdx < numComponents; ++phaseIdx)
77 std::string name DUNE_UNUSED= SolidSystem::componentName(phaseIdx);
78 bool DUNE_UNUSED bVal = SolidSystem::isCompressible(phaseIdx);
79 val = SolidSystem::molarMass(phaseIdx);
83 for (
int compIdx = 0; compIdx < numComponents; ++compIdx)
85 std::string name DUNE_UNUSED= SolidSystem::componentName(compIdx);
89 std::string name DUNE_UNUSED = SolidSystem::name();
93 val = SolidSystem::heatCapacity(sst);
94 }
catch (Dune::NotImplemented&)
96 collectedWarnings +=
"warning: SolidSystem::heatCapacity() is not implemented\n";
99 collectedErrors +=
"error: SolidSystem::heatCapacity() throws exception!\n";
104 val = SolidSystem::thermalConductivity(sst);
105 }
catch (Dune::NotImplemented&)
107 collectedWarnings +=
"warning: SolidSystem::thermalConductivity() is not implemented\n";
110 collectedErrors +=
"error: SolidSystem::thermalConductivity() throws exception!\n";
115 val = SolidSystem::density(sst);
116 }
catch (Dune::Exception &e)
118 collectedErrors +=
"error: SolidSystem::density() throws exception!\n";
121 std::cout << collectedErrors;
122 std::cout << collectedWarnings;
123 if (collectedErrors.empty())
125 std::cout <<
"... successful" << std::endl;
126 std::cout <<
"----------------------------------" << std::endl;
131 std::cout <<
"... failed" << std::endl;
132 std::cout <<
"----------------------------------" << std::endl;
135 std::cout <<
"----------------------------------\n";