1 |
/* |
2 |
* Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. |
3 |
* |
4 |
* The University of Notre Dame grants you ("Licensee") a |
5 |
* non-exclusive, royalty free, license to use, modify and |
6 |
* redistribute this software in source and binary code form, provided |
7 |
* that the following conditions are met: |
8 |
* |
9 |
* 1. Acknowledgement of the program authors must be made in any |
10 |
* publication of scientific results based in part on use of the |
11 |
* program. An acceptable form of acknowledgement is citation of |
12 |
* the article in which the program was described (Matthew |
13 |
* A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher |
14 |
* J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented |
15 |
* Parallel Simulation Engine for Molecular Dynamics," |
16 |
* J. Comput. Chem. 26, pp. 252-271 (2005)) |
17 |
* |
18 |
* 2. Redistributions of source code must retain the above copyright |
19 |
* notice, this list of conditions and the following disclaimer. |
20 |
* |
21 |
* 3. Redistributions in binary form must reproduce the above copyright |
22 |
* notice, this list of conditions and the following disclaimer in the |
23 |
* documentation and/or other materials provided with the |
24 |
* distribution. |
25 |
* |
26 |
* This software is provided "AS IS," without a warranty of any |
27 |
* kind. All express or implied conditions, representations and |
28 |
* warranties, including any implied warranty of merchantability, |
29 |
* fitness for a particular purpose or non-infringement, are hereby |
30 |
* excluded. The University of Notre Dame and its licensors shall not |
31 |
* be liable for any damages suffered by licensee as a result of |
32 |
* using, modifying or distributing the software or its |
33 |
* derivatives. In no event will the University of Notre Dame or its |
34 |
* licensors be liable for any lost revenue, profit or data, or for |
35 |
* direct, indirect, special, consequential, incidental or punitive |
36 |
* damages, however caused and regardless of the theory of liability, |
37 |
* arising out of the use of or inability to use software, even if the |
38 |
* University of Notre Dame has been advised of the possibility of |
39 |
* such damages. |
40 |
*/ |
41 |
#include "applications/hydrodynamics/HydrodynamicsModel.hpp" |
42 |
#include "applications/hydrodynamics/Spheric.hpp" |
43 |
#include "applications/hydrodynamics/Ellipsoid.hpp" |
44 |
#include "applications/hydrodynamics/CompositeShape.hpp" |
45 |
|
46 |
namespace oopse { |
47 |
|
48 |
bool HydrodynamicsModel::calcHydroProps(Spheric* spheric, double viscosity, double temperature) { |
49 |
return false; |
50 |
} |
51 |
|
52 |
bool HydrodynamicsModel::calcHydroProps(Ellipsoid* ellipsoid, double viscosity, double temperature) { |
53 |
return false; |
54 |
} |
55 |
|
56 |
bool HydrodynamicsModel::calcHydroProps(CompositeShape* compositexShape, double viscosity, double temperature) { |
57 |
return false; |
58 |
} |
59 |
|
60 |
void HydrodynamicsModel::writeHydroProps(std::ostream& os) { |
61 |
|
62 |
|
63 |
os << sd_->getType() << "\t"; |
64 |
|
65 |
//center of resistance |
66 |
os << cr_.center[0] << "\t" << cr_.center[1] << "\t" << cr_.center[2] << "\t"; |
67 |
|
68 |
//resistance tensor at center of resistance |
69 |
//translation |
70 |
os << cr_.Xi(0, 0) << "\t" << cr_.Xi(0, 1) << "\t" << cr_.Xi(0, 2) << "\t" |
71 |
<< cr_.Xi(1, 0) << "\t" << cr_.Xi(1, 1) << "\t" << cr_.Xi(1, 2) << "\t" |
72 |
<< cr_.Xi(2, 0) << "\t" << cr_.Xi(2, 1) << "\t" << cr_.Xi(2, 2) << "\t"; |
73 |
|
74 |
//rotation-translation |
75 |
os << cr_.Xi(0, 3) << "\t" << cr_.Xi(0, 4) << "\t" << cr_.Xi(0, 5) << "\t" |
76 |
<< cr_.Xi(1, 3) << "\t" << cr_.Xi(1, 4) << "\t" << cr_.Xi(1, 5) << "\t" |
77 |
<< cr_.Xi(2, 3) << "\t" << cr_.Xi(2, 4) << "\t" << cr_.Xi(2, 5) << "\t"; |
78 |
|
79 |
//translation-rotation |
80 |
os << cr_.Xi(3, 0) << "\t" << cr_.Xi(3, 1) << "\t" << cr_.Xi(3, 2) << "\t" |
81 |
<< cr_.Xi(4, 0) << "\t" << cr_.Xi(4, 1) << "\t" << cr_.Xi(4, 2) << "\t" |
82 |
<< cr_.Xi(5, 0) << "\t" << cr_.Xi(5, 1) << "\t" << cr_.Xi(5, 2) << "\t"; |
83 |
|
84 |
//rotation |
85 |
os << cr_.Xi(3, 3) << "\t" << cr_.Xi(3, 4) << "\t" << cr_.Xi(3, 5) << "\t" |
86 |
<< cr_.Xi(4, 3) << "\t" << cr_.Xi(4, 4) << "\t" << cr_.Xi(4, 5) << "\t" |
87 |
<< cr_.Xi(5, 3) << "\t" << cr_.Xi(5, 4) << "\t" << cr_.Xi(5, 5) << "\t"; |
88 |
|
89 |
|
90 |
//diffusion tensor at center of resistance |
91 |
//translation |
92 |
os << cr_.D(0, 0) << "\t" << cr_.D(0, 1) << "\t" << cr_.D(0, 2) << "\t" |
93 |
<< cr_.D(1, 0) << "\t" << cr_.D(1, 1) << "\t" << cr_.D(1, 2) << "\t" |
94 |
<< cr_.D(2, 0) << "\t" << cr_.D(2, 1) << "\t" << cr_.D(2, 2) << "\t"; |
95 |
|
96 |
//rotation-translation |
97 |
os << cr_.D(0, 3) << "\t" << cr_.D(0, 4) << "\t" << cr_.D(0, 5) << "\t" |
98 |
<< cr_.D(1, 3) << "\t" << cr_.D(1, 4) << "\t" << cr_.D(1, 5) << "\t" |
99 |
<< cr_.D(2, 3) << "\t" << cr_.D(2, 4) << "\t" << cr_.D(2, 5) << "\t"; |
100 |
|
101 |
//translation-rotation |
102 |
os << cr_.D(3, 0) << "\t" << cr_.D(3, 1) << "\t" << cr_.D(3, 2) << "\t" |
103 |
<< cr_.D(4, 0) << "\t" << cr_.D(4, 1) << "\t" << cr_.D(4, 2) << "\t" |
104 |
<< cr_.D(5, 0) << "\t" << cr_.D(5, 1) << "\t" << cr_.D(5, 2) << "\t"; |
105 |
|
106 |
//rotation |
107 |
os << cr_.D(3, 3) << "\t" << cr_.D(3, 4) << "\t" << cr_.D(3, 5) << "\t" |
108 |
<< cr_.D(4, 3) << "\t" << cr_.D(4, 4) << "\t" << cr_.D(4, 5) << "\t" |
109 |
<< cr_.D(5, 3) << "\t" << cr_.D(5, 4) << "\t" << cr_.D(5, 5) << "\t"; |
110 |
|
111 |
//--------------------------------------------------------------------- |
112 |
|
113 |
//center of diffusion |
114 |
os << cd_.center[0] << "\t" << cd_.center[1] << "\t" << cd_.center[2] << "\t"; |
115 |
|
116 |
//resistance tensor at center of diffusion |
117 |
//translation |
118 |
os << cd_.Xi(0, 0) << "\t" << cd_.Xi(0, 1) << "\t" << cd_.Xi(0, 2) << "\t" |
119 |
<< cd_.Xi(1, 0) << "\t" << cd_.Xi(1, 1) << "\t" << cd_.Xi(1, 2) << "\t" |
120 |
<< cd_.Xi(2, 0) << "\t" << cd_.Xi(2, 1) << "\t" << cd_.Xi(2, 2) << "\t"; |
121 |
|
122 |
//rotation-translation |
123 |
os << cd_.Xi(0, 3) << "\t" << cd_.Xi(0, 4) << "\t" << cd_.Xi(0, 5) << "\t" |
124 |
<< cd_.Xi(1, 3) << "\t" << cd_.Xi(1, 4) << "\t" << cd_.Xi(1, 5) << "\t" |
125 |
<< cd_.Xi(2, 3) << "\t" << cd_.Xi(2, 4) << "\t" << cd_.Xi(2, 5) << "\t"; |
126 |
|
127 |
//translation-rotation |
128 |
os << cd_.Xi(3, 0) << "\t" << cd_.Xi(3, 1) << "\t" << cd_.Xi(3, 2) << "\t" |
129 |
<< cd_.Xi(4, 0) << "\t" << cd_.Xi(4, 1) << "\t" << cd_.Xi(4, 2) << "\t" |
130 |
<< cd_.Xi(5, 0) << "\t" << cd_.Xi(5, 1) << "\t" << cd_.Xi(5, 2) << "\t"; |
131 |
|
132 |
//rotation |
133 |
os << cd_.Xi(3, 3) << "\t" << cd_.Xi(3, 4) << "\t" << cd_.Xi(3, 5) << "\t" |
134 |
<< cd_.Xi(4, 3) << "\t" << cd_.Xi(4, 4) << "\t" << cd_.Xi(4, 5) << "\t" |
135 |
<< cd_.Xi(5, 3) << "\t" << cd_.Xi(5, 4) << "\t" << cd_.Xi(5, 5) << "\t"; |
136 |
|
137 |
|
138 |
//diffusion tensor at center of diffusion |
139 |
//translation |
140 |
os << cd_.D(0, 0) << "\t" << cd_.D(0, 1) << "\t" << cd_.D(0, 2) << "\t" |
141 |
<< cd_.D(1, 0) << "\t" << cd_.D(1, 1) << "\t" << cd_.D(1, 2) << "\t" |
142 |
<< cd_.D(2, 0) << "\t" << cd_.D(2, 1) << "\t" << cd_.D(2, 2) << "\t"; |
143 |
|
144 |
//rotation-translation |
145 |
os << cd_.D(0, 3) << "\t" << cd_.D(0, 4) << "\t" << cd_.D(0, 5) << "\t" |
146 |
<< cd_.D(1, 3) << "\t" << cd_.D(1, 4) << "\t" << cd_.D(1, 5) << "\t" |
147 |
<< cd_.D(2, 3) << "\t" << cd_.D(2, 4) << "\t" << cd_.D(2, 5) << "\t"; |
148 |
|
149 |
//translation-rotation |
150 |
os << cd_.D(3, 0) << "\t" << cd_.D(3, 1) << "\t" << cd_.D(3, 2) << "\t" |
151 |
<< cd_.D(4, 0) << "\t" << cd_.D(4, 1) << "\t" << cd_.D(4, 2) << "\t" |
152 |
<< cd_.D(5, 0) << "\t" << cd_.D(5, 1) << "\t" << cd_.D(5, 2) << "\t"; |
153 |
|
154 |
//rotation |
155 |
os << cd_.D(3, 3) << "\t" << cd_.D(3, 4) << "\t" << cd_.D(3, 5) << "\t" |
156 |
<< cd_.D(4, 3) << "\t" << cd_.D(4, 4) << "\t" << cd_.D(4, 5) << "\t" |
157 |
<< cd_.D(5, 3) << "\t" << cd_.D(5, 4) << "\t" << cd_.D(5, 5) << "\n"; |
158 |
|
159 |
|
160 |
} |
161 |
|
162 |
} |