|
FEDEM Model Database
R8.0
Source code of the FEDEM model database
|
Container class for finite element models. More...
#include <FFlLinkHandler.H>

Public Types | |
| enum | Types { FFL_ALL = FFlTypeInfoSpec::OTHER_ELM+1 , FFL_FEM = FFlTypeInfoSpec::OTHER_ELM+2 , FFL_STRC = FFlTypeInfoSpec::STRC_ELM } |
| Enumerator for getting counts of different element cathegories. More... | |
| using | Strings = std::vector< std::string > |
Public Member Functions | |
| FFlLinkHandler (size_t maxNodes=0, size_t maxElms=0) | |
| Default constructor. More... | |
| FFlLinkHandler (const FFlLinkHandler &otherLink) | |
| Copy constructor. More... | |
| FFlLinkHandler (const FFlGroup &fromGroup) | |
| Constructor for extracting a sub-model from an element group. More... | |
| ~FFlLinkHandler () | |
| The destructor deletes all heap-allocated members. More... | |
| FFlLinkHandler & | operator= (const FFlLinkHandler &)=delete |
| Deleted assignement operator. More... | |
| bool | addElement (FFlElementBase *anElem, bool sortOnInsert=false) |
| bool | addNode (FFlNode *aNode, bool sortOnInsert=false) |
| bool | addGroup (FFlGroup *group, bool silence=false) |
| void | addLoad (FFlLoadBase *load, bool sortOnInsert=false) |
| bool | addAttribute (FFlAttributeBase *attr, bool silence=false) |
| bool | addAttribute (FFlAttributeBase *attr, bool silence, const std::string &name) |
| int | addUniqueAttribute (FFlAttributeBase *attr, bool silence=false) |
| int | addUniqueAttributeCS (FFlAttributeBase *&attr) |
| bool | removeAttribute (const std::string &name, int ID, bool silence=false) |
| int | sortElementsAndNodes (bool deleteDuplicates=false) const |
| Sorts elements and nodes in the order of increasing external IDs.:1. More... | |
| const ElmTypeCount & | getElmTypeCount () const |
| Returns the number of elements of each type. More... | |
| int | getElementCount (const std::string &type) const |
| Returns the number of elements of the given type. More... | |
| int | getElementCount (int types=FFL_ALL, bool checkCF=false) const |
| Returns the number of elements of the given types. More... | |
| int | getNodeCount (int types=FFL_ALL) const |
| Returns the number of nodes of given types. More... | |
| int | getDofCount (bool includeExternalDofs=true) const |
| Returns the total number of DOFs in the FE model. More... | |
| int | getAttributeCount (const std::string &type) const |
| Returns the number of attributes of the given type. More... | |
| int | buildFiniteElementVec (bool allFElements=true) const |
| Builds the myFElements vector. More... | |
| FFlElementBase * | getElement (int ID, bool internalID=false) const |
| Returns the element with the given ID, or NULL if not found. More... | |
| FFlElementBase * | getFiniteElement (int iel) const |
| Returns the element with the given internal element number. More... | |
| FFlNode * | getNode (int ID) const |
| Returns the node with the given ID, or NULL if not found. More... | |
| FFlNode * | getFENode (int inod) const |
| Returns the FE node wit the given ID, or NULL if not found. More... | |
| FFlGroup * | getGroup (int ID) const |
| Returns the element group with given ID, or NULL if not found. More... | |
| FFlAttributeBase * | getAttribute (const std::string &type, int ID) const |
| Returns the attribute of the given type and ID, or NULL if not found. More... | |
| size_t | getRefNodes (NodesVec &refNodes, NodesVec &mstNodes) const |
| finds all free reference nodes in the model. More... | |
| bool | getLoads (int ID, LoadsVec &loads) const |
| Returns all loads with the given ID. More... | |
| void | getLoadCases (std::set< int > &IDs) const |
| Returns a set of the external load IDs. More... | |
| int | getIntNodeID (int extID) const |
| External-to-internal node number mapping. More... | |
| int | getIntElementID (int extID) const |
| External-to-internal (finite) element number mapping. More... | |
| void | removeElements (const ElementsVec &elms) |
| Removes the given elements from the myElements container. More... | |
| int | getNewElmID () const |
| int | getNewNodeID () const |
| int | getNewGroupID () const |
| int | getNewAttribID (const std::string &type) const |
| ElementsCIter | elementsBegin () const |
| ElementsCIter | fElementsBegin () const |
| NodesCIter | nodesBegin () const |
| GroupCIter | groupsBegin () const |
| LoadsCIter | loadsBegin () const |
| AttributeTypeCIter | attributeTypesBegin () const |
| ElementsCIter | elementsEnd () const |
| ElementsCIter | fElementsEnd () const |
| NodesCIter | nodesEnd () const |
| GroupCIter | groupsEnd () const |
| LoadsCIter | loadsEnd () const |
| AttributeTypeCIter | attributeTypesEnd () const |
| const AttributeMap & | getAttributes (const std::string &name) const |
| Returns the set of all attributes of the given type. More... | |
| void | getAllInternalCoordSys (std::vector< FaMat34 > &mxes) const |
| Returns transformation matrices of all internal coordinate systems. More... | |
| bool | getExtents (FaVec3 &max, FaVec3 &min) const |
| double | getMeanElementSize () const |
| void | getMassProperties (double &M, FaVec3 &Xcg, FFaTensor3 &I) const |
| Computes the mass properties of the FE model. More... | |
| int | findNode (FaVec3 &nodePos, const FaMat34 *Tlg=NULL) const |
| Returns the id of the node that is closest to nodePos. More... | |
| FFlNode * | findFreeNodeAtPoint (const FaVec3 &point, double tol, int dofFilter=-1) const |
| Searches for a FE node that matches a given point. More... | |
| FFlNode * | findClosestNode (const FaVec3 &point) const |
| Returns the node that is closest to the given point. More... | |
| FFlNode * | createAttachableNode (FFlNode *fromNode, const FaVec3 &nodePos, FFlConnectorItems *cItems=NULL, double Ktra=0.0, double Krot=0.0, double Mass=0.0) |
| Creates a new node that can be an external node. More... | |
| FFlElementBase * | findClosestElement (const FaVec3 &point, const CathegoryVec &wantedTypes) const |
| Returns an element with its center closest to the given point. More... | |
| FFlElementBase * | findClosestElement (const FaVec3 &point, const FFlGroup &group) const |
| Returns the closest element within a sepcified group. More... | |
| FFlElementBase * | findClosestElement (const FaVec3 &point, FFlGroup *group=NULL) const |
| Convenience method to search for the closest element. More... | |
| FFlElementBase * | findPoint (const FFlGroup &group, const FaVec3 &point, double *xi) const |
| FFlElementBase * | findPoint (const FaVec3 &point, double *xi, int groupID=0) const |
| FFlNode * | getNodeConnectivity (int ID, Strings &elmList) const |
| Returns the list of elements connected to the specified node ID. More... | |
| bool | makeStrainCoat (FFlFaceGenerator *geometry, FFlNamedPartBase *group=NULL) |
| bool | assignFatigueProperty (int stdIndx, int curveIndx, double sCF, FFlNamedPartBase *group=NULL) |
| void | deleteResults () |
| bool | hasResults () const |
| FFlrFELinkResult * | getResults () |
| void | convertUnits (const FFaUnitCalculator *convCal) |
| bool | resolve (bool subdivParabolic=false, bool fromSESAM=false) |
| bool | verify (bool fixNegElms=false) |
| void | deleteGeometry () |
| bool | hasGeometry () const |
| bool | isTooLarge () const |
| unsigned int | calculateChecksum (int csType=FFl::CS_NOEXTINFO, bool rndOff=true) const |
| Calculates the checksum with contributions from "all" elements. More... | |
| void | calculateChecksum (FFaCheckSum *cs, bool rndOff=true) const |
| Calculates the checksum with contributions from important elements. More... | |
| void | calculateChecksum (FFaCheckSum *cs, int csType, bool rndOff) const |
| Calculates the link checksum. More... | |
| void | initiateCalculationFlag (bool status=false) |
| bool | updateCalculationFlag (int groupId, bool status=true) |
| bool | updateCalculationFlag (FFlPartBase *part, bool status=true) |
| bool | updateCalculationFlag (const std::string &attType, int id, bool status=true) |
| void | addComponentModes (int nGen) |
| void | addOP2file (const std::string &fname) |
| void | clearOP2files () |
| const Strings & | getOP2files () const |
| size_t | getNumberOfGenDofs () const |
| void | dump (const std::string &heading="") const |
Static Public Member Functions | |
| static bool | isStrainCoat (FFlElementBase *elm) |
Protected Types | |
| using | NodesIter = NodesVec::const_iterator |
| using | ElementsIter = ElementsVec::const_iterator |
Protected Member Functions | |
| NodesIter | getNodeIter (int ID) const |
| ElementsIter | getElementIter (int ID) const |
| void | countElements () const |
| Counts the number of elements of each type. More... | |
| bool | areBUSHconnected (FFlNode *n1, FFlNode *n2) const |
| Checks if the two nodes are connected via a BUSH element. More... | |
| int | buildBUSHelementSet () const |
| int | splitElement (FFlElementBase *elm) |
| Subdivides a parabolic element into linear elements. More... | |
| int | sortElements (bool deleteDuplicates=false) const |
| int | sortNodes (bool deleteDuplicates=false) const |
| void | sortLoads () const |
Protected Attributes | |
| bool | tooLarge |
| Set by addNode() and addElement() More... | |
| size_t | nodeLimit |
| Max number of nodes allowed. More... | |
| size_t | elmLimit |
| Max number of elements allowed. More... | |
| ElementsVec | myElements |
| bool | areElementsSorted |
| NodesVec | myNodes |
| bool | areNodesSorted |
| LoadsVec | myLoads |
| bool | areLoadsSorted |
| GroupMap | myGroupMap |
| AttributeTypeMap | myAttributes |
| std::map< unsigned int, FFlAttributeBase * > | uniqueAtts |
| std::map< FFlNode *, ElementsSet > | myNodeMapping |
| bool | isResolved |
| Flag to avoid resolving the topology more than once. More... | |
| bool | hasLooseNodes |
| If true, the FE model contains unconnected nodes. More... | |
| std::map< int, int > | ext2intNode |
| External-to-internal node number mapping. More... | |
| NodesVec | myFEnodes |
| Vector or pointers to the Finite Element nodes only. More... | |
| ElmTypeCount | myNumElements |
| Map of element type name to the number of elements of that type. More... | |
| ElementsVec | myFElements |
| Vector of pointers to the Finite Elements only. More... | |
| ElementsSet | myBushElements |
| Vector of pointers to all BUSH elements in the model. More... | |
| Strings | myOP2files |
| List of files with externally reduced matrices for this model. More... | |
| size_t | nGenDofs |
| Number of component modes, as read from Nastran bulk data file. More... | |
| FFaCheckSum * | myChkSum |
| FFlFEResultBase * | myResults |
| FFaProfiler * | myProfiler |
Container class for finite element models.
This class holds the data representing a finite element (FE) part in a FEDEM model, and associated methods for accessing and manipulating it.
|
protected |
|
protected |
| using FFlLinkHandler::Strings = std::vector<std::string> |
| FFlLinkHandler::FFlLinkHandler | ( | size_t | maxNodes = 0, |
| size_t | maxElms = 0 |
||
| ) |
Default constructor.
| FFlLinkHandler::FFlLinkHandler | ( | const FFlLinkHandler & | otherLink | ) |
Copy constructor.
| FFlLinkHandler::FFlLinkHandler | ( | const FFlGroup & | fromGroup | ) |
Constructor for extracting a sub-model from an element group.
| FFlLinkHandler::~FFlLinkHandler | ( | ) |
The destructor deletes all heap-allocated members.
| bool FFlLinkHandler::addAttribute | ( | FFlAttributeBase * | attr, |
| bool | silence, | ||
| const std::string & | name | ||
| ) |
| bool FFlLinkHandler::addAttribute | ( | FFlAttributeBase * | attr, |
| bool | silence = false |
||
| ) |
|
inline |
| bool FFlLinkHandler::addElement | ( | FFlElementBase * | anElem, |
| bool | sortOnInsert = false |
||
| ) |
| bool FFlLinkHandler::addGroup | ( | FFlGroup * | group, |
| bool | silence = false |
||
| ) |
| void FFlLinkHandler::addLoad | ( | FFlLoadBase * | load, |
| bool | sortOnInsert = false |
||
| ) |
| bool FFlLinkHandler::addNode | ( | FFlNode * | aNode, |
| bool | sortOnInsert = false |
||
| ) |
|
inline |
| int FFlLinkHandler::addUniqueAttribute | ( | FFlAttributeBase * | attr, |
| bool | silence = false |
||
| ) |
| int FFlLinkHandler::addUniqueAttributeCS | ( | FFlAttributeBase *& | attr | ) |
Checks if the two nodes are connected via a BUSH element.
| bool FFlLinkHandler::assignFatigueProperty | ( | int | stdIndx, |
| int | curveIndx, | ||
| double | sCF, | ||
| FFlNamedPartBase * | group = NULL |
||
| ) |
|
inline |
|
inline |
|
protected |
| int FFlLinkHandler::buildFiniteElementVec | ( | bool | allFElements = true | ) | const |
Builds the myFElements vector.
This methods finds all elements that contribute to the stiffness matrix. Note that this method must not be invoked before resolve() is called, or else we'll get a crash (core dump).
| void FFlLinkHandler::calculateChecksum | ( | FFaCheckSum * | cs, |
| bool | rndOff = true |
||
| ) | const |
Calculates the checksum with contributions from important elements.
The "important" entries include node, element, load and attribute data. Group and visualization data are not included here.
| void FFlLinkHandler::calculateChecksum | ( | FFaCheckSum * | cs, |
| int | csType, | ||
| bool | rndOff | ||
| ) | const |
Calculates the link checksum.
| unsigned int FFlLinkHandler::calculateChecksum | ( | int | csType = FFl::CS_NOEXTINFO, |
| bool | rndOff = true |
||
| ) | const |
Calculates the checksum with contributions from "all" elements.
|
inline |
| void FFlLinkHandler::convertUnits | ( | const FFaUnitCalculator * | convCal | ) |
|
protected |
Counts the number of elements of each type.
| FFlNode * FFlLinkHandler::createAttachableNode | ( | FFlNode * | fromNode, |
| const FaVec3 & | nodePos, | ||
| FFlConnectorItems * | cItems = NULL, |
||
| double | Ktra = 0.0, |
||
| double | Krot = 0.0, |
||
| double | Mass = 0.0 |
||
| ) |
Creates a new node that can be an external node.
This method creates a new node at nodePos, a BUSH element between fromNode and the new node, and a CMASS element at fromNode. The new node is returned. The elements are created without properties - only topology, unless Ktra, Krot, or Mass are non-zero.
| void FFlLinkHandler::deleteGeometry | ( | ) |
| void FFlLinkHandler::deleteResults | ( | ) |
| void FFlLinkHandler::dump | ( | const std::string & | heading = "" | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
| FFlElementBase * FFlLinkHandler::findClosestElement | ( | const FaVec3 & | point, |
| const CathegoryVec & | wantedTypes | ||
| ) | const |
Returns an element with its center closest to the given point.
This method returns the element within the cathegories wantedTypes that has its node center closest to the given point. If wantedTypes is empty, any element is accepted.
| FFlElementBase * FFlLinkHandler::findClosestElement | ( | const FaVec3 & | point, |
| const FFlGroup & | group | ||
| ) | const |
Returns the closest element within a sepcified group.
This method returns the element within a specified group that has its node center closest to the given point.
| FFlElementBase * FFlLinkHandler::findClosestElement | ( | const FaVec3 & | point, |
| FFlGroup * | group = NULL |
||
| ) | const |
Convenience method to search for the closest element.
Returns the node that is closest to the given point.
| FFlNode * FFlLinkHandler::findFreeNodeAtPoint | ( | const FaVec3 & | point, |
| double | tol, | ||
| int | dofFilter = -1 |
||
| ) | const |
Searches for a FE node that matches a given point.
This method finds the node with (at least) the given number of DOFs (dofFilter), that matches the specified point. If more than one node match the point, return the node among these that is either a free node or a WAVGM reference node. If more than one such match exist, return the closest node among them.
Returns the id of the node that is closest to nodePos.
The actual coordinates for the node is returned by updating nodePos.
| FFlElementBase * FFlLinkHandler::findPoint | ( | const FaVec3 & | point, |
| double * | xi, | ||
| int | groupID = 0 |
||
| ) | const |
| FFlElementBase * FFlLinkHandler::findPoint | ( | const FFlGroup & | group, |
| const FaVec3 & | point, | ||
| double * | xi | ||
| ) | const |
| void FFlLinkHandler::getAllInternalCoordSys | ( | std::vector< FaMat34 > & | mxes | ) | const |
Returns transformation matrices of all internal coordinate systems.
| FFlAttributeBase * FFlLinkHandler::getAttribute | ( | const std::string & | type, |
| int | ID | ||
| ) | const |
Returns the attribute of the given type and ID, or NULL if not found.
| int FFlLinkHandler::getAttributeCount | ( | const std::string & | type | ) | const |
Returns the number of attributes of the given type.
| const AttributeMap & FFlLinkHandler::getAttributes | ( | const std::string & | name | ) | const |
Returns the set of all attributes of the given type.
| int FFlLinkHandler::getDofCount | ( | bool | includeExternalDofs = true | ) | const |
Returns the total number of DOFs in the FE model.
Unless includeExternalDofs is true, only the internal dofs are counted.
| FFlElementBase * FFlLinkHandler::getElement | ( | int | ID, |
| bool | internalID = false |
||
| ) | const |
Returns the element with the given ID, or NULL if not found.
| int FFlLinkHandler::getElementCount | ( | const std::string & | type | ) | const |
Returns the number of elements of the given type.
| int FFlLinkHandler::getElementCount | ( | int | types = FFL_ALL, |
| bool | checkCF = false |
||
| ) | const |
Returns the number of elements of the given types.
If checkCF is true, only the elements for which the calculation flag is set are counted.
|
protected |
| const ElmTypeCount & FFlLinkHandler::getElmTypeCount | ( | ) | const |
Returns the number of elements of each type.
| FFlNode * FFlLinkHandler::getFENode | ( | int | inod | ) | const |
Returns the FE node wit the given ID, or NULL if not found.
| FFlElementBase * FFlLinkHandler::getFiniteElement | ( | int | iel | ) | const |
Returns the element with the given internal element number.
This method returns a finite element only. Strain coat elements and other DOF-less elements are excluded. Returns NULL if no finite element with the given index.
| FFlGroup * FFlLinkHandler::getGroup | ( | int | ID | ) | const |
Returns the element group with given ID, or NULL if not found.
| int FFlLinkHandler::getIntElementID | ( | int | extID | ) | const |
External-to-internal (finite) element number mapping.
| int FFlLinkHandler::getIntNodeID | ( | int | ID | ) | const |
External-to-internal node number mapping.
This method is assumed used by the solvers only (and not by the GUI). Therefore, we don't include any loose external nodes here.
| void FFlLinkHandler::getLoadCases | ( | std::set< int > & | IDs | ) | const |
Returns a set of the external load IDs.
| bool FFlLinkHandler::getLoads | ( | int | ID, |
| LoadsVec & | loads | ||
| ) | const |
Returns all loads with the given ID.
| void FFlLinkHandler::getMassProperties | ( | double & | M, |
| FaVec3 & | Xcg, | ||
| FFaTensor3 & | I | ||
| ) | const |
Computes the mass properties of the FE model.
This method computes the the total mass M, the center of gravity Xcg and the inertia tensor I for the model.
| double FFlLinkHandler::getMeanElementSize | ( | ) | const |
| int FFlLinkHandler::getNewAttribID | ( | const std::string & | type | ) | const |
| int FFlLinkHandler::getNewElmID | ( | ) | const |
| int FFlLinkHandler::getNewGroupID | ( | ) | const |
| int FFlLinkHandler::getNewNodeID | ( | ) | const |
| FFlNode * FFlLinkHandler::getNode | ( | int | ID | ) | const |
Returns the node with the given ID, or NULL if not found.
Returns the list of elements connected to the specified node ID.
| int FFlLinkHandler::getNodeCount | ( | int | types = FFL_ALL | ) | const |
Returns the number of nodes of given types.
Loose nodes, if any, are not counted by this method.
|
protected |
|
inline |
|
inline |
finds all free reference nodes in the model.
| [out] | refNodes | RBE3 (or WAVGM) reference nodes |
| [out] | mstNodes | RBE2 (or RGD) master nodes |
This method finds all spider reference nodes in the FE model, which are not connected to other elements than the spider element itself.
| FFlrFELinkResult* FFlLinkHandler::getResults | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
| void FFlLinkHandler::initiateCalculationFlag | ( | bool | status = false | ) |
|
static |
|
inline |
|
inline |
|
inline |
| bool FFlLinkHandler::makeStrainCoat | ( | FFlFaceGenerator * | geometry, |
| FFlNamedPartBase * | group = NULL |
||
| ) |
|
inline |
|
inline |
|
delete |
Deleted assignement operator.
| bool FFlLinkHandler::removeAttribute | ( | const std::string & | name, |
| int | ID, | ||
| bool | silence = false |
||
| ) |
| void FFlLinkHandler::removeElements | ( | const ElementsVec & | elms | ) |
Removes the given elements from the myElements container.
| bool FFlLinkHandler::resolve | ( | bool | subdivParabolic = false, |
| bool | fromSESAM = false |
||
| ) |
|
protected |
| int FFlLinkHandler::sortElementsAndNodes | ( | bool | deleteDuplicates = false | ) | const |
Sorts elements and nodes in the order of increasing external IDs.:1.
A warning is issued if duplicated elements or nodes are found. If deleteDuplicates is true, the latter duplicated entry is deleted.
|
protected |
|
protected |
|
protected |
Subdivides a parabolic element into linear elements.
This method will subdivide a 3-noded beam into two linear beam elements, and a 6-noded triangle and a 8-noded quadrilateral into four linear equivalents.
| bool FFlLinkHandler::updateCalculationFlag | ( | const std::string & | attType, |
| int | id, | ||
| bool | status = true |
||
| ) |
| bool FFlLinkHandler::updateCalculationFlag | ( | FFlPartBase * | part, |
| bool | status = true |
||
| ) |
| bool FFlLinkHandler::updateCalculationFlag | ( | int | groupId, |
| bool | status = true |
||
| ) |
| bool FFlLinkHandler::verify | ( | bool | fixNegElms = false | ) |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
protected |
Max number of elements allowed.
|
mutableprotected |
External-to-internal node number mapping.
|
protected |
If true, the FE model contains unconnected nodes.
|
protected |
Flag to avoid resolving the topology more than once.
|
protected |
|
mutableprotected |
Vector of pointers to all BUSH elements in the model.
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
Vector of pointers to the Finite Elements only.
|
mutableprotected |
Vector or pointers to the Finite Element nodes only.
|
protected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
Map of element type name to the number of elements of that type.
|
protected |
List of files with externally reduced matrices for this model.
|
protected |
|
protected |
|
protected |
Number of component modes, as read from Nastran bulk data file.
|
protected |
Max number of nodes allowed.
|
protected |
Set by addNode() and addElement()
|
protected |