EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
egmain.cpp File Reference
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "egutils.h"
#include "egdef.h"
#include "egtypes.h"
#include "egmesh.h"
#include "egnative.h"
#include "egconvert.h"
#include "src/meshtype.h"
+ Include dependency graph for egmain.cpp:

Go to the source code of this file.

Macros

#define EXE_MODE   0
 
#define LIB_MODE   1
 

Functions

int InlineParameters (struct ElmergridType *eg, int argc, char *argv[], const char *IOmethods[], int first, int info)
 
int ConvertEgTypeToMeshType (struct FemType *dat, struct BoundaryType *bound, mesh_t *mesh)
 
static int DetermineFileType (const char *filename, int info)
 
static int ImportMeshDefinition (int inmethod, int nofile, char *filename, int *nogrids)
 
static int ManipulateMeshDefinition (int inmethod, int outmethod, Real relh)
 
int eg_loadmesh (const char *filename)
 
int eg_transfermesh (mesh_t *mesh, const char *str)
 

Variables

static struct GridTypegrids
 
static struct FemType data [MAXCASES]
 
static struct BoundaryTypeboundaries [MAXCASES]
 
static struct ElmergridType eg
 
static char Filename [MAXFILESIZE]
 
static int Inmethod
 
int info =TRUE
 
int nogrids =0
 
int nomeshes =0
 
int activemesh =0
 
const char * IOmethods []
 

Macro Definition Documentation

#define EXE_MODE   0

Definition at line 55 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 55 of file egmain.cpp

#define LIB_MODE   1

Definition at line 56 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 56 of file egmain.cpp

Function Documentation

int ConvertEgTypeToMeshType ( struct FemType dat,
struct BoundaryType bound,
mesh_t mesh 
)

Definition at line 802 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 802 of file egmain.cpp

References FemType::created, data, FemType::dim, Acts::UnitConstants::e, eg, FemType::elementtypes, FALSE, element_t::getCode(), mesh_t::getEdge(), surface_t::getEdges(), mesh_t::getEdges(), mesh_t::getElement(), surface_t::getElements(), mesh_t::getElements(), GetElementSide(), GetMaxElementDimension(), mesh_t::getNode(), element_t::getNodes(), mesh_t::getNodes(), mesh_t::getSurface(), edge_t::getSurfaces(), mesh_t::getSurfaces(), k, FemType::material, MAX, MAXBOUNDARIES, MAXNODESD1, n, mesh_t::newEdgeArray(), surface_t::newEdgeIndexes(), mesh_t::newElementArray(), surface_t::newElementIndexes(), mesh_t::newNodeArray(), element_t::newNodeIndexes(), mesh_t::newSurfaceArray(), edge_t::newSurfaceIndexes(), FemType::noelements, FemType::noknots, BoundaryType::nosides, PDE_BOUNDARY, PDE_BULK, printf(), Acts::UnitConstants::s, ElmergridType::saveboundaries, element_t::setCode(), mesh_t::setDim(), surface_t::setEdgeIndex(), surface_t::setEdges(), mesh_t::setEdges(), surface_t::setElementIndex(), surface_t::setElements(), mesh_t::setElements(), node_t::setIndex(), element_t::setIndex(), element_t::setNature(), element_t::setNodeIndex(), element_t::setNodes(), mesh_t::setNodes(), surface_t::setNormal(), edge_t::setSurfaceIndex(), edge_t::setSurfaces(), mesh_t::setSurfaces(), node_t::setX(), FemType::topology, TRUE, FemType::x, FemType::y, and FemType::z.

Referenced by eg_transfermesh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int DetermineFileType ( const char *  filename,
int  info 
)
static

Definition at line 1009 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 1009 of file egmain.cpp

References printf().

Referenced by eg_loadmesh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int eg_loadmesh ( const char *  filename)

Definition at line 1313 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 1313 of file egmain.cpp

References DetermineFileType(), Filename, info, Inmethod, printf(), and TRUE.

+ Here is the call graph for this function:

int eg_transfermesh ( mesh_t mesh,
const char *  str 
)
static int ImportMeshDefinition ( int  inmethod,
int  nofile,
char *  filename,
int *  nogrids 
)
static

Definition at line 1041 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 1041 of file egmain.cpp

References BoundaryType::created, CreateExampleGrid(), data, ElmergridType::decimals, Acts::Test::dim, ElmergridType::dim, eg, FALSE, ElmergridType::filesin, ElmergridType::filesout, info, IOmethods, k, LoadAbaqusInput(), LoadAnsysInput(), LoadCGsimMesh(), LoadCommands(), LoadComsolMesh(), LoadElmergrid(), LoadFidapInput(), LoadFieldviewInput(), LoadGidInput(), LoadGmshInput(), LoadMeditInput(), LoadNastranInput(), LoadTriangleInput(), LoadUniversalMesh(), MAX, MAXBOUNDARIES, MAXCASES, BoundaryType::nosides, printf(), SaveElmergrid(), ElmergridType::saveinterval, and TRUE.

