45 theSpaceGroup(spacegroup),
59 cosa=std::cos(alpha),
cosb=std::cos(beta),
cosg=std::cos(gamma);
60 sina=std::sin(alpha),
sinb=std::sin(beta),
sing=std::sin(gamma);
151 if( aGroup >= 1 && aGroup <= 2 ) {
return Triclinic;}
152 else if(aGroup >= 3 && aGroup <= 15 ) {
return Monoclinic;}
153 else if(aGroup >= 16 && aGroup <= 74 ) {
return Orthorhombic;}
154 else if(aGroup >= 75 && aGroup <= 142) {
return Tetragonal;}
155 else if(aGroup == 146 || aGroup == 148 ||
156 aGroup == 155 || aGroup == 160 ||
157 aGroup == 161 || aGroup == 166 ||
159 else if(aGroup >= 143 && aGroup <= 167) {
return Hexagonal;}
160 else if(aGroup >= 168 && aGroup <= 194) {
return Hexagonal;}
161 else if(aGroup >= 195 && aGroup <= 230) {
return Cubic;}
210 vecout.push_back(aaa);
219 for(
auto &vec:vecout){
265 Cij[3][3] = 0.5*(Cij[0][0]-Cij[0][1]);
272 G4double C11=Cij[0][0], C12=Cij[0][1], C44=Cij[3][3];
274 for (
size_t i=0; i<6; i++) {
275 for (
size_t j=i; j<6; j++) {
276 if (i<3 && j<3) Cij[i][j] = (i==j) ? C11 : C12;
277 else if (i==j && i>=3) Cij[i][i] = C44;
284 return (C11!=0. && C12!=0. && C44!=0.);
290 G4double C11=Cij[0][0], C12=Cij[0][1], C13=Cij[0][2], C16=Cij[0][5];
291 G4double C33=Cij[2][2], C44=Cij[3][3], C66=Cij[5][5];
301 return (C11!=0. && C12!=0. && C13!=0. && C33!=0. && C44!=0. && C66!=0.);
311 for (
size_t i=0; i<6; i++) {
312 for (
size_t j=i+1; j<3; j++)
313 good &= (Cij[i][j] != 0);
322 G4double C11=Cij[0][0], C12=Cij[0][1], C13=Cij[0][2], C14=Cij[0][3];
323 G4double C15=Cij[0][4], C33=Cij[2][2], C44=Cij[3][3], C66=0.5*(C11-C12);
334 return (C11!=0 && C12!=0 && C13!=0 && C14!=0. &&
335 C33!=0. && C44!=0. && C66!=0.);
345 Cij[2][5] != 0. && Cij[3][4]!=0.);
356 for (
size_t i=0; i<6; i++) {
357 for (
size_t j=i; j<6; j++) good &= (Cij[i][j] != 0);
368 Cij[4][5] = 0.5*(Cij[0][0] - Cij[0][1]);
376 for (
size_t i=1; i<6; i++) {
377 for (
size_t j=i+1; j<6; j++) {
378 Cij[j][i] = Cij[i][j];
413 return std::sqrt(3.0)/2.*a*a*
c;
458 return a2 / ( h2+k2+l2 );
461 return 1.0 / ( (h2 +
k2)/a2 + l2/c2 );
464 return 1.0 / ( h2/a2 + k2/b2 + l2/
c2 );
468 T = h2+k2+l2+2.*(h*k+k*l+h*l) * ((cos2a-cosa)/sin2a);
469 R = sin2a / (1. - 3*cos2a + 2.*cos2a*
cosa);
474 return 1./(1./sin2b * (h2/a2+l2/c2-2*h*l*
cosb/(a*
c)) + k2/b2);
480 return 1. / ( (4.*(h2+k2+h*
k) / (3.*a2)) + l2/c2 );
521 return a2 * (h2+k2+l2);
524 return (h2+k2)*a2 + l2*
c2 ;
527 return h2*a2 + k2+b2 + h2*
c2;
530 return (h2+k2+l2+2.*(h*k+k*l+h*l) *
cosar)*a2;
533 return h2*a2+k2*b2+l2*c2+2.*h*l*a*c*
cosbr;
536 return h2*a2+k2*b2+l2*c2+2.*k*l*b*c*
cosar+2.*l*h*c*a*cosbr+2.*h*k*a*b*
cosgr;
539 return (h2+k2+h*k)*a2 + l2*
c2;
581 return (h1*h2 + k1*k2 + l1+l2) / (std::sqrt(h1*h1 + k1*k1 + l1*l1) * std::sqrt(h2*h2 + k2*k2 + l2*l2));
589 return dsp1dsp2 * (h1*h2*a2 + k1*k2*a2 + l1*l2*
c2);
593 return dsp1dsp2 * (h1*h2*a2 + k1*k2*b2 + l1*l2*c2+
594 (k1*l2+k2*l1)*b*c*
cosar+
595 (h1*l2+h2*l1)*a*c*
cosbr+
600 return dsp1dsp2 * (h1*h2*a2 + k1*k2*b2 + l1*l2*c2+
601 (k1*l2+k2*l1)*b*c*
cosar+
602 (h1*l2+h2*l1)*a*c*
cosbr+
603 (h1*k2+h2*
k1)*a*b*cosgr);
607 return dsp1dsp2 * (h1*h2*a2 + k1*k2*b2 + l1*l2*c2+
608 (k1*l2+k2*l1)*b*c*
cosar+
609 (h1*l2+h2*l1)*a*c*
cosbr+
610 (h1*k2+h2*
k1)*a*b*cosgr);
614 return dsp1dsp2 *( (h1*h2 + k1*k2 + 0.5*(h1*k2+k1*
h2))*a2 + l1*l2*
c2);