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 
13 namespace concepts {
14 
15  // ******************************************************* MaxwellBoundary **
16 
20  public:
27  enum boundaryType { PMC = 0, PEC = 1, MAX_TYPE};
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 
55  class MaxwellModel {
56  public:
58  virtual Real dissipation() = 0;
60  virtual Real magnEnergy() = 0;
61  };
62 
63 } // namespace concepts
64 
65 #endif // Maxwell_hh
66 
virtual Real dissipation()=0
Return dissipation power loss.
MaxwellBoundary(enum boundaryType bType)
Constructor.
Definition: maxwell.hh:29
boundaryType & bType()
Definition: maxwell.hh:34
#define conceptsException(exc)
Prepares an exception for throwing.
Definition: exceptions.hh:344
#define conceptsAssert(cond, exc)
Assert that a certain condition is fulfilled.
Definition: exceptions.hh:394
virtual Real magnEnergy()=0
Return magnetic energy.
const std::string bTypeStr() const
Returns name of boundary type as string.
Definition: maxwell.hh:36
Exception class for assertions.
Definition: exceptions.hh:258
Abstract class for Maxwell's problems.
Definition: maxwell.hh:55
enum boundaryType bType_
Type of boundary condition.
Definition: maxwell.hh:48
boundaryType
Boundary type.
Definition: maxwell.hh:27
const boundaryType bType() const
Returns boundary type.
Definition: maxwell.hh:33
Exception class to express a missing feature.
Definition: exceptions.hh:206
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Class for holding boundary type of Maxwell's problems.
Definition: maxwell.hh:19
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich