28#ifndef DUMUX_CHECK_SOLIDSYSTEM_HH
29#define DUMUX_CHECK_SOLIDSYSTEM_HH
34#include <dune/common/classname.hh>
35#include <dune/common/unused.hh>
36#include <dune/common/exceptions.hh>
44template<
class Scalar,
class Sol
idSystem>
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";
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";
Represents all relevant thermodynamic quantities of a compositional solid system.
Represents all relevant thermodynamic quantities of a inert solid system.
bool success
Definition: test_tabulation.cc:34
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
int checkSolidSystem()
Definition: checksolidsystem.hh:45
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
Represents all relevant thermodynamic quantities of a compositional solid system.
Definition: compositionalsolidstate.hh:37
Represents all relevant thermodynamic quantities of a inert solid system.
Definition: inertsolidstate.hh:35