NuTo
Numerics Tool
Classes | Functions
MeshGmsh.cpp File Reference
#include "MeshGmsh.h"
#include "nuto/base/Exception.h"
#include "nuto/mechanics/interpolation/InterpolationTrussLinear.h"
#include "nuto/mechanics/interpolation/InterpolationTrussLobatto.h"
#include "nuto/mechanics/interpolation/InterpolationTriangleLinear.h"
#include "nuto/mechanics/interpolation/InterpolationTriangleQuadratic.h"
#include "nuto/mechanics/interpolation/InterpolationQuadLinear.h"
#include "nuto/mechanics/interpolation/InterpolationQuadSerendipity.h"
#include "nuto/mechanics/interpolation/InterpolationQuadLobatto.h"
#include "nuto/mechanics/interpolation/InterpolationTetrahedronLinear.h"
#include "nuto/mechanics/interpolation/InterpolationTetrahedronQuadratic.h"
#include "nuto/mechanics/interpolation/InterpolationBrickLinear.h"
#include "nuto/mechanics/interpolation/InterpolationBrickLobatto.h"
#include "nuto/mechanics/interpolation/InterpolationPrismLinear.h"
#include "nuto/mechanics/interpolation/InterpolationPrismQuadratic.h"
#include "nuto/mechanics/interpolation/InterpolationPyramidLinear.h"
#include "nuto/mechanics/cell/Jacobian.h"
#include <array>
#include <fstream>
#include <unordered_map>

Classes

struct  GmshHeader
 
struct  GmshNode
 
struct  GmshElement
 
struct  GmshPhysicalNames
 
struct  GmshFileContent
 

Functions

bool CompareLeft (const std::string &sLong, const std::string &sShort)
 Returns true, if sLong and sShort are equal up to the length of sShort. More...
 
void ExpectNextLineToBe (std::ifstream &rFile, std::string expected)
 
void CheckJacobian (NuTo::ElementFem &elm)
 
GmshHeader ReadGmshHeader (std::ifstream &rFile)
 
int FindDimension (const std::vector< GmshNode > &nodes)
 
constexpr int NumNodes (int gmshElementType)
 
std::tuple< std::vector< GmshNode >, int > ReadNodesASCII (std::ifstream &rFile)
 
std::vector< GmshElementReadElementsASCII (std::ifstream &rFile)
 
std::tuple< std::vector< GmshNode >, int > ReadNodesBinary (std::ifstream &rFile)
 
std::vector< GmshElementReadElementsBinary (std::ifstream &rFile)
 
std::vector< GmshPhysicalNamesReadPhysicalNames (std::ifstream &rFile)
 
void ProcessSection (std::ifstream &rFile, GmshFileContent &rFileContent)
 
const NuTo::InterpolationSimpleCreateElementInterpolation (NuTo::MeshFem &rMesh, int gmshType)
 
std::vector< NuTo::NodeSimple * > GetElementNodes (const std::unordered_map< int, NuTo::NodeSimple * > &nodePtrs, const GmshElement &gmshElement)
 
std::string GetPhysicalGroupName (const GmshFileContent &fileContent, int groupId)
 

Function Documentation

void CheckJacobian ( NuTo::ElementFem elm)
bool CompareLeft ( const std::string &  sLong,
const std::string &  sShort 
)

Returns true, if sLong and sShort are equal up to the length of sShort.

CompareLeft("ABC", "ABC") –> true CompareLeft("ABCD", "ABC") –> true CompareLeft("ABC ", "ABC") –> true CompareLeft(" ABC", "ABC") –> false

const NuTo::InterpolationSimple& CreateElementInterpolation ( NuTo::MeshFem rMesh,
int  gmshType 
)
void ExpectNextLineToBe ( std::ifstream &  rFile,
std::string  expected 
)
int FindDimension ( const std::vector< GmshNode > &  nodes)
std::vector<NuTo::NodeSimple*> GetElementNodes ( const std::unordered_map< int, NuTo::NodeSimple * > &  nodePtrs,
const GmshElement gmshElement 
)
std::string GetPhysicalGroupName ( const GmshFileContent fileContent,
int  groupId 
)
constexpr int NumNodes ( int  gmshElementType)
void ProcessSection ( std::ifstream &  rFile,
GmshFileContent rFileContent 
)
std::vector<GmshElement> ReadElementsASCII ( std::ifstream &  rFile)
std::vector<GmshElement> ReadElementsBinary ( std::ifstream &  rFile)
GmshHeader ReadGmshHeader ( std::ifstream &  rFile)
std::tuple<std::vector<GmshNode>, int> ReadNodesASCII ( std::ifstream &  rFile)
std::tuple<std::vector<GmshNode>, int> ReadNodesBinary ( std::ifstream &  rFile)
std::vector<GmshPhysicalNames> ReadPhysicalNames ( std::ifstream &  rFile)