60 typedef std::pair<Interface,bool>
base;
72 const bool &
inside()
const {
return this->second; }
79 class OPENMEEG_EXPORT
Domain:
public std::vector<HalfSpace> {
81 typedef std::vector<HalfSpace>
base;
85 Domain(): name_(
""), sigma_(-1.), outermost_(false) { }
91 std::string&
name() {
return name_; }
92 const std::string&
name()
const {
return name_; }
96 double&
sigma() {
return sigma_; }
97 const double&
sigma()
const {
return sigma_; }
106 bool contains_point(
const Vect3&)
const;
113 for (Domain::const_iterator hit = begin();hit!=end();++hit)
114 for (Interface::const_iterator omit = hit->interface().begin();omit!=hit->interface().end();++omit)
115 if (&omit->mesh()==&m)
116 return ((hit->inside()) ? omit->orientation() : -omit->orientation());
std::string & name()
The name of the domain.
double & sigma()
The conductivity of the domain.
bool outermost_
Is it an outermost domain.
const std::string & name() const
const double & sigma() const
std::string name_
Name of the domain.
double sigma_
Conductivity of the domain.
std::vector< Domain > Domains
A vector of Domain is called Domains.
HalfSpace(Interface &_interface, const bool _inside)
std::pair< Interface, bool > base
const Interface & interface() const
a HalfSpace is a pair of Interface and boolean A simple domain (HalfSpace) is given by an interface (...
const bool & inside() const
const bool & outermost() const
a Domain is a vector of HalfSpace A Domain is the intersection of simple domains (of type HalfSpace)...
Interface class An interface is a closed-shape composed of oriented meshes (here pointer to meshes) ...
bool & outermost()
Returns the outermost state of the domain.
std::vector< HalfSpace > base
int mesh_orientation(const Mesh &m) const