PSCF v1.3
shiftToMinimum.h
1#ifndef PRDC_SHIFT_MINIMUM_H
2#define PRDC_SHIFT_MINIMUM_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <prdc/crystal/UnitCell.h>
12#include <pscf/math/IntVec.h>
13#include <iostream>
14
15namespace Pscf {
16namespace Prdc {
17
18 using namespace Util;
19
30 template <int D>
31 IntVec<D> shiftToMinimum(IntVec<D> const & v,
32 IntVec<D> const & d,
33 UnitCell<D> const & cell);
34
35 // Explicit specializations for D=1, 2 and 3
36
37 template <>
38 IntVec<1> shiftToMinimum(IntVec<1> const & v,
39 IntVec<1> const & d,
40 UnitCell<1> const & cell);
41
42 template <>
43 IntVec<2> shiftToMinimum(IntVec<2> const & v,
44 IntVec<2> const & d,
45 UnitCell<2> const & cell);
46
47 template <>
48 IntVec<3> shiftToMinimum(IntVec<3> const & v,
49 IntVec<3> const & d,
50 UnitCell<3> const & cell);
51
52}
53}
54#endif
An IntVec<D, T> is a D-component vector of elements of integer type T.
Definition IntVec.h:27
Base template for UnitCell<D> classes, D=1, 2 or 3.
Definition UnitCell.h:56
Periodic fields and crystallography.
Definition CField.cpp:11
PSCF package top-level namespace.
Definition param_pc.dox:1