BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
GUI::RealSpace::Paracrystal2D Namespace Reference

Functions

std::vector< std::vector< double > > latticePositions (const Interference2DParaCrystal *, double layer_size)
 

Function Documentation

◆ latticePositions()

std::vector< std::vector< double > > GUI::RealSpace::Paracrystal2D::latticePositions ( const Interference2DParaCrystal *  p_iff,
double  layer_size 
)

Definition at line 193 of file RealSpace2DParacrystalUtils.cpp.

195 {
196  const auto& lattice = p_iff->lattice();
197  double l1 = lattice.length1();
198  double l2 = lattice.length2();
199  double alpha = lattice.latticeAngle();
200  double xi = lattice.rotationAngle();
201 
202  std::vector<std::vector<double>> lattice_positions;
203  ResizeLatticePositions(lattice_positions, l1, l2, layer_size);
204 
205  ComputePositionsAlongLatticeVectorAxes(lattice_positions, p_iff->pdf1(), l1, xi, 0);
206 
207  ComputePositionsAlongLatticeVectorAxes(lattice_positions, p_iff->pdf2(), l2, xi, alpha);
208 
209  ComputePositionsInsideLatticeQuadrants(lattice_positions, p_iff->pdf1(), p_iff->pdf2(), l1, l2,
210  xi, alpha);
211 
212  return lattice_positions;
213 }

Referenced by ParaCrystal2DPositionBuilder::generatePositionsImpl(), and RealSpaceBuilder::populateLayout().