Skip to content

Commit 111b490

Browse files
committed
[Thermo] Deprecate class SemiconductorPhase
Can't be constructed from ThermoFactory, and constructor from file is not implemented. Also, the getChemPotentials method uses the m_work array, which is never initialized because the private method initLengths() is never called. See #267
1 parent f583bd4 commit 111b490

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

include/cantera/thermo/SemiconductorPhase.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@ const int cHole = 1;
2121
* @ingroup thermoprops
2222
*
2323
* Class SemiconductorPhase represents electrons and holes in a semiconductor.
24+
* @deprecated Broken and unused. To be removed after Cantera 2.3.
2425
*
2526
*/
2627
class SemiconductorPhase : public ThermoPhase
2728
{
2829
public:
29-
SemiconductorPhase() {}
30+
SemiconductorPhase() {
31+
warn_deprecated("class SemiconductorPhase",
32+
"To be removed after Cantera 2.3.");
33+
}
3034
SemiconductorPhase(std::string infile, std::string id="");
3135

3236
SemiconductorPhase(const SemiconductorPhase& right) {

src/thermo/SemiconductorPhase.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ static doublereal JoyceDixon(doublereal r)
1111
}
1212

1313
SemiconductorPhase::SemiconductorPhase(std::string infile,
14-
std::string id_) {}
14+
std::string id_) {
15+
warn_deprecated("class SemiconductorPhase",
16+
"To be removed after Cantera 2.3.");
17+
}
1518

1619
void SemiconductorPhase::getChemPotentials(doublereal* mu) const
1720
{

0 commit comments

Comments
 (0)