FEDEM Solver  R8.0
Source code of the dynamics solver
Classes | Typedefs | Functions
main.C File Reference

Solution field mapping utility for sub-model analysis. More...

#include "FFrLib/FFrExtractor.H"
#include "FFlLib/FFlInit.H"
#include "FFlLib/FFlLinkHandler.H"
#include "FFlLib/FFlIOAdaptors/FFlReaders.H"
#include "FFlLib/FFlIOAdaptors/FFlFedemWriter.H"
#include "FFlLib/FFlFEParts/FFlShellElementBase.H"
#include "FFlLib/FFlFEParts/FFlNode.H"
#include "FFlLib/FFlElementBase.H"
#include "FFaLib/FFaAlgebra/FFaMath.H"
#include "FFaLib/FFaAlgebra/FFaMat34.H"
#include "FFaLib/FFaCmdLineArg/FFaCmdLineArg.H"
#include "FFaLib/FFaDefinitions/FFaAppInfo.H"
#include "FFaLib/FFaDefinitions/FFaResultDescription.H"
#include "FFaLib/FFaOS/FFaFilePath.H"
#include "FFaLib/FFaOS/FFaTag.H"
#include "Admin/FedemAdmin.H"
#include <fstream>
#include <iomanip>
#include <cstring>
Include dependency graph for main.C:

Classes

struct  Node
 Struct with sub-model nodal data. More...
 

Typedefs

typedef std::map< int, NodeNodeMap
 Convenience type definition. More...
 

Functions

void cmdLineArgInitStd (int argc, char **argv)
 Initializes the command-line parser. More...
 
void readOptionFilesStd (const char *program)
 Reads the command-line options files. More...
 
FFlLinkHandler * readFEModel (const std::string &fileName)
 Reads an FE model from file into a FFlLinkHandler object. More...
 
size_t searchPoints (std::string &ftlFile, FFlLinkHandler *&feModel, std::string &subFile, FFlLinkHandler *&subModel, std::string &nodFile, std::map< int, NodeMap > &nodes, FaMat33 &T_lg)
 Searches for nodal points in a global FE model. More...
 
bool writeMappingFile (std::string &mapFile, unsigned int cs, const std::map< int, NodeMap > &nodes, const FaMat33 &T_lg)
 Writes the nodal mapping container to a binary file. More...
 
size_t readMappingFile (std::string &mapFile, unsigned int &cs, std::map< int, NodeMap > &nodes, FaMat33 &T_lg)
 Reads the nodal mapping results from binary file. More...
 
bool writeSubModel (std::string &subFile, FFlLinkHandler *&model, IntVec &nodes)
 Reads an FE model from file and writes out with external node status. More...
 
int main (int argc, char **argv)
 Main program for the solution field mapping utility. More...
 

Detailed Description

Solution field mapping utility for sub-model analysis.

Typedef Documentation

◆ NodeMap

typedef std::map<int,Node> NodeMap

Convenience type definition.

Function Documentation

◆ cmdLineArgInitStd()

void cmdLineArgInitStd ( int  argc,
char **  argv 
)

Initializes the command-line parser.

Parameters
[in]argcNumber of command-line arguments (including program name)
[in]argvList of command-line arguments

This function also defines some general command-line options that are common for all solver modules.

◆ main()

int main ( int  argc,
char **  argv 
)

Main program for the solution field mapping utility.

Here is the call graph for this function:

◆ readFEModel()

FFlLinkHandler* readFEModel ( const std::string &  fileName)

Reads an FE model from file into a FFlLinkHandler object.

Parameters
[in]fileNameFile containing the FE model
Returns
Pointer to object containing the FE model, or NULL on failure.

◆ readMappingFile()

size_t readMappingFile ( std::string &  mapFile,
unsigned int &  cs,
std::map< int, NodeMap > &  nodes,
FaMat33 T_lg 
)

Reads the nodal mapping results from binary file.

Parameters
mapFileName of file for storage of nodal mapping results
[out]csChecksum of the FE part the nodal mapping belongs to
[out]nodesResulting node-to-element mapping
[out]T_lgLocal to global transformation matrix for sub-model
Returns
Total number of nodes in the nodes container

◆ readOptionFilesStd()

void readOptionFilesStd ( const char *  program)

Reads the command-line options files.

Parameters
[in]programName of the program module

The help text containing all available command-line options may also be printed to console if the -help (or -helpAll) is specified.

◆ searchPoints()

size_t searchPoints ( std::string &  ftlFile,
FFlLinkHandler *&  feModel,
std::string &  subFile,
FFlLinkHandler *&  subModel,
std::string &  nodFile,
std::map< int, NodeMap > &  nodes,
FaMat33 T_lg 
)

Searches for nodal points in a global FE model.

Parameters
ftlFileFile containing the global FE model
subFileFile containing the FE sub-model
nodFileFile containing point coordinates to search for
[out]feModelThe global FE model
[out]subModelThe FE sub-model
[out]nodesResulting node-to-element mapping
[out]T_lgLocal to global transformation matrix for sub-model
Returns
Total number of nodal points to search for, zero if read failure

◆ writeMappingFile()

bool writeMappingFile ( std::string &  mapFile,
unsigned int  cs,
const std::map< int, NodeMap > &  nodes,
const FaMat33 T_lg 
)

Writes the nodal mapping container to a binary file.

Parameters
mapFileName of file for storage of nodal mapping results
[in]csChecksum of the FE part the nodal mapping belongs to
[in]nodesNode-to-element mapping container
[in]T_lgLocal to global transformation matrix for sub-model

◆ writeSubModel()

bool writeSubModel ( std::string &  subFile,
FFlLinkHandler *&  model,
IntVec nodes 
)

Reads an FE model from file and writes out with external node status.

Parameters
subFileName of file with the FE sub-model
modelThe FE sub-model
nodesList of external nodes