Skip to content
Snippets Groups Projects
Commit 66526457 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 2627e48b
No related branches found
No related tags found
No related merge requests found
// $Id: PViewDataGModel.cpp,v 1.32 2008-03-20 10:52:37 geuzaine Exp $
// $Id: PViewDataGModel.cpp,v 1.33 2008-03-20 11:05:08 geuzaine Exp $
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
......@@ -206,6 +206,8 @@ GEntity *PViewDataGModel::getEntity(int step, int ent)
bool PViewDataGModel::getValue(int step, int dataIndex, int comp, double &val)
{
if(dataIndex < 0 || dataIndex >= (int)_steps[step]->getNumData()) return false;
val = _steps[step]->getData(dataIndex)[comp];
double *d = _steps[step]->getData(dataIndex);
if(!d) return false;
val = d[comp];
return true;
}
......@@ -154,9 +154,9 @@ class PViewDataGModel : public PViewData {
// create old-style list-based dataset from this one
//PViewDataList *convertToPViewDataList();
// direct access to GModel entities and direct access to value by
// dataIndex
// direct access to GModel entities
GEntity *getEntity(int step, int ent);
// direct access to value by dataIndex
bool getValue(int step, int dataIndex, int comp, double &val);
// I/O routines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment