Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/3rdparty/eigen3
Submodule eigen3 updated from 25270e to 9df21d
14 changes: 4 additions & 10 deletions lib/vistle/module/objectcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ void ObjectCache::setCacheMode(ObjectCache::CacheMode mode)
m_cacheMode = mode;
}

ObjectCache::Entry::Entry(Object::const_ptr object)
ObjectCache::Entry::Entry(Object::const_ptr object, bool cacheByNameOnly)
: name(object->getName())
, object(object)
, object(cacheByNameOnly ? nullptr : object)
, block(getBlock(object))
, timestep(getTimestep(object))
, iteration(getIteration(object))
Expand Down Expand Up @@ -80,10 +80,7 @@ void ObjectCache::addObject(const std::string &portname, Object::const_ptr objec
if (entry.block == block && entry.timestep == time) {
auto olditer = entry.iteration;
if (iter >= olditer) {
entry = Entry(object);
if (m_cacheMode == CacheByName) {
entry.object.reset();
}
entry = Entry(object, m_cacheMode == CacheByName);
} else {
std::cerr << "ignoring object with iteration " << iter << " for port " << portname
<< " (old: " << olditer << "): " << *object << std::endl;
Expand All @@ -93,10 +90,7 @@ void ObjectCache::addObject(const std::string &portname, Object::const_ptr objec
}
}

cache.emplace_back(object);
if (m_cacheMode == CacheByName) {
cache.back().object.reset();
}
cache.emplace_back(object, m_cacheMode == CacheByName);
}

std::pair<ObjectList, bool> ObjectCache::getObjects(const std::string &portname) const
Expand Down
2 changes: 1 addition & 1 deletion lib/vistle/module/objectcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ObjectCache {
CacheMode m_cacheMode;

struct Entry {
Entry(Object::const_ptr object);
Entry(Object::const_ptr object, bool cacheByNameOnly);
std::string name;
Object::const_ptr object;
int block;
Expand Down
2 changes: 1 addition & 1 deletion lib/vistle/rhr/rhrserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool RhrServer::send(message::Buffer msg, const buffer *payload)

//! called when plugin is loaded
RhrServer::RhrServer(vistle::Module *module)
: m_module(module), m_acceptorv4(m_io), m_acceptorv6(m_io), m_listen(true), m_port(0), m_destPort(0)
: m_acceptorv4(m_io), m_acceptorv6(m_io), m_listen(true), m_port(0), m_destPort(0)
{
init();
}
Expand Down
1 change: 0 additions & 1 deletion lib/vistle/rhr/rhrserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ class V_RHREXPORT RhrServer {
const std::vector<std::string> &removed);

private:
vistle::Module *m_module;
asio::io_service m_io;
asio::ip::tcp::acceptor m_acceptorv4, m_acceptorv6;
bool m_listen = false;
Expand Down
11 changes: 6 additions & 5 deletions module/read/ReadDuisburg/ReadDuisburg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ Object::ptr ReadDuisburg::generateTriangleGrid(const NcmpiFile &ncFile, int time
zVar.getVar_all(startHZ, stopHZ, z_coord.data());
hVar.getVar_all(startHZ, stopHZ, h.data());

size_t nVertices = dimX * dimY;
// size_t nVertices = dimX * dimY;
// size_t nFaces = (dimX-1)*(dimY-1);
// size_t nCorners = nFaces*4;
size_t nFaces = (dimX - 1) * (dimY - 1) * 2;
size_t nCorners = nFaces * 6;
// size_t nCorners = nFaces * 6;

int nonZero = 0;
int nonZeroVertices = 0;
Expand Down Expand Up @@ -177,8 +177,6 @@ Object::ptr ReadDuisburg::generateTriangleGrid(const NcmpiFile &ncFile, int time
std::fill(localIdx.begin(), localIdx.end(), 0);

//fill coordinates, but only for vertices with water
int idxAll = 0, count = 0;
float h_idx = 0;
for (int i = 0; i < nonZeroVerticesVec.size(); ++i) {
int idx = nonZeroVerticesVec[i];
if (idx >= 0) {
Expand All @@ -191,6 +189,8 @@ Object::ptr ReadDuisburg::generateTriangleGrid(const NcmpiFile &ncFile, int time
}
}

/* int idxAll = 0, count = 0; */
/* float h_idx = 0; */
/* for (int j = 0; j < dimY; ++j) { */
/* for (int i = 0; i < dimX; ++i) { */
/* idxAll = j*dimX + i; */
Expand All @@ -215,7 +215,8 @@ Object::ptr ReadDuisburg::generateTriangleGrid(const NcmpiFile &ncFile, int time

//create triangle faces for water cells
// Index currentFace = 0;
int currentConnection = 0, currentElem = 0;
int currentConnection = 0;
/* int currentElem = 0; */
for (int j = 0; j < (dimY - 1); ++j) {
for (int i = 0; i < (dimX - 1); ++i) {
if (cellIsWater(h, i, j, dimX, dimY)) {
Expand Down
16 changes: 13 additions & 3 deletions module/read/ReadSoundPlan/ReadSoundPlan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,21 @@ bool ReadSoundPlan::read(Token &token, int timestep, int block)
*c = '.';
c++;
}
float W;
if (haveW)
#ifdef VISTLE_SCALAR_DOUBLE
if (haveW) {
double W;
sscanf(buf, "%lf%lf%lf%lf%lf%lf", x_coord, y_coord, z_coord, &W, dBDay, dBNight);
} else {
sscanf(buf, "%lf%lf%lf%lf%lf", x_coord, y_coord, z_coord, dBDay, dBNight);
}
#else
if (haveW) {
float W;
sscanf(buf, "%f%f%f%f%f%f", x_coord, y_coord, z_coord, &W, dBDay, dBNight);
else
} else {
sscanf(buf, "%f%f%f%f%f", x_coord, y_coord, z_coord, dBDay, dBNight);
}
#endif
x_coord++;
y_coord++;
z_coord++;
Expand Down
6 changes: 3 additions & 3 deletions module/render/COVER/plugin/RhrClient/RemoteConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,16 +846,16 @@ void RemoteConnection::handleTileMeta(const RemoteRenderMessage &remote, const t
}
#endif
#endif
if (currentFrame >= 0 && currentFrame > msg.frameNumber) {
if (currentFrame >= 0 && currentFrame > static_cast<long>(msg.frameNumber)) {
CERR << "receiving tiles out of order: expectecd at least frame no. " << currentFrame << ", but got "
<< msg.frameNumber << std::endl;
}
assert(currentFrame < 0 || msg.frameNumber >= currentFrame);
assert(currentFrame < 0 || static_cast<long>(msg.frameNumber) >= currentFrame);
if (expectNewFrame && msg.frameNumber == currentFrame) {
CERR << "receiving tile after last tile for frame " << currentFrame << ", but got " << msg.frameNumber
<< std::endl;
}
assert(!expectNewFrame || msg.frameNumber > currentFrame);
assert(!expectNewFrame || static_cast<long>(msg.frameNumber) > currentFrame);
expectNewFrame = msg.flags & rfbTileLast;
currentFrame = msg.frameNumber;
osg::Matrix model, view, proj, head;
Expand Down