Element 21 is a simple linear edge

This commit is contained in:
vsv 2006-03-27 10:42:11 +00:00
parent 5f5ee84f19
commit 680f0473ee
2 changed files with 12 additions and 5 deletions

View File

@ -24,6 +24,7 @@
#include "UNV2411_Structure.hxx" #include "UNV2411_Structure.hxx"
#include "UNV2412_Structure.hxx" #include "UNV2412_Structure.hxx"
#include "UNV2417_Structure.hxx"
#include "UNV_Utilities.hxx" #include "UNV_Utilities.hxx"
using namespace std; using namespace std;
@ -65,13 +66,14 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
const TElementLab& aLabel = anIter->first; const TElementLab& aLabel = anIter->first;
const TRecord& aRec = anIter->second; const TRecord& aRec = anIter->second;
if(IsBeam(aRec.fe_descriptor_id)) { if(IsBeam(aRec.fe_descriptor_id)) {
if(aRec.fe_descriptor_id == 11) { if((aRec.fe_descriptor_id == 11) || (aRec.fe_descriptor_id == 21)) {
// edge with two nodes // edge with two nodes
anElement = myMesh->AddEdgeWithID(aRec.node_labels[0], anElement = myMesh->AddEdgeWithID(aRec.node_labels[0],
aRec.node_labels[1], aRec.node_labels[1],
aLabel); aLabel);
} }
else { else {
cout<<"### Id of element = "<<aRec.fe_descriptor_id<<endl;
// quadratic edge (with 3 nodes) // quadratic edge (with 3 nodes)
anElement = myMesh->AddEdgeWithID(aRec.node_labels[0], anElement = myMesh->AddEdgeWithID(aRec.node_labels[0],
aRec.node_labels[1], aRec.node_labels[1],
@ -240,10 +242,15 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
} }
} }
if(!anElement) // if(!anElement)
MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<<aLabel<<" and type = "<<aRec.fe_descriptor_id); // MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<<aLabel<<" and type = "<<aRec.fe_descriptor_id);
} }
} }
{
using namespace UNV2417;
TDataSet aDataSet2417;
UNV2417::Read(in_stream,aDataSet2417);
}
} }
catch(const std::exception& exc){ catch(const std::exception& exc){
INFOS("Follow exception was cought:\n\t"<<exc.what()); INFOS("Follow exception was cought:\n\t"<<exc.what());

View File

@ -143,8 +143,8 @@ void UNV2412::Write(std::ofstream& out_stream, const TDataSet& theDataSet)
bool UNV2412::IsBeam(int theFeDescriptorId){ bool UNV2412::IsBeam(int theFeDescriptorId){
switch (theFeDescriptorId){ switch (theFeDescriptorId){
case 11: // edge with 2 nodes case 11: // edge with 2 nodes
case 21: // edge with 3 nodes (quadratic) case 21:
case 22: case 22: // edge with 3 nodes
case 24: case 24:
case 25: case 25:
return true; return true;