Ejemplo n.º 1
0
        private void AddLeftBoundary(Vector3 closestGamma, KPoint kpt, KptPlane plane, Lattice lattice)
        {
            double s, t;

            plane.GetPlaneST(kpt, out s, out t);

            double gs, gt;

            plane.GetPlaneST(closestGamma, out gs, out gt);

            if (gs == 0)
            {
                return;
            }

            double ratio = gt / gs;

            // this is the solution to
            // |S| = |S-P| where S is the target point, P is the nearby Gamma point
            // and the y component of S is constrained to be the same as for the input.
            double news = 0.5 * (gs + gt * ratio - 2 * t * ratio);

            if (Math.Abs(news - s) < 1e-6)
            {
                return;
            }

            Kpts.Add(new BZoneKPoint(plane.ReduceST(news, t)));
        }
Ejemplo n.º 2
0
        private void AddLeftBoundary(Vector3 closestGamma, KPoint kpt, KptPlane plane, Lattice lattice)
        {
            double s, t;
            plane.GetPlaneST(kpt, out s, out t);

            double gs, gt;
            plane.GetPlaneST(closestGamma, out gs, out gt);

            if (gs == 0)
                return;

            double ratio = gt / gs;

            // this is the solution to
            // |S| = |S-P| where S is the target point, P is the nearby Gamma point
            // and the y component of S is constrained to be the same as for the input.
            double news = 0.5 * (gs + gt * ratio - 2 * t * ratio);

            if (Math.Abs(news - s) < 1e-6)
                return;

            Kpts.Add(new BZoneKPoint(plane.ReduceST(news, t)));
        }