BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Material.h File Reference
Include dependency graph for Material.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Material
 

Functions

bool operator== (const Material &left, const Material &right)
 
bool operator!= (const Material &left, const Material &right)
 

Detailed Description

Defines and implements class Material.

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file Material.h.

Function Documentation

◆ operator==()

bool operator== ( const Material left,
const Material right 
)

Comparison operator for material wrapper (equality check)

Definition at line 116 of file Material.cpp.

117 {
118  if (left.getName() != right.getName())
119  return false;
120  if (left.magnetization() != right.magnetization())
121  return false;
122  if (left.materialData() != right.materialData())
123  return false;
124  if (left.typeID() != right.typeID())
125  return false;
126  return true;
127 }
kvector_t magnetization() const
Get the magnetization (in A/m)
Definition: Material.cpp:79
std::string getName() const
Returns the name of material.
Definition: Material.cpp:69
MATERIAL_TYPES typeID() const
Returns the type of underlying material implementation.
Definition: Material.cpp:74
complex_t materialData() const
Returns underlying material data.
Definition: Material.cpp:84

References Material::getName(), Material::magnetization(), Material::materialData(), and Material::typeID().

Here is the call graph for this function:

◆ operator!=()

bool operator!= ( const Material left,
const Material right 
)

Comparison operator for material wrapper (inequality check)

Definition at line 129 of file Material.cpp.

130 {
131  return !(left == right);
132 }