BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
bake Namespace Reference

Functions that instantiate objects. To be used like constructors. More...

Functions

Lattice3D BCTLattice (double a, double c)
 Returns a body-centered cubic (cI) lattice with edge length a. More...
 
Lattice3D CubicLattice (double a)
 Returns a primitive cubic (cP) lattice with edge length a. More...
 
Lattice3D FCCLattice (double a)
 Returns a face-centered cubic (cF) lattice with edge length a. More...
 
Lattice3D HCPLattice (double a, double c)
 TODO: Clarify how this is meant: HCP is not a Bravais lattice. More...
 
Lattice3D HexagonalLattice (double a, double c)
 Returns a primitive hexagonal (hP) lattice with hexagonal edge a and height c. More...
 
Lattice3D TetragonalLattice (double a, double c)
 Returns a primitive tetragonal (tP) lattice with square base edge a and height c. More...
 

Detailed Description

Functions that instantiate objects. To be used like constructors.

Function Documentation

◆ BCTLattice()

Lattice3D bake::BCTLattice ( double  a,
double  c 
)

Returns a body-centered cubic (cI) lattice with edge length a.

TODO: Clarify meaning of c

Definition at line 59 of file BakeLattice.cpp.

60 {
61  kvector_t a1(a, 0.0, 0.0);
62  kvector_t a2(0.0, a, 0.0);
63  kvector_t a3(a / 2.0, a / 2.0, c / 2.0);
64  return Lattice3D(a1, a2, a3);
65 }
A Bravais lattice, characterized by three basis vectors, and optionally an ISelectionRule.
Definition: Lattice3D.h:29

◆ CubicLattice()

Lattice3D bake::CubicLattice ( double  a)

Returns a primitive cubic (cP) lattice with edge length a.

Definition at line 18 of file BakeLattice.cpp.

19 {
20  kvector_t a1(a, 0.0, 0.0);
21  kvector_t a2(0.0, a, 0.0);
22  kvector_t a3(0.0, 0.0, a);
23  return Lattice3D(a1, a2, a3);
24 }

◆ FCCLattice()

Lattice3D bake::FCCLattice ( double  a)

Returns a face-centered cubic (cF) lattice with edge length a.

Definition at line 26 of file BakeLattice.cpp.

27 {
28  double b = a / 2.0;
29  kvector_t a1(0.0, b, b);
30  kvector_t a2(b, 0.0, b);
31  kvector_t a3(b, b, 0.0);
32  return Lattice3D(a1, a2, a3);
33 }

◆ HCPLattice()

Lattice3D bake::HCPLattice ( double  a,
double  c 
)

TODO: Clarify how this is meant: HCP is not a Bravais lattice.

Definition at line 43 of file BakeLattice.cpp.

44 {
45  kvector_t a1(a, 0.0, 0.0);
46  kvector_t a2(-a / 2.0, std::sqrt(3.0) * a / 2.0, 0);
47  kvector_t a3(a / 2.0, a / std::sqrt(3.0) / 2.0, c / 2.0);
48  return Lattice3D(a1, a2, a3);
49 }

◆ HexagonalLattice()

Lattice3D bake::HexagonalLattice ( double  a,
double  c 
)

Returns a primitive hexagonal (hP) lattice with hexagonal edge a and height c.

Definition at line 35 of file BakeLattice.cpp.

36 {
37  kvector_t a1(a, 0.0, 0.0);
38  kvector_t a2(-a / 2.0, std::sqrt(3.0) * a / 2.0, 0.0);
39  kvector_t a3(0.0, 0.0, c);
40  return Lattice3D(a1, a2, a3);
41 }

◆ TetragonalLattice()

Lattice3D bake::TetragonalLattice ( double  a,
double  c 
)

Returns a primitive tetragonal (tP) lattice with square base edge a and height c.

Definition at line 51 of file BakeLattice.cpp.

52 {
53  kvector_t a1(a, 0.0, 0.0);
54  kvector_t a2(0.0, a, 0.0);
55  kvector_t a3(0.0, 0.0, c);
56  return Lattice3D(a1, a2, a3);
57 }