Class documentation of Concepts

Loading...
Searching...
No Matches
maxwell.hh
Go to the documentation of this file.
1
8#ifndef Maxwell_hh
9#define Maxwell_hh
10
11#include "basics/exceptions.hh"
12
13namespace concepts {
14
15 // ******************************************************* MaxwellBoundary **
16
20 public:
27 enum boundaryType { PMC = 0, PEC = 1, MAX_TYPE};
30 conceptsAssert(bType < MAX_TYPE, Assertion());
31 }
33 const boundaryType bType() const { return bType_; }
34 boundaryType& bType() { return bType_; }
36 const std::string bTypeStr() const {
37 std::string typeStr;
38 switch(bType_) {
39 case PMC: typeStr = "PMC"; break;
40 case PEC: typeStr = "PEC"; break;
41 default: throw conceptsException
42 (MissingFeature("boundary type not known"));
43 } // switch
44 return typeStr;
45 }
46 private:
48 enum boundaryType bType_;
49 };
50
51 // ********************************************************** MaxwellModel **
52
56 public:
58 virtual Real dissipation() = 0;
60 virtual Real magnEnergy() = 0;
61 };
62
63} // namespace concepts
64
65#endif // Maxwell_hh
66
#define conceptsException(exc)
const std::string bTypeStr() const
Returns name of boundary type as string.
Definition maxwell.hh:36
const boundaryType bType() const
Returns boundary type.
Definition maxwell.hh:33
MaxwellBoundary(enum boundaryType bType)
Constructor.
Definition maxwell.hh:29
virtual Real dissipation()=0
Return dissipation power loss.
virtual Real magnEnergy()=0
Return magnetic energy.
#define conceptsAssert(cond, exc)
double Real
Definition typedefs.hh:39