31 class FFaCompoundGeometry;
33 namespace FF_NAMESPACE {
40 using FFlNode = FF_NAMESPACE::FFlNode;
56 FmPart(
const char* EarthName);
89 bool isFEPart(
bool loadedOnly =
false) const final;
101 double* x = NULL,
double* y = NULL,
double* z = NULL) const;
121 std::
string getTaskName(const
char* fmt = "%d_") const;
130 void getTriads(std::vector<FmTriad*>& toFill,
bool sortOnId =
false)
const;
133 bool setVisDetail(
const std::vector<FmElementGroupProxy*>& groups,
int dType);
138 void getStickers(std::vector<FmSticker*>& toFill)
const override;
168 bool* parabolic = NULL,
int* ndof = NULL,
169 std::string* elmTypeCount = NULL)
const;
183 static std::string
locateFEfile(
const std::string& fileName);
187 bool storeRelativePath =
true,
188 bool autoRefNodeTriads =
false,
189 bool isReloading =
false);
191 bool exportPart(
const std::string& ftlFile,
bool extNodeInfo =
true,
192 bool withCheckSum =
false,
bool noMetaData =
false)
const;
194 bool isSaved(
bool checkFEpartsOnly =
true)
const;
205 #ifdef FT_USE_CONNECTORS
207 double getConnectorTolerance()
const;
209 char isTriadConnectable(
FmTriad* triad)
const;
211 void updateConnectorVisualization();
213 bool createConnector(
const IntVec& nodes,
const FaVec3& refNodePos,
214 FmTriad* triad = NULL,
int spiderType = 0);
216 bool createConnector(
const FFaCompoundGeometry& geometry,
218 FmTriad* triad = NULL,
int spiderType = 0);
220 bool createCylinderConnector(
const FaVec3Vec& cylPoints,
bool useArcOnly,
221 const FaVec3* refNodePos = NULL,
222 bool projectRefNodeToAxis =
false,
223 FmTriad* triad = NULL,
int spiderType = 2);
225 bool createPlaneConnector(
const FaVec3Vec& planePoints,
226 const FaVec3* refNodePos = NULL,
227 bool projectRefNodeToPlane =
false,
228 FmTriad* triad = NULL,
int spiderType = 2);
230 bool createLineConnector(
const FaVec3Vec& linePoints,
231 const FaVec3* refNodePos = NULL,
232 bool projectRefNodeToAxis =
false,
233 FmTriad* triad = NULL,
int spiderType = 2);
260 bool syncRSD(
bool askForMissingFiles =
false);
267 std::string
getAbsFilePath(
bool createDir =
false)
const override;
282 static bool readAndConnect(std::istream& is, std::ostream& os = std::cout);
285 std::ostream&
writeFMF(std::ostream& os = std::cout)
override;
#define FFaEnumEntryEnd
Defines the end of an enum mapping definition.
Definition: FFaEnum.H:237
#define FFaEnumEntry(Value, Text)
Adds one entry to the current enum mapping definition.
Definition: FFaEnum.H:234
std::vector< std::string > Strings
Convenience type alias.
Definition: FFaFieldBase.H:20
std::vector< int > IntVec
Convenience type alias.
Definition: FFaField.H:25
std::vector< double > DoubleVec
Convenience type alias.
Definition: FFaField.H:23
Classes representing lists of guarded pointers.
2nd order symmetric tensors in 3D space.
std::vector< FaVec3 > FaVec3Vec
Convenience type alias.
Definition: FmPart.H:43
Class representing an object location in 3D space. This class is used to hold data describing the loc...
Definition: FFa3DLocation.H:34
Class for holding and calculation of checksum value of objects.
Definition: FFaCheckSum.H:30
bool isDefault() const final
Returns true, if the field value equals its default value.
Definition: FFaField.H:92
bool setValue(const ValueT &newData, bool checkChanged=true)
Assigns a new value to the field.
Definition: FFaField.H:66
bool isPrintable() const override
Returns true, if this field should be printed.
Definition: FFaField.H:94
const ValueT & getValue() const
Returns a const reference to myData.
Definition: FFaField.H:56
Class holding a set of unit conversions for physical properties.
Definition: FFaUnitCalculator.H:28
Storage of spider connector properties for Triads.
Definition: FFlConnectorItems.H:20
Container class for finite element models.
Definition: FFlLinkHandler.H:95
FE node class. Stores node position and additional data for the node.
Definition: FFlNode.H:39
Class for point transformations in 3D space.
Definition: FFaMat33.H:27
Class for positions in 3D space.
Definition: FFaMat34.H:32
Class for point vectors in 3D space.
Definition: FFaVec3.H:40
Base parent class for the model data structure entries.
Definition: FmBase.H:37
Definition: FmElementGroupProxy.H:24
Definition: FmIsPositionedBase.H:31
static bool locateOriginalFEfile(std::string &fileName, bool &useUnitCalc)
Private method searching for the original FE file of a part.
Definition: FmPart.C:1297
bool isMeshable() const
Definition: FmPart.C:1737
bool writeToVTF(VTFAFile &vtfFile, IntVec *outputOrder, IntVec *fstOrdNodes) override
Writes the FE data of this part to the specified vtfFile.
Definition: FmPart.C:2010
bool useFEModelAsVisualization() const
Returns true if the part's FE model is used for visualization.
Definition: FmPart.C:443
std::string getTaskName(const char *fmt="%d_") const
Definition: FmPart.C:604
FFaReference< FmIsPositionedBase > myCGRotRef
Definition: FmPart.H:493
FFaField< MassCalculationEnum > myCalculateMass
Definition: FmPart.H:382
FmPart(const FaVec3 &globalPos=FaVec3())
Default constructor.
Definition: FmPart.C:87
double getMass() const final
Returns the total mass of this link.
Definition: FmPart.H:149
FFlNode * getClosestNode(const FaVec3 &point) const
Definition: FmPart.C:1014
bool createFEData(bool parabolic)
Generates a tetrahedron mesh from CAD data, if any.
Definition: FmPart.C:1746
FFaField< int > minSize
Definition: FmPart.H:356
bool getBBox(FaVec3 &max, FaVec3 &min) const final
Calculates the bounding box of this link.
Definition: FmPart.C:1038
FFaField< bool > useExternalResFile
Definition: FmPart.H:469
bool hasLoads() const
Checks if this part has any distributed loads.
Definition: FmPart.C:2378
void initAfterResolve() override
Hook for initialisation after resolving cross references.
Definition: FmPart.C:1235
bool isSuppressed() const final
Returns true if this link is suppressed.
Definition: FmPart.H:86
FFaNoPrintField< unsigned long > savedCS
The last saved checksum value.
Definition: FmPart.H:488
FFaEnumMapping(FloatPrecision)
Definition: FmPart.H:429
void updateLoadCases()
Updates the load case data from the FE part data object.
Definition: FmPart.C:2334
FFaEnumMapping(CentripOption)
Definition: FmPart.H:448
FaMat34 getTransform() const
Definition: FmPart.C:461
bool setVisDetail(const std::vector< FmElementGroupProxy * > &groups, int dType)
Definition: FmPart.C:564
FFaField< double > mass
Total mass.
Definition: FmPart.H:368
FFaField< std::string > originalFEFile
Full name of imported file.
Definition: FmPart.H:318
FFaField< int > nGenModes
Definition: FmPart.H:417
bool isFELoaded(bool fullOnly=false) const
Returns true if the part's FE model currently is loaded.
Definition: FmPart.C:431
InertiaRef
Definition: FmPart.H:386
@ POS_CG_ROT_CS
Definition: FmPart.H:387
@ POS_CG_ROT_CG
Definition: FmPart.H:388
void getTriads(std::vector< FmTriad * > &toFill, bool sortOnId=false) const
Returns all triads attached to this link.
Definition: FmPart.C:655
bool isAttachable() const final
Returns true if external node status changes are allowed.
Definition: FmPart.C:454
FFaField< std::string > baseFTLFile
The part file basename actually used.
Definition: FmPart.H:323
FFaField< CentripOptionEnum > myCentripOption
Definition: FmPart.H:453
bool setCGPosRef(FmIsPositionedBase *ref)
Definition: FmPart.C:2791
FFaField< bool > factorizeMassMxEigSol
Definition: FmPart.H:422
bool openFEData()
Reads the FE data from a file already in the part DB.
Definition: FmPart.C:1601
ReposType usesRepository() const
Checks if the part data files are saved in an external repository.
Definition: FmPart.C:322
void forceSave()
Definition: FmPart.H:239
const FFa3DLocation & getLocationCG() const
Definition: FmPart.H:145
static bool readAndConnect(std::istream &is, std::ostream &os=std::cout)
Creates a new part object by reading data from a stream.
Definition: FmPart.C:1217
std::pair< FmTriad *, bool > getExistingTriad(const FmTriad *triad) final
Returns a triad co-located with another triad, if any.
Definition: FmPart.C:847
FmIsPositionedBase * getCGRotRef() const
Definition: FmPart.H:144
FFaField< std::string > FMatFile
Definition: FmPart.H:313
void getFreeJointEnds(std::vector< FmTriad * > &toFill) const
Definition: FmPart.C:1020
std::ostream & writeFMF(std::ostream &os=std::cout) override
Writes out this object in the model database file format.
Definition: FmPart.C:1206
FFaField< std::string > reducedFTLFile
Definition: FmPart.H:315
FmPart operator=(const FmPart &)=delete
Deleted assignment operator.
FmTriad * findTriad(int baseID) const
Returns a specified triad attached to this link.
Definition: FmPart.C:643
FFaField< std::string > externalResFileName
Definition: FmPart.H:470
int getNodePos(int nodeNo, double *x=NULL, double *y=NULL, double *z=NULL) const
Definition: FmPart.C:984
FFaField< FFaReferenceBase * > myCGRotRefField
Definition: FmPart.H:494
FmTriad * getTriadAtNode(int nodeNo) const
Returns the triad associated with given FE node, or NULL if none.
Definition: FmPart.C:912
FFlLinkHandler * myFEData
The actual FE model data.
Definition: FmPart.H:485
FFaField< bool > useGenericProperties
ON-OFF toggle.
Definition: FmPart.H:364
const char * getUITypeName() const override
Returns the type name of this object for use in the GUI.
Definition: FmPart.H:287
static std::string locateFEfile(const std::string &fileName)
Definition: FmPart.C:1377
bool isSaved(bool checkFEpartsOnly=true) const
Returns true if the part is saved in its associated repository.
Definition: FmPart.C:407
GenericPartStiffType
Definition: FmPart.H:399
@ NODE_STIFFNESS
Definition: FmPart.H:401
@ DEFAULT_RIGID
Definition: FmPart.H:400
FFaField< bool > useConsistentMassMatrix
Definition: FmPart.H:421
FFaField< FFaReferenceBase * > materialField
Definition: FmPart.H:360
void updateCachedCheckSum()
Definition: FmPart.C:494
bool interactiveErase() override
Hook for class-dependent tasks for interactive deleting an object.
Definition: FmPart.C:3164
bool getCompModesAlpha(DoubleVec &alpha, int type) const
Definition: FmPart.C:1162
FFaNoPrintField< bool > needsCSupdate
To delay checksum calculation.
Definition: FmPart.H:486
FFaField< bool > hasBuoyancy
Definition: FmPart.H:482
FFaField< std::string > BMatFile
Definition: FmPart.H:306
bool isCGedited
If true, the CG has been edited manually.
Definition: FmPart.H:496
FFaField< bool > suppressInSolver
ON-OFF toggle.
Definition: FmPart.H:352
static int checkParts()
Checks the consistency of the part topology.
Definition: FmPart.C:2496
FFaField< std::string > myRepository
Part-specific model data repository.
Definition: FmPart.H:322
int getCompModesFlags(IntVec &BCcodes) const
Definition: FmPart.C:1122
FFaField< std::string > DMatFile
Definition: FmPart.H:312
FFaField< double > tolFactorize
Definition: FmPart.H:437
std::string getBaseFTLName(bool includExt=false) const
Returns the base ftl-file name of this part.
Definition: FmPart.C:392
LockLevel
Definition: FmPart.H:344
@ FM_ALLOW_MODIFICATIONS
Definition: FmPart.H:345
@ FM_DENY_ALL_LINK_MOD
Definition: FmPart.H:347
@ FM_DENY_LINK_USAGE
Definition: FmPart.H:348
@ FM_ALLOW_LINK_EXT_NODE_MOD
Definition: FmPart.H:346
FFaField< int > recoveryDuringSolve
Definition: FmPart.H:467
FFlLinkHandler * getLinkHandler() const
Returns the current FE data model for this part.
Definition: FmPart.H:201
FFaField< double > quality
Definition: FmPart.H:357
void getCheckSum(FFaCheckSum &cs)
Definition: FmPart.C:512
bool isTranslatable() const override
Definition: FmPart.C:2764
FmIsPositionedBase * getCGPosRef() const
Definition: FmPart.H:143
bool hasResults() const
Definition: FmPart.C:558
void setLinkHandler(FFlLinkHandler *data, bool eraseGroupProxies=false)
Assigns a new FE data model to the part.
Definition: FmPart.C:478
FFaField< FFaTensor3 > inertia
Mass inertia about the centre of gravity.
Definition: FmPart.H:369
FmBase * duplicate() const override
Returns a connected copy of this object.
Definition: FmPart.C:2886
FFaField< double > tolEigenval
Definition: FmPart.H:438
bool cloneLocal(FmBase *obj, int depth) override
Clones the data fields of *obj into *this.
Definition: FmPart.C:697
FFaEnumMapping(GenericPartStiffType)
Definition: FmPart.H:404
void setPositionCG(const FaVec3 &CoG, bool edited=false)
Definition: FmPart.C:2852
FFaEnumMapping(InertiaRef)
Definition: FmPart.H:391
FFaField< double > kt
Translational stiffness at each triad.
Definition: FmPart.H:366
FFaReference< FmMaterialProperty > material
Definition: FmPart.H:359
static bool enableNonlinearFE
Definition: FmPart.H:474
bool importPart(const std::string &fileName, const FFaUnitCalculator *conv=NULL, bool storeRelativePath=true, bool autoRefNodeTriads=false, bool isReloading=false)
Imports FE part data from an external source.
Definition: FmPart.C:1405
bool hasStrainCoat() const
Definition: FmPart.C:538
FFaEnumMapping(MassCalculation)
Definition: FmPart.H:377
FFaField< GenericPartStiffTypeEnum > myGenericPartStiffType
Definition: FmPart.H:408
FFaField< std::string > nonlinearDataFileName
Definition: FmPart.H:478
void readyForUpdate(bool useExistingFmx=false)
Clears data related to the FE model before importing a new one.
Definition: FmPart.C:2607
FFaField< bool > ignoreInRecovery
Definition: FmPart.H:468
bool getMeshParams(int *nnod, int *nel=NULL, bool *parabolic=NULL, int *ndof=NULL, std::string *elmTypeCount=NULL) const
Definition: FmPart.C:1841
virtual ~FmPart()
The destructor disconnects the part from the model database.
Definition: FmPart.C:224
FaMat34 getPositionCG(bool globalCS=true) const override
Returns the Center of Gravity position for this part.
Definition: FmPart.C:2827
void updateElemGroupProxies()
Updates element groups to be in sync with the FE model of the part.
Definition: FmPart.C:2270
FFaField< int > numberOfNonlinearSolutions
Definition: FmPart.H:476
void setLocalCS(const FaMat34 &localCS) override
Definition: FmPart.C:251
FFlNode * getNodeAtPoint(const FaVec3 &point, double tolerance, FFlConnectorItems *addItems=NULL, int oldId=-1)
Returns the closest FE node to a given point, or NULL if not found.
Definition: FmPart.C:933
void getElementGroups(std::vector< FmElementGroupProxy * > &groups) const
Definition: FmPart.C:669
FFaField< bool > useNonlinearReduction
Definition: FmPart.H:475
FFaField< InertiaRefEnum > myInertiaRef
Definition: FmPart.H:395
bool renewFEmodel()
Allocates a new FFlLinkHandler object for the storage of FE data.
Definition: FmPart.C:1867
FFaField< RamLevelEnum > ramUsageLevel
Definition: FmPart.H:340
void getStickers(std::vector< FmSticker * > &toFill) const override
Definition: FmPart.C:623
void clearSupelFiles(bool includeFTL=true)
Clears all file paths derived from originalFEFile.
Definition: FmPart.C:2588
FFaField< DoubleVec > myLoadFactors
Definition: FmPart.H:462
int getNodeIDAtPoint(const FaVec3 &point, double tolerance)
Definition: FmPart.C:971
bool mergeGenericParts(FmPart *that)
Definition: FmPart.C:2905
FFaReferenceList< FmEngine > myLoadEngines
Definition: FmPart.H:459
void delayedCheckSumUpdate()
Definition: FmPart.H:237
FFaField< double > kr
Rotational stiffness at each triad.
Definition: FmPart.H:367
bool getNodeConnectivity(int nodeNo, Strings &elements) const
Definition: FmPart.C:1003
FmPart(const FmPart &)=delete
Deleted copy constructor.
FFaField< FFa3DLocation > myCG
Definition: FmPart.H:490
FFaField< std::string > SMatFile
Definition: FmPart.H:310
bool syncRSD(bool askForMissingFiles=false)
Syncronizes the FE part RSD with data found on disk.
Definition: FmPart.C:2661
FFaField< int > nEigvalsCalc
Definition: FmPart.H:418
FFaNoPrintField< int > lockLevel
Definition: FmPart.H:351
bool isGenericPart() const final
Returns true if this link is a generic part.
Definition: FmPart.H:87
FFaField< int > nonLinStates
Definition: FmPart.H:477
int getNumberOfTriads() const
Returns the number of triads attached to this link.
Definition: FmPart.C:635
FFaField< bool > overrideChecksum
Ignore checksum for reducer and solver - only check file presence.
Definition: FmPart.H:415
bool saveFEData(bool forceSave=false)
Definition: FmPart.C:1945
bool isFEPart(bool loadedOnly=false) const final
Returns true if this is a used (and loaded) FE part.
Definition: FmPart.C:419
FFaField< DoubleVec > myLoadDelays
Definition: FmPart.H:461
bool hasStrainRosettes() const
Definition: FmPart.C:525
FFaField< bool > externalSource
Externally reduced FE data?
Definition: FmPart.H:321
char isRotatable() const override
Definition: FmPart.H:160
int fileVersion
Version number of the saved FTL-file.
Definition: FmPart.H:497
FFlNode * getNode(int nodeNo) const
Definition: FmPart.C:978
std::string getAbsFilePath(bool createDir=false) const override
Returns the path to the directory in which the part will be saved.
Definition: FmPart.C:339
FFaField< bool > expandModeShapes
Definition: FmPart.H:419
bool hasChangedFEdata() const
Definition: FmPart.C:519
FloatPrecision
Definition: FmPart.H:424
@ SINGLE_PRECISION
Definition: FmPart.H:425
@ DOUBLE_PRECISION
Definition: FmPart.H:426
bool hasOP2files() const
Definition: FmPart.C:1884
FFaField< FFaReferenceListBase * > myLoadEnginesField
Definition: FmPart.H:460
FFaReference< FmIsPositionedBase > myCGPosRef
Definition: FmPart.H:491
void setLocationCG(const FFa3DLocation &cg)
Definition: FmPart.C:2868
FFaField< FmResultStatusData > myRSD
Definition: FmPart.H:316
FFaField< std::string > LMatFile
Definition: FmPart.H:311
const std::string & setValidBaseFTLFile(unsigned int cs=0)
Assigns a valid filename for storing the FE data of this part.
Definition: FmPart.C:2079
bool setVisualizationFile(const std::string &fileName, bool updateViz=true)
Definition: FmPart.C:1251
ReposType
Definition: FmPart.H:262
@ EXTERNAL_REP
Definition: FmPart.H:262
@ LINK_SPECIFIC
Definition: FmPart.H:262
@ INTERNAL_REP
Definition: FmPart.H:262
bool exportPart(const std::string &ftlFile, bool extNodeInfo=true, bool withCheckSum=false, bool noMetaData=false) const
Writes the FE data of this part to the specified ftlFile.
Definition: FmPart.C:1992
FFaField< std::string > GMatFile
Definition: FmPart.H:308
FFaField< FFaReferenceBase * > myCGPosRefField
Definition: FmPart.H:492
bool isDisabled() const final
Returns true if the FE data of this link is disabled.
Definition: FmPart.C:676
bool attachTriad(FmTriad *attachTr, FmTriad *oldTr, bool isSilent) final
Attaching a triad when having an old triad in the same place.
Definition: FmPart.C:741
FFaField< FFaCheckSum > cachedChecksum
Used when FE model is unloaded.
Definition: FmPart.H:487
FFaField< FFaUnitCalculator > importConverter
Converter to modeling units.
Definition: FmPart.H:319
void setOrientationCG(const FaVec3 &Xaxis, const FaVec3 &XYplane)
Definition: FmPart.C:2879
RamLevel
Definition: FmPart.H:327
@ SURFACE_FE
Definition: FmPart.H:330
@ NOTHING
Definition: FmPart.H:328
@ FULL_FE
Definition: FmPart.H:331
@ REDUCED_VIZ
Definition: FmPart.H:329
FFaField< IntVec > myLoadCases
Definition: FmPart.H:463
bool updateTriadTopologyRefs(bool checkUnloaded=true, char useOutput=3)
Updates triad to FE node connection after (re)loading the FE model.
Definition: FmPart.C:2432
FFaField< bool > condenseOutCoG
Should the CoG DOFs be condensed out?
Definition: FmPart.H:365
MassCalculation
Definition: FmPart.H:371
@ FROM_FEM
Definition: FmPart.H:374
@ FROM_GEOMETRY
Definition: FmPart.H:373
@ EXPLICIT
Definition: FmPart.H:372
void printSolverLoads(FILE *fp) const
Writes distributed load data to the solver input file.
Definition: FmPart.C:2392
DofFilter
Definition: FmPart.H:124
@ ALL_DOFS
Definition: FmPart.H:124
@ THREE_DOFS
Definition: FmPart.H:124
@ SIX_DOFS
Definition: FmPart.H:124
bool setCGRotRef(FmIsPositionedBase *ref)
Definition: FmPart.C:2809
bool copyExternalFiles(const std::string &from, const std::string &to)
Definition: FmPart.C:1925
FFaField< std::string > SAMdataFile
Definition: FmPart.H:314
FFaField< std::string > MMatFile
Definition: FmPart.H:309
bool enforceStrainRosetteRecovery()
Definition: FmPart.C:3179
FFaField< FloatPrecisionEnum > recoveryMatrixSavePrecision
Definition: FmPart.H:433
CentripOption
Definition: FmPart.H:442
@ USE_CENTRIP_CORRECTION
Definition: FmPart.H:444
@ NO_CENTRIP_CORRECTION
Definition: FmPart.H:445
@ MODEL_DEFAULT_CENTRIP_CORRECTION
Definition: FmPart.H:443
std::string getBaseFTLFile(bool createDir=false) const
Returns the full path of the saved FE data file of this part.
Definition: FmPart.C:382
bool convertOP2files(const std::string &filePath)
Definition: FmPart.C:1890
void createElemGroupProxies()
Creates proxy element groups based on the groups in the FE model.
Definition: FmPart.C:2218
void updateMassProperties()
Recalculates the mass properties of the part from its FE model.
Definition: FmPart.C:1047
FFaEnumMapping(RamLevel)
Definition: FmPart.H:334
FFaField< std::string > EMatFile
Definition: FmPart.H:307
virtual bool clone(FmBase *, int)
Copies the fields of another object into *this.
Definition: FmBase.H:109
Definition: FFlVTFWriter.C:21