BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Material.cpp File Reference

Implements and implements class Material. More...

Include dependency graph for Material.cpp:

Go to the source code of this file.

Functions

bool operator!= (const Material &left, const Material &right)
 Comparison operator for material wrapper (inequality check) More...
 
std::ostream & operator<< (std::ostream &ostr, const Material &m)
 
bool operator== (const Material &left, const Material &right)
 Comparison operator for material wrapper (equality check) More...
 

Detailed Description

Implements 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.cpp.

Function Documentation

◆ operator!=()

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

Comparison operator for material wrapper (inequality check)

Definition at line 126 of file Material.cpp.

127 {
128  return !(left == right);
129 }

◆ operator<<()

std::ostream& operator<< ( std::ostream &  ostr,
const Material m 
)

Definition at line 107 of file Material.cpp.

108 {
109  m.m_material_impl->print(ostr);
110  return ostr;
111 }
std::unique_ptr< BaseMaterialImpl > m_material_impl
Definition: Material.h:97

◆ operator==()

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

Comparison operator for material wrapper (equality check)

Definition at line 113 of file Material.cpp.

114 {
115  if (left.getName() != right.getName())
116  return false;
117  if (left.magnetization() != right.magnetization())
118  return false;
119  if (left.materialData() != right.materialData())
120  return false;
121  if (left.typeID() != right.typeID())
122  return false;
123  return true;
124 }
kvector_t magnetization() const
Get the magnetization (in A/m)
Definition: Material.cpp:76
std::string getName() const
Returns the name of material.
Definition: Material.cpp:66
MATERIAL_TYPES typeID() const
Returns the type of underlying material implementation.
Definition: Material.cpp:71
complex_t materialData() const
Returns underlying material data.
Definition: Material.cpp:81

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

Here is the call graph for this function: