ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/hydrodynamics/HydrodynamicsModel.cpp
Revision: 2634
Committed: Fri Mar 17 23:20:35 2006 UTC (18 years, 4 months ago) by tim
File size: 7629 byte(s)
Log Message:
refactor Hydrodynamics module.

File Contents

# User Rev Content
1 tim 2596 /*
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 tim 2634 #include "applications/hydrodynamics/HydrodynamicsModel.hpp"
42     #include "applications/hydrodynamics/Spheric.hpp"
43     #include "applications/hydrodynamics/Ellipsoid.hpp"
44     #include "applications/hydrodynamics/CompositeShape.hpp"
45 tim 2596
46     namespace oopse {
47 tim 2597
48 tim 2634 bool HydrodynamicsModel::calcHydroProps(Spheric* spheric, double viscosity, double temperature) {
49     return false;
50 tim 2597 }
51 tim 2611
52 tim 2634 bool HydrodynamicsModel::calcHydroProps(Ellipsoid* ellipsoid, double viscosity, double temperature) {
53     return false;
54 tim 2596 }
55    
56 tim 2634 bool HydrodynamicsModel::calcHydroProps(CompositeShape* compositexShape, double viscosity, double temperature) {
57     return false;
58 tim 2611 }
59    
60 tim 2634 void HydrodynamicsModel::writeHydroProps(std::ostream& os) {
61 tim 2611
62    
63 tim 2634 os << sd_->getType() << "\t";
64 tim 2611
65 tim 2634 //center of resistance
66     os << cr_.center[0] << "\t" << cr_.center[1] << "\t" << cr_.center[2] << "\t";
67 tim 2611
68 tim 2634 //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 tim 2611
74 tim 2634 //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 tim 2626
79 tim 2634 //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 tim 2611
84 tim 2634 //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 tim 2611
89    
90 tim 2634 //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 tim 2611
96 tim 2634 //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 tim 2627
101 tim 2634 //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 tim 2632
106 tim 2634 //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 tim 2632
113 tim 2634 //center of diffusion
114     os << cd_.center[0] << "\t" << cd_.center[1] << "\t" << cd_.center[2] << "\t";
115 tim 2611
116 tim 2634 //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 tim 2626
122 tim 2634 //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 tim 2626
127 tim 2634 //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 tim 2611
132 tim 2634 //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 tim 2596
137    
138 tim 2634 //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 tim 2596
144 tim 2634 //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 tim 2597
149 tim 2634 //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 tim 2597
154 tim 2634 //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 tim 2597
159 tim 2611
160 tim 2596 }
161    
162     }

Properties

Name Value
svn:executable *