FOX/ObjCryst++  1.10.X (development)
geomStructFactor_067.cpp
1 /* ObjCryst++ Object-Oriented Crystallographic Library
2  (c) 2000-2002 Vincent Favre-Nicolin vincefn@users.sourceforge.net
3  2000-2001 University of Geneva (Switzerland)
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 #include "ObjCryst/CrystVector/CrystVector.h"
20 #ifdef __VFN_GEOM_STRUCT_FACTOR_USE_POINTERS
21 
22 #define H (*h)
23 #define K (*k)
24 #define L (*l)
25 #define SF (*sf)
26 
27 #define __VFN_GEOM_STRUCT_FACTOR_POINTERS_INIT const REAL *h,*k,*l; REAL*sf;\
28  h=hh.data();k=kk.data();l=ll.data();sf=sfsf.data(); for(long i=0;i<hh.numElements();i++){
29 #define __VFN_GEOM_STRUCT_FACTOR_POINTERS_END h++ ; k++ ; l++ ; sf++; };
30 
31 #else
32 
33 #define H hh
34 #define K kk
35 #define L ll
36 #define sfsf SF
37 
38 #define __VFN_GEOM_STRUCT_FACTOR_POINTERS_INIT
39 #define __VFN_GEOM_STRUCT_FACTOR_POINTERS_END
40 
41 #endif
42 
43 namespace ObjCryst
44 {
45 
46 void RealGeomStructFactor_67 (const REAL x,
47  const REAL y,
48  const REAL z,
49  const CrystVector_REAL&hh,
50  const CrystVector_REAL&kk,
51  const CrystVector_REAL&ll,
52  CrystVector_REAL& sfsf)
53 {
54 __VFN_GEOM_STRUCT_FACTOR_POINTERS_INIT
55 
56  SF+=16*pow(cos((H+K)/4),2)*cos(H*x)*cos(K*y+H/4)*cos(L*z-H/4);
57 
58 __VFN_GEOM_STRUCT_FACTOR_POINTERS_END
59 };
60 
61 void RealGeomStructFactor_67ba_c(const REAL x,
62  const REAL y,
63  const REAL z,
64  const CrystVector_REAL&hh,
65  const CrystVector_REAL&kk,
66  const CrystVector_REAL&ll,
67  CrystVector_REAL& sfsf)
68 {
69 __VFN_GEOM_STRUCT_FACTOR_POINTERS_INIT
70 
71  SF+=16*pow(cos((K+H)/4),2)*cos(K*y)*cos(H*x+K/4)*cos(L*z-K/4);
72 
73 __VFN_GEOM_STRUCT_FACTOR_POINTERS_END
74 };
75 
76 void RealGeomStructFactor_67cab(const REAL x,
77  const REAL y,
78  const REAL z,
79  const CrystVector_REAL&hh,
80  const CrystVector_REAL&kk,
81  const CrystVector_REAL&ll,
82  CrystVector_REAL& sfsf)
83 {
84 __VFN_GEOM_STRUCT_FACTOR_POINTERS_INIT
85 
86  SF+=16*pow(cos((L+K)/4),2)*cos(K*y)*cos(L*z+K/4)*cos(H*x-K/4);
87 
88 __VFN_GEOM_STRUCT_FACTOR_POINTERS_END
89 };
90 
91 void RealGeomStructFactor_67_cba(const REAL x,
92  const REAL y,
93  const REAL z,
94  const CrystVector_REAL&hh,
95  const CrystVector_REAL&kk,
96  const CrystVector_REAL&ll,
97  CrystVector_REAL& sfsf)
98 {
99 __VFN_GEOM_STRUCT_FACTOR_POINTERS_INIT
100 
101  SF+=16*pow(cos((-L+K)/4),2)*cos(L*z)*cos(K*y-L/4)*cos(H*x+L/4);
102 
103 __VFN_GEOM_STRUCT_FACTOR_POINTERS_END
104 };
105 
106 void RealGeomStructFactor_67bca(const REAL x,
107  const REAL y,
108  const REAL z,
109  const CrystVector_REAL&hh,
110  const CrystVector_REAL&kk,
111  const CrystVector_REAL&ll,
112  CrystVector_REAL& sfsf)
113 {
114 __VFN_GEOM_STRUCT_FACTOR_POINTERS_INIT
115 
116  SF+=16*pow(cos((H+L)/4),2)*cos(L*z)*cos(H*x+L/4)*cos(K*y-L/4);
117 
118 __VFN_GEOM_STRUCT_FACTOR_POINTERS_END
119 };
120 
121 void RealGeomStructFactor_67a_cb(const REAL x,
122  const REAL y,
123  const REAL z,
124  const CrystVector_REAL&hh,
125  const CrystVector_REAL&kk,
126  const CrystVector_REAL&ll,
127  CrystVector_REAL& sfsf)
128 {
129 __VFN_GEOM_STRUCT_FACTOR_POINTERS_INIT
130 
131  SF+=16*pow(cos((H-L)/4),2)*cos(H*x)*cos(L*z+H/4)*cos(K*y-H/4);
132 
133 __VFN_GEOM_STRUCT_FACTOR_POINTERS_END
134 };
135 
136 }//namespace
137 #undef H
138 #undef K
139 #undef L
140 #undef SF
141 #undef hh
142 #undef kk
143 #undef ll
144 #undef sfsf
145 #undef __VFN_GEOM_STRUCT_FACTOR_POINTERS_INIT
146 #undef __VFN_GEOM_STRUCT_FACTOR_POINTERS_END
147 
148 #undef __VFN_GEOM_STRUCT_FACTOR_USE_POINTERS
void RealGeomStructFactor_67ba_c(const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67cab(const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67bca(const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67a_cb(const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67(const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67_cba(const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
Definition: Atom.cpp:47