FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
fei_NodeDescriptor.hpp
Go to the documentation of this file.
1#ifndef _NodeDescriptor_hpp_
2#define _NodeDescriptor_hpp_
3
4/*--------------------------------------------------------------------*/
5/* Copyright 2005 Sandia Corporation. */
6/* Under the terms of Contract DE-AC04-94AL85000, there is a */
7/* non-exclusive license for use of this work by or on behalf */
8/* of the U.S. Government. Export of this program may require */
9/* a license from the United States Government. */
10/*--------------------------------------------------------------------*/
11
12#include <fei_macros.hpp>
13
14#include <fei_ArrayUtils.hpp>
15#include <iostream>
37 public:
39
42 numNodalDOF_(0), fieldIDList_(NULL),
45 {}
46
47 virtual ~NodeDescriptor();
48
49 GlobalID getGlobalNodeID() const {return(nodeID_);}
50 void setGlobalNodeID(GlobalID node) {nodeID_ = node;}
51
52 int getNodeNumber() const {return(nodeNumber_);}
53 void setNodeNumber(int nn) {nodeNumber_ = nn;};
54
55 int getBlkEqnNumber() const {return(blkEqnNumber_);}
56 void setBlkEqnNumber(int blkEqn) {blkEqnNumber_ = blkEqn;}
57
58 int getNumNodalDOF() const {return(numNodalDOF_);}
59 void setNumNodalDOF(int dof) {numNodalDOF_ = dof;}
60
61 void addField(int fieldID);
62 void setFieldEqnNumber(int fieldID, int eqn);
63
64 int getNumFields() const {return(numFields_);}
65 const int* getFieldIDList() const {return(fieldIDList_);}
66 const int* getFieldEqnNumbers() const {return(fieldEqnNumbers_);}
67
74 bool getFieldEqnNumber(int fieldID, int& eqnNumber) const;
75
79 void getFieldID(int eqnNumber, int& fieldID, int& offset_into_field) const;
80
81 bool operator==(const NodeDescriptor& nd) const
82 { return( nodeID_ == nd.nodeID_ ); }
83
84 bool operator!=(const NodeDescriptor& nd) const
85 { return( nodeID_ != nd.nodeID_ ); }
86
87 bool operator<(const NodeDescriptor& nd) const
88 { return( nodeID_ < nd.nodeID_ ); }
89
90 bool operator>(const NodeDescriptor& nd) const
91 { return( nodeID_ > nd.nodeID_ ); }
92
93 int getOwnerProc() const {return(ownerProc_);}
94 void setOwnerProc(int proc) {ownerProc_ = proc;}
95
96 void addBlockIndex(unsigned blk_idx)
98
99 size_t getNumBlocks() const {return blockList_.size();}
100 const std::vector<unsigned>& getBlockIndexList() const {return(blockList_);}
101 bool hasBlockIndex(unsigned blk_idx) const;
102
103 private:
105
108
110
112
113 int numNodalDOF_; //total number of nodal degrees-of-freedom
114
115 int* fieldIDList_; //list of field identifiers
116 int* fieldEqnNumbers_; //list of starting (global) equation numbers.
117 //fields can consist of more than one scalar (and
118 //have more than one associated equation), this
119 //is the first equation number
121
123
124 int ownerProc_; //processor that owns the equations for this node
125
126 std::vector<unsigned> blockList_; //indexes of blocks that contain this node
127};
128
129#endif
130
bool operator!=(const NodeDescriptor &nd) const
bool operator==(const NodeDescriptor &nd) const
void setFieldEqnNumber(int fieldID, int eqn)
void setNumNodalDOF(int dof)
void setNodeNumber(int nn)
void addBlockIndex(unsigned blk_idx)
void setGlobalNodeID(GlobalID node)
const std::vector< unsigned > & getBlockIndexList() const
NodeDescriptor(const NodeDescriptor &src)
int getNumNodalDOF() const
bool operator>(const NodeDescriptor &nd) const
void setBlkEqnNumber(int blkEqn)
void setOwnerProc(int proc)
int getBlkEqnNumber() const
void addField(int fieldID)
bool operator<(const NodeDescriptor &nd) const
NodeDescriptor & operator=(const NodeDescriptor &src)
int getNodeNumber() const
std::vector< unsigned > blockList_
int getOwnerProc() const
GlobalID getGlobalNodeID() const
const int * getFieldEqnNumbers() const
int getNumFields() const
void allocFieldLists()
bool hasBlockIndex(unsigned blk_idx) const
size_t getNumBlocks() const
bool getFieldEqnNumber(int fieldID, int &eqnNumber) const
void getFieldID(int eqnNumber, int &fieldID, int &offset_into_field) const
void allocBlockList()
const int * getFieldIDList() const
int GlobalID
Definition: fei_defs.h:60
int sortedListInsert(const T &item, std::vector< T > &list)