/**********************************************************************
** This program is part of 'MOOSE', the
** Messaging Object Oriented Simulation Environment,
** also known as GENESIS 3 base code.
** copyright (C) 2003-2006 Upinder S. Bhalla. and NCBS
** It is made available under the terms of the
** GNU Lesser General Public License version 2.1
** See the file COPYING.LIB for the full notice.
**********************************************************************/
#include "header.h"
#include "../shell/Shell.h"
//////////////////////////////////////////////////////////////
// ObjId I/O
//////////////////////////////////////////////////////////////
// Doesn't know how to deal with off-node bad fields.
bool ObjId::bad() const
{
Element* elm = id.element();
return ( elm == 0 ||
dataIndex == BADINDEX ||
fieldIndex == BADINDEX ||
dataIndex >= elm->numData()
/*
* We have a bit of a problem here. The FieldElement can exist
* with zero fields, and is invalid for field lookups but valid
* for the element level lookups. I should rather not create the
* FieldElements this way.
|| (
elm->getNode( dataIndex ) == Shell::myNode() &&
fieldIndex >= elm->numField( dataIndex - elm->localDataStart() )
)
*/
);
}
ostream& operator