/// 5,1 and 7,3 are an edges.
///////////////////////////////////////////////////////////////////////////////
SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
- const SMDS_MeshNode * node1,
- const SMDS_MeshNode * node2,
- const SMDS_MeshNode * node3,
- const SMDS_MeshNode * node4,
- const SMDS_MeshNode * node5,
- const SMDS_MeshNode * node6,
- const SMDS_MeshNode * node7,
- const SMDS_MeshNode * node8)
+ const SMDS_MeshNode * node1,
+ const SMDS_MeshNode * node2,
+ const SMDS_MeshNode * node3,
+ const SMDS_MeshNode * node4,
+ const SMDS_MeshNode * node5,
+ const SMDS_MeshNode * node6,
+ const SMDS_MeshNode * node7,
+ const SMDS_MeshNode * node8)
{
- myNbNodes = 8;
- myNodes = new const SMDS_MeshNode* [myNbNodes];
- myNodes[0]=node1;
- myNodes[1]=node2;
- myNodes[2]=node3;
- myNodes[3]=node4;
- myNodes[4]=node5;
- myNodes[5]=node6;
- myNodes[6]=node7;
- myNodes[7]=node8;
+ myNbNodes = 8;
+ myNodes = new const SMDS_MeshNode* [myNbNodes];
+ myNodes[0]=node1;
+ myNodes[1]=node2;
+ myNodes[2]=node3;
+ myNodes[3]=node4;
+ myNodes[4]=node5;
+ myNodes[5]=node6;
+ myNodes[6]=node7;
+ myNodes[7]=node8;
}
SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
- const SMDS_MeshNode * node1,
- const SMDS_MeshNode * node2,
- const SMDS_MeshNode * node3,
- const SMDS_MeshNode * node4)
+ const SMDS_MeshNode * node1,
+ const SMDS_MeshNode * node2,
+ const SMDS_MeshNode * node3,
+ const SMDS_MeshNode * node4)
{
- myNbNodes = 4;
- myNodes = new const SMDS_MeshNode* [myNbNodes];
- myNodes[0]=node1;
- myNodes[1]=node2;
- myNodes[2]=node3;
- myNodes[3]=node4;
+ myNbNodes = 4;
+ myNodes = new const SMDS_MeshNode* [myNbNodes];
+ myNodes[0]=node1;
+ myNodes[1]=node2;
+ myNodes[2]=node3;
+ myNodes[3]=node4;
}
SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
- const SMDS_MeshNode * node1,
- const SMDS_MeshNode * node2,
- const SMDS_MeshNode * node3,
- const SMDS_MeshNode * node4,
- const SMDS_MeshNode * node5)
+ const SMDS_MeshNode * node1,
+ const SMDS_MeshNode * node2,
+ const SMDS_MeshNode * node3,
+ const SMDS_MeshNode * node4,
+ const SMDS_MeshNode * node5)
{
- myNbNodes = 5;
- myNodes = new const SMDS_MeshNode* [myNbNodes];
- myNodes[0]=node1;
- myNodes[1]=node2;
- myNodes[2]=node3;
- myNodes[3]=node4;
- myNodes[4]=node5;
+ myNbNodes = 5;
+ myNodes = new const SMDS_MeshNode* [myNbNodes];
+ myNodes[0]=node1;
+ myNodes[1]=node2;
+ myNodes[2]=node3;
+ myNodes[3]=node4;
+ myNodes[4]=node5;
}
SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
- const SMDS_MeshNode * node1,
- const SMDS_MeshNode * node2,
- const SMDS_MeshNode * node3,
- const SMDS_MeshNode * node4,
- const SMDS_MeshNode * node5,
- const SMDS_MeshNode * node6)
+ const SMDS_MeshNode * node1,
+ const SMDS_MeshNode * node2,
+ const SMDS_MeshNode * node3,
+ const SMDS_MeshNode * node4,
+ const SMDS_MeshNode * node5,
+ const SMDS_MeshNode * node6)
{
- myNbNodes = 6;
- myNodes = new const SMDS_MeshNode* [myNbNodes];
- myNodes[0]=node1;
- myNodes[1]=node2;
- myNodes[2]=node3;
- myNodes[3]=node4;
- myNodes[4]=node5;
- myNodes[5]=node6;
+ myNbNodes = 6;
+ myNodes = new const SMDS_MeshNode* [myNbNodes];
+ myNodes[0]=node1;
+ myNodes[1]=node2;
+ myNodes[2]=node3;
+ myNodes[3]=node4;
+ myNodes[4]=node5;
+ myNodes[5]=node6;
}
bool SMDS_VolumeOfNodes::ChangeNodes(const SMDS_MeshNode* nodes[],
void SMDS_VolumeOfNodes::Print(ostream & OS) const
{
- OS << "volume <" << GetID() << "> : ";
- int i;
- for (i = 0; i < NbNodes()-1; ++i) OS << myNodes[i] << ",";
- OS << myNodes[NbNodes()-1]<< ") " << endl;
+ OS << "volume <" << GetID() << "> : ";
+ int i;
+ for (i = 0; i < NbNodes()-1; ++i) OS << myNodes[i] << ",";
+ OS << myNodes[NbNodes()-1]<< ") " << endl;
}
int SMDS_VolumeOfNodes::NbFaces() const
{
- switch(NbNodes())
- {
- case 4: return 4;
- case 5: return 5;
- case 6: return 5;
- case 8: return 6;
- default: MESSAGE("invalid number of nodes");
- }
+ switch(NbNodes())
+ {
+ case 4: return 4;
+ case 5: return 5;
+ case 6: return 5;
+ case 8: return 6;
+ default: MESSAGE("invalid number of nodes");
+ }
return 0;
}
int SMDS_VolumeOfNodes::NbNodes() const
{
- return myNbNodes;
+ return myNbNodes;
}
int SMDS_VolumeOfNodes::NbEdges() const
{
- switch(NbNodes())
- {
- case 4: return 6;
- case 5: return 8;
- case 6: return 9;
- case 8: return 12;
- default: MESSAGE("invalid number of nodes");
- }
+ switch(NbNodes())
+ {
+ case 4: return 6;
+ case 5: return 8;
+ case 6: return 9;
+ case 8: return 12;
+ default: MESSAGE("invalid number of nodes");
+ }
return 0;
}
SMDSAbs_ElementType SMDS_VolumeOfNodes::GetType() const
{
- return SMDSAbs_Volume;
+ return SMDSAbs_Volume;
}
/*!