[cig-commits] r7643 - mc/3D/CitcomS/trunk/module/Exchanger
tan2 at geodynamics.org
tan2 at geodynamics.org
Wed Jul 11 13:17:32 PDT 2007
Author: tan2
Date: 2007-07-11 13:17:32 -0700 (Wed, 11 Jul 2007)
New Revision: 7643
Modified:
mc/3D/CitcomS/trunk/module/Exchanger/Boundary.cc
mc/3D/CitcomS/trunk/module/Exchanger/CitcomInterpolator.cc
mc/3D/CitcomS/trunk/module/Exchanger/CitcomSource.cc
mc/3D/CitcomS/trunk/module/Exchanger/SVTInlet.cc
mc/3D/CitcomS/trunk/module/Exchanger/SVTOutlet.cc
Log:
Added some comments
Modified: mc/3D/CitcomS/trunk/module/Exchanger/Boundary.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/Boundary.cc 2007-07-11 20:08:02 UTC (rev 7642)
+++ mc/3D/CitcomS/trunk/module/Exchanger/Boundary.cc 2007-07-11 20:17:32 UTC (rev 7643)
@@ -55,7 +55,10 @@
nodeID_.reserve(maxNodes);
normal_.reserve(maxNodes);
+ // find out which nodes belong to the boundary and fill X_ with them
initX(E, excludeTop, excludeBottom);
+
+ // define the tight bounding box of the boundary
initBBox(E);
bbox_.print("CitcomS-Boundary-BBox");
@@ -78,6 +81,7 @@
{
bbox_ = tightBBox();
+ // XXX: this is a hack
bbox_[0][2] = E->sphere.ri;
bbox_[1][2] = E->sphere.ro;
}
@@ -100,16 +104,16 @@
appendNode(E, node, normalFlag);
}
}
- }
+ }
else
addSidewalls(E, itop, 0);
-
+
const int ibottom = 1;
if(E->parallel.me_loc[3] == 0)
if(!excludeBottom) {
-
+
for(int k=1; k<=E->lmesh.noy; k++)
for(int j=1; j<=E->lmesh.nox; j++) {
std::vector<int> normalFlag(Exchanger::DIM,0);
@@ -118,7 +122,7 @@
int node = ijk2node(E, ibottom, j, k);
appendNode(E, node, normalFlag);
}
- }
+ }
else
addSidewalls(E, ibottom, -1);
else
Modified: mc/3D/CitcomS/trunk/module/Exchanger/CitcomInterpolator.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/CitcomInterpolator.cc 2007-07-11 20:08:02 UTC (rev 7642)
+++ mc/3D/CitcomS/trunk/module/Exchanger/CitcomInterpolator.cc 2007-07-11 20:17:32 UTC (rev 7643)
@@ -54,7 +54,12 @@
journal::debug_t debug("CitcomS-Exchanger");
debug << journal::at(__HERE__) << journal::endl;
+ // for each node in boundedMesh, find whether it is inside this
+ // processor, if yes, find which element it is inside and
+ // calculate the shape functions
init(boundedMesh, meshNode);
+
+ // testing the shape functions
selfTest(boundedMesh, meshNode);
elem_.print("CitcomS-CitcomInterpolator-elem");
Modified: mc/3D/CitcomS/trunk/module/Exchanger/CitcomSource.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/CitcomSource.cc 2007-07-11 20:08:02 UTC (rev 7642)
+++ mc/3D/CitcomS/trunk/module/Exchanger/CitcomSource.cc 2007-07-11 20:17:32 UTC (rev 7643)
@@ -67,6 +67,8 @@
journal::debug_t debug("CitcomS-Exchanger");
debug << journal::at(__HERE__) << journal::endl;
+ // mesh is empty right now, will receive the node coordinate from sink,
+ // will use interpolator to find out which nodes are inside this proc.
init(mesh, mybbox);
}
Modified: mc/3D/CitcomS/trunk/module/Exchanger/SVTInlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/SVTInlet.cc 2007-07-11 20:08:02 UTC (rev 7642)
+++ mc/3D/CitcomS/trunk/module/Exchanger/SVTInlet.cc 2007-07-11 20:17:32 UTC (rev 7643)
@@ -67,6 +67,7 @@
journal::debug_t debug("CitcomS-Exchanger");
debug << journal::at(__HERE__) << journal::endl;
+ // set CitcomS boundary flags
setVBCFlag();
setTBCFlag();
@@ -88,9 +89,11 @@
t.swap(t_old);
v.swap(v_old);
+ // receive the fields from outlet
sink.recv(t, v);
sink.recv(s);
+ // convert back to CitcomS' units and coordinate system
Exchanger::Convertor& convertor = Convertor::instance();
convertor.xtemperature(t);
convertor.xvelocity(v, sink.getX());
@@ -107,7 +110,10 @@
journal::debug_t debug("CitcomS-Exchanger");
debug << journal::at(__HERE__) << journal::endl;
+ // impose normal velocity and shear stress as BC for momentum eqn.
imposeSV();
+
+ // impose temperature BC for energy eqn.
imposeT();
}
Modified: mc/3D/CitcomS/trunk/module/Exchanger/SVTOutlet.cc
===================================================================
--- mc/3D/CitcomS/trunk/module/Exchanger/SVTOutlet.cc 2007-07-11 20:08:02 UTC (rev 7642)
+++ mc/3D/CitcomS/trunk/module/Exchanger/SVTOutlet.cc 2007-07-11 20:17:32 UTC (rev 7643)
@@ -59,6 +59,7 @@
journal::debug_t debug("CitcomS-Exchanger");
debug << journal::at(__HERE__) << journal::endl;
+ // interpolate the required fields
source.interpolateStress(s);
s.print("CitcomS-SVTOutlet-S");
@@ -68,11 +69,13 @@
source.interpolateTemperature(t);
t.print("CitcomS-SVTOutlet-T");
+ // convert to SI units and Cartesian coordinate system, if desired
Exchanger::Convertor& convertor = Convertor::instance();
//convertor.stress(s, source.getX());
convertor.velocity(v, source.getX());
convertor.temperature(t);
+ // send the fields to inlet
source.send(t, v);
source.send(s);
}
More information about the cig-commits
mailing list