Referenced by eg_transfermesh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int InlineParameters ( struct ElmergridType eg,
int  argc,
char *  argv[],
const char *  IOmethods[],
int  first,
int  info 
)

Definition at line 106 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 106 of file egmain.cpp

References kdfinder::abs(), ElmergridType::bcoffset, ElmergridType::belemmap, ElmergridType::belems, ElmergridType::boundbound, ElmergridType::boundbounds, ElmergridType::boundorder, ElmergridType::bulkbound, ElmergridType::bulkbounds, ElmergridType::bulkmap, ElmergridType::bulkmappings, ElmergridType::bulkorder, ElmergridType::center, ElmergridType::clone, ElmergridType::clonesize, ElmergridType::cmerge, ElmergridType::connect, ElmergridType::connectbounds, ElmergridType::corder, ElmergridType::crotate, ElmergridType::cscale, ElmergridType::ctranslate, ElmergridType::cylinder, ElmergridType::decimals, Acts::Test::dim, ElmergridType::dim, ElmergridType::discont, ElmergridType::discontbounds, ElmergridType::elements3d, FALSE, ElmergridType::filesin, ElmergridType::filesout, ElmergridType::findsides, ElmergridType::increase, ElmergridType::inmethod, ElmergridType::isoparam, ElmergridType::layerbounds, ElmergridType::layermove, ElmergridType::layernumber, ElmergridType::layerparents, ElmergridType::layerratios, ElmergridType::layers, ElmergridType::layerthickness, ElmergridType::mapfile, MAXBOUNDARIES, MAXFORMATS, MAXLINESIZE, ElmergridType::merge, ElmergridType::metis, ElmergridType::nodes3d, ElmergridType::nofilesin, ElmergridType::order, ElmergridType::outmethod, ElmergridType::partcorder, ElmergridType::partdim, ElmergridType::partitionhalo, ElmergridType::partitionindirect, ElmergridType::partitions, ElmergridType::partopt, ElmergridType::partorder, ElmergridType::pelemmap, ElmergridType::pelems, ElmergridType::periodicdim, ElmergridType::polar, ElmergridType::polarradius, printf(), ElmergridType::reduce, ElmergridType::reducemat1, ElmergridType::reducemat2, ElmergridType::relh, ElmergridType::removelowdim, ElmergridType::removeunused, ElmergridType::rotate, ElmergridType::saveboundaries, ElmergridType::saveinterval, ElmergridType::scale, ElmergridType::sidebulk, ElmergridType::sidemap, ElmergridType::sidemappings, ElmergridType::silent, ElmergridType::translate, ElmergridType::triangleangle, ElmergridType::triangles, TRUE, ElmergridType::unitemeshes, and ElmergridType::usenames.

Referenced by eg_transfermesh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ManipulateMeshDefinition ( int  inmethod,
int  outmethod,
Real  relh 
)
static

Definition at line 1158 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 1158 of file egmain.cpp

References kdfinder::abs(), activemesh, ElmergridType::bcoffset, ElmergridType::boundbounds, ElmergridType::boundorder, GridType::boundtype, ElmergridType::bulkbounds, ElmergridType::bulkmappings, ElmergridType::bulkorder, ElmergridType::clone, CloneMeshes(), ElmergridType::clonesize, ElmergridType::cmerge, ElmergridType::connect, ElmergridType::connectbounds, COORD_CYL, COORD_POLAR, FemType::coordsystem, ElmergridType::corder, CreateBoundaryLayer(), CreateBoundaryLayerDivide(), BoundaryType::created, CreateElmerGridMesh(), CreateKnotsExtruded(), ElmergridType::cylinder, CylinderCoordinates(), data, DestroyBoundary(), DestroyKnots(), ElmergridType::dim, ElmergridType::discont, ElmergridType::discontbounds, eg, ElementsToTriangles(), FALSE, FindPeriodicNodes(), ElmergridType::increase, IncreaseElementOrder(), info, k, ElmergridType::layerbounds, ElmergridType::layereps, ElmergridType::layermove, ElmergridType::layernumber, ElmergridType::layerparents, ElmergridType::layerratios, ElmergridType::layers, ElmergridType::layerthickness, MAX, MAXBOUNDARIES, MAXCASES, ElmergridType::merge, MergeElements(), GridType::noboundaries, nogrids, nomeshes, ElmergridType::order, ElmergridType::periodicdim, ElmergridType::polar, PolarCoordinates(), GridType::polarradius, ElmergridType::polarradius, ElmergridType::reduce, ReduceElementOrder(), ElmergridType::reducemat1, ElmergridType::reducemat2, GridType::reduceordermatmax, GridType::reduceordermatmin, ElmergridType::removelowdim, RemoveLowerDimensionalBoundaries(), ElmergridType::removeunused, RemoveUnusedNodes(), RenumberBoundaryTypes(), RenumberMaterialTypes(), ReorderElements(), RotateTranslateScale(), SetConnectedBoundary(), SetDiscontinuousBoundary(), SideAndBulkBoundaries(), SideAndBulkMappings(), ElmergridType::sidemappings, GridType::triangleangle, ElmergridType::triangleangle, GridType::triangles, ElmergridType::triangles, TRUE, ElmergridType::unitemeshes, and UniteMeshes().

