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 "hydrodynamics/Shape.hpp" |
43 |
#include "hydrodynamics/Sphere.hpp" |
44 |
#include "hydrodynamics/Ellipsoid.hpp" |
45 |
#include "applications/hydrodynamics/CompositeShape.hpp" |
46 |
|
47 |
namespace oopse { |
48 |
|
49 |
bool HydrodynamicsModel::calcHydroProps(Shape* shape, RealType viscosity, RealType temperature) { |
50 |
return false; |
51 |
} |
52 |
|
53 |
void HydrodynamicsModel::writeHydroProps(std::ostream& os) { |
54 |
|
55 |
|
56 |
os << sd_->getType() << "\t"; |
57 |
|
58 |
//center of resistance |
59 |
os << cr_.center[0] << "\t" << cr_.center[1] << "\t" << cr_.center[2] << "\t"; |
60 |
|
61 |
//resistance tensor at center of resistance |
62 |
//translation |
63 |
os << cr_.Xi(0, 0) << "\t" << cr_.Xi(0, 1) << "\t" << cr_.Xi(0, 2) << "\t" |
64 |
<< cr_.Xi(1, 0) << "\t" << cr_.Xi(1, 1) << "\t" << cr_.Xi(1, 2) << "\t" |
65 |
<< cr_.Xi(2, 0) << "\t" << cr_.Xi(2, 1) << "\t" << cr_.Xi(2, 2) << "\t"; |
66 |
|
67 |
//rotation-translation |
68 |
os << cr_.Xi(0, 3) << "\t" << cr_.Xi(0, 4) << "\t" << cr_.Xi(0, 5) << "\t" |
69 |
<< cr_.Xi(1, 3) << "\t" << cr_.Xi(1, 4) << "\t" << cr_.Xi(1, 5) << "\t" |
70 |
<< cr_.Xi(2, 3) << "\t" << cr_.Xi(2, 4) << "\t" << cr_.Xi(2, 5) << "\t"; |
71 |
|
72 |
//translation-rotation |
73 |
os << cr_.Xi(3, 0) << "\t" << cr_.Xi(3, 1) << "\t" << cr_.Xi(3, 2) << "\t" |
74 |
<< cr_.Xi(4, 0) << "\t" << cr_.Xi(4, 1) << "\t" << cr_.Xi(4, 2) << "\t" |
75 |
<< cr_.Xi(5, 0) << "\t" << cr_.Xi(5, 1) << "\t" << cr_.Xi(5, 2) << "\t"; |
76 |
|
77 |
//rotation |
78 |
os << cr_.Xi(3, 3) << "\t" << cr_.Xi(3, 4) << "\t" << cr_.Xi(3, 5) << "\t" |
79 |
<< cr_.Xi(4, 3) << "\t" << cr_.Xi(4, 4) << "\t" << cr_.Xi(4, 5) << "\t" |
80 |
<< cr_.Xi(5, 3) << "\t" << cr_.Xi(5, 4) << "\t" << cr_.Xi(5, 5) << "\t"; |
81 |
|
82 |
|
83 |
//diffusion tensor at center of resistance |
84 |
//translation |
85 |
os << cr_.D(0, 0) << "\t" << cr_.D(0, 1) << "\t" << cr_.D(0, 2) << "\t" |
86 |
<< cr_.D(1, 0) << "\t" << cr_.D(1, 1) << "\t" << cr_.D(1, 2) << "\t" |
87 |
<< cr_.D(2, 0) << "\t" << cr_.D(2, 1) << "\t" << cr_.D(2, 2) << "\t"; |
88 |
|
89 |
//rotation-translation |
90 |
os << cr_.D(0, 3) << "\t" << cr_.D(0, 4) << "\t" << cr_.D(0, 5) << "\t" |
91 |
<< cr_.D(1, 3) << "\t" << cr_.D(1, 4) << "\t" << cr_.D(1, 5) << "\t" |
92 |
<< cr_.D(2, 3) << "\t" << cr_.D(2, 4) << "\t" << cr_.D(2, 5) << "\t"; |
93 |
|
94 |
//translation-rotation |
95 |
os << cr_.D(3, 0) << "\t" << cr_.D(3, 1) << "\t" << cr_.D(3, 2) << "\t" |
96 |
<< cr_.D(4, 0) << "\t" << cr_.D(4, 1) << "\t" << cr_.D(4, 2) << "\t" |
97 |
<< cr_.D(5, 0) << "\t" << cr_.D(5, 1) << "\t" << cr_.D(5, 2) << "\t"; |
98 |
|
99 |
//rotation |
100 |
os << cr_.D(3, 3) << "\t" << cr_.D(3, 4) << "\t" << cr_.D(3, 5) << "\t" |
101 |
<< cr_.D(4, 3) << "\t" << cr_.D(4, 4) << "\t" << cr_.D(4, 5) << "\t" |
102 |
<< cr_.D(5, 3) << "\t" << cr_.D(5, 4) << "\t" << cr_.D(5, 5) << "\t"; |
103 |
|
104 |
//--------------------------------------------------------------------- |
105 |
|
106 |
//center of diffusion |
107 |
os << cd_.center[0] << "\t" << cd_.center[1] << "\t" << cd_.center[2] << "\t"; |
108 |
|
109 |
//resistance tensor at center of diffusion |
110 |
//translation |
111 |
os << cd_.Xi(0, 0) << "\t" << cd_.Xi(0, 1) << "\t" << cd_.Xi(0, 2) << "\t" |
112 |
<< cd_.Xi(1, 0) << "\t" << cd_.Xi(1, 1) << "\t" << cd_.Xi(1, 2) << "\t" |
113 |
<< cd_.Xi(2, 0) << "\t" << cd_.Xi(2, 1) << "\t" << cd_.Xi(2, 2) << "\t"; |
114 |
|
115 |
//rotation-translation |
116 |
os << cd_.Xi(0, 3) << "\t" << cd_.Xi(0, 4) << "\t" << cd_.Xi(0, 5) << "\t" |
117 |
<< cd_.Xi(1, 3) << "\t" << cd_.Xi(1, 4) << "\t" << cd_.Xi(1, 5) << "\t" |
118 |
<< cd_.Xi(2, 3) << "\t" << cd_.Xi(2, 4) << "\t" << cd_.Xi(2, 5) << "\t"; |
119 |
|
120 |
//translation-rotation |
121 |
os << cd_.Xi(3, 0) << "\t" << cd_.Xi(3, 1) << "\t" << cd_.Xi(3, 2) << "\t" |
122 |
<< cd_.Xi(4, 0) << "\t" << cd_.Xi(4, 1) << "\t" << cd_.Xi(4, 2) << "\t" |
123 |
<< cd_.Xi(5, 0) << "\t" << cd_.Xi(5, 1) << "\t" << cd_.Xi(5, 2) << "\t"; |
124 |
|
125 |
//rotation |
126 |
os << cd_.Xi(3, 3) << "\t" << cd_.Xi(3, 4) << "\t" << cd_.Xi(3, 5) << "\t" |
127 |
<< cd_.Xi(4, 3) << "\t" << cd_.Xi(4, 4) << "\t" << cd_.Xi(4, 5) << "\t" |
128 |
<< cd_.Xi(5, 3) << "\t" << cd_.Xi(5, 4) << "\t" << cd_.Xi(5, 5) << "\t"; |
129 |
|
130 |
|
131 |
//diffusion tensor at center of diffusion |
132 |
//translation |
133 |
os << cd_.D(0, 0) << "\t" << cd_.D(0, 1) << "\t" << cd_.D(0, 2) << "\t" |
134 |
<< cd_.D(1, 0) << "\t" << cd_.D(1, 1) << "\t" << cd_.D(1, 2) << "\t" |
135 |
<< cd_.D(2, 0) << "\t" << cd_.D(2, 1) << "\t" << cd_.D(2, 2) << "\t"; |
136 |
|
137 |
//rotation-translation |
138 |
os << cd_.D(0, 3) << "\t" << cd_.D(0, 4) << "\t" << cd_.D(0, 5) << "\t" |
139 |
<< cd_.D(1, 3) << "\t" << cd_.D(1, 4) << "\t" << cd_.D(1, 5) << "\t" |
140 |
<< cd_.D(2, 3) << "\t" << cd_.D(2, 4) << "\t" << cd_.D(2, 5) << "\t"; |
141 |
|
142 |
//translation-rotation |
143 |
os << cd_.D(3, 0) << "\t" << cd_.D(3, 1) << "\t" << cd_.D(3, 2) << "\t" |
144 |
<< cd_.D(4, 0) << "\t" << cd_.D(4, 1) << "\t" << cd_.D(4, 2) << "\t" |
145 |
<< cd_.D(5, 0) << "\t" << cd_.D(5, 1) << "\t" << cd_.D(5, 2) << "\t"; |
146 |
|
147 |
//rotation |
148 |
os << cd_.D(3, 3) << "\t" << cd_.D(3, 4) << "\t" << cd_.D(3, 5) << "\t" |
149 |
<< cd_.D(4, 3) << "\t" << cd_.D(4, 4) << "\t" << cd_.D(4, 5) << "\t" |
150 |
<< cd_.D(5, 3) << "\t" << cd_.D(5, 4) << "\t" << cd_.D(5, 5) << "\n"; |
151 |
|
152 |
} |
153 |
|
154 |
} |