|
From: <das...@us...> - 2008-10-29 20:50:22
|
Revision: 1188
http://vlab.svn.sourceforge.net/vlab/?rev=1188&view=rev
Author: dasil014
Date: 2008-10-29 20:50:13 +0000 (Wed, 29 Oct 2008)
Log Message:
-----------
This new version of aproxeqst reads the cell volume from newer versions of PWscf.
Modified Paths:
--------------
trunk/vlab/services/pwscf-input-splitter/src/main/native/aproxeqst.c
Modified: trunk/vlab/services/pwscf-input-splitter/src/main/native/aproxeqst.c
===================================================================
--- trunk/vlab/services/pwscf-input-splitter/src/main/native/aproxeqst.c 2008-10-29 20:43:57 UTC (rev 1187)
+++ trunk/vlab/services/pwscf-input-splitter/src/main/native/aproxeqst.c 2008-10-29 20:50:13 UTC (rev 1188)
@@ -134,7 +134,7 @@
}
-static double cellvol(double (*CellExt)[3])
+static double cellvolold(double (*CellExt)[3])
{
short i, j, k;
VDat cell[3];
@@ -161,7 +161,35 @@
return c;
}
+static double cellvol(double (*CellExt)[3])
+{
+ short i, j, k;
+ VDat cell[3];
+ double a,b,c;
+ for (i = 0; i <= 2; i++) {
+ cell[0][i] = CellExt[0][i];
+ cell[1][i] = CellExt[1][i];
+ cell[2][i] = CellExt[2][i];
+ }
+
+ c = 0.0;
+ a = cell[0][0] * cell[1][1] * cell[2][2];
+ b = cell[0][2] * cell[1][1] * cell[2][0];
+ c = c + a - b;
+
+ a = cell[0][1] * cell[1][2] * cell[2][0];
+ b = cell[0][0] * cell[1][2] * cell[2][1];
+ c = c + a - b;
+
+ a = cell[0][2] * cell[1][0] * cell[2][1];
+ b = cell[0][1] * cell[1][0] * cell[2][2];
+ c = c + a - b;
+
+ printf(" %9.2f",c);
+ return c;
+}
+
static void genwild(double Cell0Vol, double k0, double kl, short npress,
double *presslist, double (*Cell0)[3])
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|