Referenced by eg_transfermesh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

int activemesh =0

Definition at line 82 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 82 of file egmain.cpp

Referenced by eg_transfermesh(), and ManipulateMeshDefinition().

struct FemType data[MAXCASES]
static

Definition at line 75 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 75 of file egmain.cpp

Referenced by PHDataNodeIterator::AddIODataNode(), Ax3ToCombiTrans(), Acts::Test::BOOST_DATA_TEST_CASE(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::calibrated(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::calibratedCovariance(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::calibratedSourceLink(), kdfinder::CircleFit< T >::CircleFitByChernovHoussam(), kdfinder::CircleFit< T >::CircleFitByHyper(), kdfinder::CircleFit< T >::CircleFitByPratt(), kdfinder::CircleFit< T >::CircleFitByTaubin(), ConvertEgTypeToMeshType(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::covariance(), CreateTetrahedron(), CbmModuleList::DefineModules(), Packet_A::dumpDebugBlock(), Packet_A::dumpErrorBlock(), eg_transfermesh(), ElementsToTriangles(), DSTEmulator::evaluate_tracks(), FairBoxSetDraw::Exec(), CharmJetModule::execute(), TaggingStudyModule::execute(), ElectronPIDModule::execute(), KaonPIDModule::execute(), MuonPIDModule::execute(), TaggingModule::execute(), EventSelectionModule::execute(), FairWriteoutBuffer::FillDataToDeadTimeMap(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::filtered(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::filteredCovariance(), Acts::SurfaceArray::SurfaceGridLookup< Axes >::getBinCenterImpl(), EicPOD::GetVariableOffset(), ImportMeshDefinition(), PHTypedNodeIterator< T >::insert(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::jacobian(), KaonIDStudy(), main(), PHG4ScoringManager::makeScoringHistograms(), ManipulateMeshDefinition(), md5_append(), md5_finish(), md5_process(), Module::Module(), ModuleHandler::ModuleHandler(), FairWriteoutBuffer::MoveDataFromStartTimeMapToDeadTimeMap(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::parameters(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::predicted(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::predictedCovariance(), EicGeoParData::Print(), FairWriteoutBuffer::PrintStartTimeMap(), TpcClusterizer::process_event(), TPCDataStreamEmulator::process_event(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::projector(), r1990(), ActsExamples::CsvParticleReader::read(), PndFieldMap::ReadRootFile(), FairRegistryItemXxx< T >::Set(), CbmRichRingFinderHoughImpl::SetData(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::smoothed(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::smoothedCovariance(), testEventiterator::testEventiterator(), BranchComparisonHarness::toString(), Acts::detail_lt::TrackStateProxy< source_link_t, M, ReadOnly >::uncalibrated(), PHIODataNode< T >::write(), PHNodeIOManager::write(), FairWriteoutBuffer::WriteOutDataDeadTimeMap(), PndFieldMap::WriteRootFile(), ActsExamples::ObjSpacePointWriter< T >::writeT(), ActsExamples::JsonSpacePointWriter< T >::writeT(), ActsExamples::CsvParticleWriter::writeT(), and PHDataNode< T >::~PHDataNode().

struct ElmergridType eg
static
char Filename[MAXFILESIZE]
static

Definition at line 78 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 78 of file egmain.cpp

Referenced by eg_loadmesh(), and eg_transfermesh().

struct GridType* grids
static

Definition at line 74 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 74 of file egmain.cpp

int Inmethod
static

Definition at line 79 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 79 of file egmain.cpp

Referenced by eg_loadmesh(), and eg_transfermesh().

const char* IOmethods[]
Initial value:
= {
"EG",
"ELMERGRID",
"ELMERSOLVER",
"ELMERPOST",
"ANSYS",
"IDEAS",
"NASTRAN",
"FIDAP",
"UNV",
"COMSOL",
"FIELDVIEW",
"TRIANGLE",
"MEDIT",
"GID",
"GMSH",
"PARTITIONED",
"CGSIM",
}

Definition at line 84 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 84 of file egmain.cpp

Referenced by eg_transfermesh(), and ImportMeshDefinition().

int nogrids =0

Definition at line 82 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 82 of file egmain.cpp

Referenced by eg_transfermesh(), LoadElmergrid(), ManipulateMeshDefinition(), and SaveElmergrid().

int nomeshes =0

Definition at line 82 of file egmain.cpp.

View newest version in sPHENIX GitHub at line 82 of file egmain.cpp

Referenced by eg_transfermesh(), and ManipulateMeshDefinition().