/usr/include/trilinos/fei_NodeDescriptor.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | #ifndef _NodeDescriptor_hpp_
#define _NodeDescriptor_hpp_
/*--------------------------------------------------------------------*/
/* Copyright 2005 Sandia Corporation. */
/* Under the terms of Contract DE-AC04-94AL85000, there is a */
/* non-exclusive license for use of this work by or on behalf */
/* of the U.S. Government. Export of this program may require */
/* a license from the United States Government. */
/*--------------------------------------------------------------------*/
#include <fei_macros.hpp>
#include <fei_ArrayUtils.hpp>
/**
The NodeDescriptor class holds the information that the FEI implementation
needs to know about the nodes in the finite element problem:
Global node identifier
number of nodal degrees-of-freedom
list of associated field identifiers, with their (global) equation numbers
(global) blk-eqn number
which processor is this node's owner
list of (local) blocks that contain this node
Note: 'block' is used in two contexts here. There are element-blocks, and
there are block-equations. Element-blocks refer to the blocks of elements
in the finite-element problem, with all elements in a block containing the
same number of solution fields per node, etc. Block-equations refer to the
small dense sub-blocks of a block-entry sparse matrix. Each node is
associated with a number of element-blocks, and each node has exactly one
associated global 0-based block-equation number.
*/
class NodeDescriptor {
public:
NodeDescriptor();
NodeDescriptor(const NodeDescriptor& src)
: nodeID_(src.nodeID_), nodeNumber_(src.nodeNumber_),
numNodalDOF_(0), fieldIDList_(NULL),
fieldEqnNumbers_(NULL), numFields_(0), blkEqnNumber_(0),
ownerProc_(src.ownerProc_), blockList_(NULL), numBlocks_(0)
{}
virtual ~NodeDescriptor();
GlobalID getGlobalNodeID() const {return(nodeID_);};
void setGlobalNodeID(GlobalID node) {nodeID_ = node;};
int getNodeNumber() const {return(nodeNumber_);};
void setNodeNumber(int nn) {nodeNumber_ = nn;};
int getBlkEqnNumber() const {return(blkEqnNumber_);}
void setBlkEqnNumber(int blkEqn) {blkEqnNumber_ = blkEqn;}
int getNumNodalDOF() const {return(numNodalDOF_);};
void setNumNodalDOF(int dof) {numNodalDOF_ = dof;};
void addField(int fieldID);
void setFieldEqnNumber(int fieldID, int eqn);
int getNumFields() const {return(numFields_);};
const int* getFieldIDList() const {return(fieldIDList_);};
const int* getFieldEqnNumbers() const {return(fieldEqnNumbers_);};
/** Given a fieldID, return the first equation number associated with that
field at this node.
@param fieldID
@param eqnNumber
@return false if fieldID is not present at this node
*/
bool getFieldEqnNumber(int fieldID, int& eqnNumber) const;
/** Given an equation-number, get the associated fieldID and offset-into-field.
throws an exception if the equation-number is not associated with this node.
*/
void getFieldID(int eqnNumber, int& fieldID, int& offset_into_field) const;
bool operator==(const NodeDescriptor& nd) const
{ return( nodeID_ == nd.nodeID_ ); }
bool operator!=(const NodeDescriptor& nd) const
{ return( nodeID_ != nd.nodeID_ ); }
bool operator<(const NodeDescriptor& nd) const
{ return( nodeID_ < nd.nodeID_ ); }
bool operator>(const NodeDescriptor& nd) const
{ return( nodeID_ > nd.nodeID_ ); }
int getOwnerProc() const {return(ownerProc_);};
void setOwnerProc(int proc) {ownerProc_ = proc;};
void addBlock(GlobalID blk)
{
int allocLen = numBlocks_;
fei::sortedListInsert(blk, blockList_, numBlocks_, allocLen);
}
int getNumBlocks() const {return(numBlocks_);};
const GlobalID* getBlockList() const {return(blockList_);};
bool containedInBlock(GlobalID blk) const;
private:
NodeDescriptor& operator=(const NodeDescriptor& src);
void allocFieldLists();
void allocBlockList();
GlobalID nodeID_;
int nodeNumber_;
int numNodalDOF_; //total number of nodal degrees-of-freedom
int* fieldIDList_; //list of field identifiers
int* fieldEqnNumbers_; //list of starting (global) equation numbers.
//fields can consist of more than one scalar (and
//have more than one associated equation), this
//is the first equation number
int numFields_;
int blkEqnNumber_;
int ownerProc_; //processor that owns the equations for this node
GlobalID* blockList_; //blocks that contain this node
int numBlocks_;
};
#endif
|