TexGen
|
Class used to generate voxel mesh for output to ABAQUS. More...
#include <VoxelMesh.h>
Public Member Functions | |
CVoxelMesh (string Type="CPeriodicBoundaries") | |
virtual | ~CVoxelMesh (void) |
virtual void | SaveVoxelMesh (CTextile &Textile, string OutputFilename, int XVoxNum, int YVoxNum, int ZVoxNum, bool bOutputMatrix, bool bOutputYarns, int iBoundaryConditions, int iElementType=0, int FileType=INP_EXPORT) |
void | AddElementInfo (vector< POINT_INFO > &RowInfo) |
Add a row of element information. More... | |
void | OutputOrientationsAndElementSets (string Filename) |
Outputs yarn orientations and element sets to .ori and .eld files. More... | |
CTextileMaterials & | GetMaterials () |
Protected Member Functions | |
virtual bool | CalculateVoxelSizes (CTextile &Textile)=0 |
Calculate voxel size based on number of voxels on each axis and domain size. More... | |
void | SaveVoxelMeshToVTK (string Filename, CTextile &Textile) |
Add nodes for whole domain. More... | |
void | SaveToAbaqus (string Filename, CTextile &Textile, bool bOutputMatrix, bool bOutputYarn, int iBoundaryConditions, int iElementType) |
void | SaveToSCIRun (string Filename, CTextile &Textile) |
Save voxel mesh in SCIRun .pts and .hex format without boundary conditions. More... | |
virtual void | OutputNodes (ostream &Output, CTextile &Textile, int Filetype=INP_EXPORT)=0 |
Outputs nodes to .inp file and gets element information. More... | |
virtual int | OutputHexElements (ostream &Output, bool bOutputMatrix, bool bOutputYarn, int Filetype=INP_EXPORT) |
Output hex elements to .inp file. More... | |
void | OutputOrientationsAndElementSets (string Filename, ostream &Output) |
Outputs yarn orientations and element sets to .ori and .eld files. More... | |
void | OutputMatrixElementSet (string Filename, ostream &Output, int iNumHexElements, bool bMatrixOnly) |
Outputs all elements when only outputting matrix. More... | |
void | OutputAllNodesSet (string Filename, ostream &Output) |
Output node set containing all nodes. More... | |
virtual void | OutputPeriodicBoundaries (ostream &Output, CTextile &Textile, int iBoundaryConditions, bool bMatrixOnly) |
Output periodic boundary conditions to .inp file. More... | |
Protected Attributes | |
CTextileMaterials | m_Materials |
CMesh | m_Mesh |
Find intersections of yarn surfaces with grid of lines from node points in each axis. More... | |
int | m_XVoxels |
Number of voxels along x,y and z axes. More... | |
int | m_YVoxels |
int | m_ZVoxels |
pair< XYZ, XYZ > | m_DomainAABB |
Domain limits. More... | |
vector< POINT_INFO > | m_ElementsInfo |
Element information as calculated by GetPointInformation. More... | |
CPeriodicBoundaries * | m_PeriodicBoundaries |
Private Member Functions | |
CVoxelMesh (const CVoxelMesh &CopyMe) | |
CVoxelMesh & | operator= (const CVoxelMesh &CopyMe) |
Class used to generate voxel mesh for output to ABAQUS.
Definition at line 34 of file VoxelMesh.h.
CVoxelMesh::CVoxelMesh | ( | string | Type = "CPeriodicBoundaries" | ) |
Definition at line 32 of file VoxelMesh.cpp.
References m_PeriodicBoundaries.
|
virtual |
Definition at line 46 of file VoxelMesh.cpp.
References m_PeriodicBoundaries.
|
private |
void CVoxelMesh::AddElementInfo | ( | vector< POINT_INFO > & | RowInfo | ) |
Add a row of element information.
Definition at line 704 of file VoxelMesh.cpp.
References m_ElementsInfo.
|
protectedpure virtual |
Calculate voxel size based on number of voxels on each axis and domain size.
Implemented in TexGen::COctreeVoxelMesh, TexGen::CPrismVoxelMesh, TexGen::CRectangularVoxelMesh, TexGen::CRotatedVoxelMesh, TexGen::CShearedVoxelMesh, and TexGen::CStaggeredVoxelMesh.
Referenced by SaveVoxelMesh().
|
inline |
Definition at line 57 of file VoxelMesh.h.
|
private |
|
protected |
Output node set containing all nodes.
Definition at line 584 of file VoxelMesh.cpp.
References m_XVoxels, m_YVoxels, and m_ZVoxels.
Referenced by SaveToAbaqus().
|
protectedvirtual |
Output hex elements to .inp file.
\ return Maximum element index
Reimplemented in TexGen::CPrismVoxelMesh, and TexGen::COctreeVoxelMesh.
Definition at line 399 of file VoxelMesh.cpp.
References TexGen::CMesh::AddElement(), TexGen::CMesh::HEX, TexGen::INP_EXPORT, m_ElementsInfo, m_Mesh, m_XVoxels, m_YVoxels, m_ZVoxels, and TexGen::SCIRUN_EXPORT.
Referenced by SaveToAbaqus(), SaveToSCIRun(), and SaveVoxelMeshToVTK().
|
protected |
Outputs all elements when only outputting matrix.
Definition at line 567 of file VoxelMesh.cpp.
Referenced by SaveToAbaqus().
|
protectedpure virtual |
Outputs nodes to .inp file and gets element information.
Implemented in TexGen::COctreeVoxelMesh, TexGen::CPrismVoxelMesh, TexGen::CRectangularVoxelMesh, TexGen::CRotatedVoxelMesh, and TexGen::CShearedVoxelMesh.
Referenced by SaveToAbaqus(), SaveToSCIRun(), and SaveVoxelMeshToVTK().
void CVoxelMesh::OutputOrientationsAndElementSets | ( | string | Filename | ) |
Outputs yarn orientations and element sets to .ori and .eld files.
Definition at line 470 of file VoxelMesh.cpp.
References TexGen::AddExtensionIfMissing(), and OutputOrientationsAndElementSets().
Referenced by OutputOrientationsAndElementSets(), and SaveToAbaqus().
|
protected |
Outputs yarn orientations and element sets to .ori and .eld files.
Definition at line 478 of file VoxelMesh.cpp.
References TexGen::CrossProduct(), m_ElementsInfo, TexGen::Normalise(), TexGen::StripPath(), TGERROR, TGLOG, TexGen::WriteElementsHeader(), TexGen::WriteOrientationsHeader(), and TexGen::WriteValues().
|
protectedvirtual |
Output periodic boundary conditions to .inp file.
Reimplemented in TexGen::COctreeVoxelMesh, and TexGen::CStaggeredVoxelMesh.
Definition at line 594 of file VoxelMesh.cpp.
References TexGen::CPeriodicBoundaries::CreatePeriodicBoundaries(), TexGen::CTextile::GetDomain(), TexGen::CDomain::GetMesh(), m_PeriodicBoundaries, m_XVoxels, m_YVoxels, m_ZVoxels, TexGen::CPeriodicBoundaries::SetDomainSize(), TexGen::CPeriodicBoundaries::SetEdges(), TexGen::CPeriodicBoundaries::SetFaceA(), TexGen::CPeriodicBoundaries::SetFaceB(), TexGen::CPeriodicBoundaries::SetFaceC(), and TexGen::CPeriodicBoundaries::SetVertex().
Referenced by SaveToAbaqus().
|
protected |
Save voxel mesh in Abaqus .inp format with periodic boundary conditions bOutputMatrix and bOutput yarn specify which of these are saved to the Abaqus file
Definition at line 287 of file VoxelMesh.cpp.
References TexGen::AddExtensionIfMissing(), TexGen::CTextile::GetNumYarns(), m_Materials, TexGen::NO_BOUNDARY_CONDITIONS, OutputAllNodesSet(), OutputHexElements(), TexGen::CTextileMaterials::OutputMaterials(), OutputMatrixElementSet(), OutputNodes(), OutputOrientationsAndElementSets(), OutputPeriodicBoundaries(), TexGen::CTextileMaterials::SetupMaterials(), TEXGEN, TGERROR, and TGLOG.
Referenced by SaveVoxelMesh().
|
protected |
Save voxel mesh in SCIRun .pts and .hex format without boundary conditions.
Definition at line 358 of file VoxelMesh.cpp.
References OutputHexElements(), OutputNodes(), TexGen::RemoveExtension(), TexGen::SCIRUN_EXPORT, TGERROR, and TGLOG.
|
virtual |
Save the voxel mesh as an Abaqus input file with periodic boundary conditions
CTextile | Textile - textile to be exported as refined voxel mesh |
string | OutputFilename - filename to save to |
int | XVoxNum - number of voxels in x direction |
int | YVoxNum - number of voxels in y direction |
int | ZVoxNum - number of voxels in z direction |
bOutputMatrix | True to output the matrix area of the mesh |
bOutputYarns | True to output the yarn areas |
iBoundaryConditions | as in enum PERIODIC_BOUNDARY_CONDITIONS |
iElementType | 0 for C3D8R, 1 for C3D8 |
int | Filetype as in enum EXPORT_TYPE |
Definition at line 51 of file VoxelMesh.cpp.
References CalculateVoxelSizes(), TexGen::CTimer::check(), TexGen::CTextile::GetDomain(), TexGen::INP_EXPORT, m_ElementsInfo, m_XVoxels, m_YVoxels, m_ZVoxels, TexGen::ReplaceFilenameSpaces(), SaveToAbaqus(), SaveVoxelMeshToVTK(), TexGen::CTimer::start(), TexGen::CTimer::stop(), TGERROR, and TGLOG.
Referenced by TexGen::COctreeVoxelMesh::SaveVoxelMesh().
|
protected |
Add nodes for whole domain.
Add hex elements Save voxel mesh in VTK format without boundary conditions
Definition at line 246 of file VoxelMesh.cpp.
References TexGen::AddExtensionIfMissing(), TexGen::CMeshDataBase::ELEMENT, TexGen::CMeshData< T >::m_Data, m_ElementsInfo, m_Mesh, OutputHexElements(), OutputNodes(), TexGen::CMesh::SaveToVTK(), and TexGen::VTU_EXPORT.
Referenced by SaveVoxelMesh().
Domain limits.
Definition at line 121 of file VoxelMesh.h.
Referenced by TexGen::CRectangularVoxelMesh::CalculateVoxelSizes(), TexGen::COctreeVoxelMesh::CreateP4ESTRefinement(), TexGen::COctreeVoxelMesh::isBoundary(), TexGen::CRectangularVoxelMesh::OutputNodes(), TexGen::COctreeVoxelMesh::OutputPeriodicBoundaries(), TexGen::COctreeVoxelMesh::SaveVoxelMesh(), and TexGen::COctreeVoxelMesh::smoothing().
|
protected |
Element information as calculated by GetPointInformation.
Definition at line 123 of file VoxelMesh.h.
Referenced by AddElementInfo(), TexGen::COctreeVoxelMesh::checkIndex(), TexGen::COctreeVoxelMesh::extractSurfaceNodeSets(), TexGen::COctreeVoxelMesh::fillMaterialInfo(), TexGen::CPrismVoxelMesh::OutputHexElements(), OutputHexElements(), TexGen::COctreeVoxelMesh::OutputNodes(), TexGen::CPrismVoxelMesh::OutputNodes(), TexGen::CRectangularVoxelMesh::OutputNodes(), TexGen::CRotatedVoxelMesh::OutputNodes(), TexGen::CShearedVoxelMesh::OutputNodes(), OutputOrientationsAndElementSets(), TexGen::COctreeVoxelMesh::OutputSurfaces(), SaveVoxelMesh(), SaveVoxelMeshToVTK(), and TexGen::COctreeVoxelMesh::~COctreeVoxelMesh().
|
protected |
Definition at line 60 of file VoxelMesh.h.
Referenced by SaveToAbaqus().
|
protected |
Find intersections of yarn surfaces with grid of lines from node points in each axis.
Calculate intersections for one orientation of grid lines Output data with iMaxPerLine elements per line Mesh stored when saving to VTK
Definition at line 112 of file VoxelMesh.h.
Referenced by TexGen::CPrismVoxelMesh::OutputHexElements(), OutputHexElements(), TexGen::CPrismVoxelMesh::OutputNodes(), TexGen::CRectangularVoxelMesh::OutputNodes(), TexGen::CRotatedVoxelMesh::OutputNodes(), TexGen::CShearedVoxelMesh::OutputNodes(), and SaveVoxelMeshToVTK().
|
protected |
Definition at line 126 of file VoxelMesh.h.
Referenced by CVoxelMesh(), TexGen::COctreeVoxelMesh::OutputPeriodicBoundaries(), TexGen::CStaggeredVoxelMesh::OutputPeriodicBoundaries(), OutputPeriodicBoundaries(), TexGen::CStaggeredVoxelMesh::SetOffset(), and ~CVoxelMesh().
|
protected |
Number of voxels along x,y and z axes.
Definition at line 115 of file VoxelMesh.h.
Referenced by TexGen::CPrismVoxelMesh::CalculateVoxelSizes(), TexGen::CRectangularVoxelMesh::CalculateVoxelSizes(), TexGen::CRotatedVoxelMesh::CalculateVoxelSizes(), TexGen::CShearedVoxelMesh::CalculateVoxelSizes(), TexGen::CStaggeredVoxelMesh::CalculateVoxelSizes(), TexGen::COctreeVoxelMesh::ConvertOctreeToNodes(), TexGen::CPrismVoxelMesh::GetElementMap(), OutputAllNodesSet(), TexGen::CPrismVoxelMesh::OutputHexElements(), OutputHexElements(), TexGen::CPrismVoxelMesh::OutputNodes(), TexGen::CRectangularVoxelMesh::OutputNodes(), TexGen::CRotatedVoxelMesh::OutputNodes(), TexGen::CShearedVoxelMesh::OutputNodes(), TexGen::CStaggeredVoxelMesh::OutputPeriodicBoundaries(), OutputPeriodicBoundaries(), SaveVoxelMesh(), TexGen::COctreeVoxelMesh::SaveVoxelMesh(), TexGen::COctreeVoxelMesh::storePointInfo(), and TexGen::COctreeVoxelMesh::writeTempFile().
|
protected |
Definition at line 116 of file VoxelMesh.h.
Referenced by TexGen::CPrismVoxelMesh::CalculateVoxelSizes(), TexGen::CRectangularVoxelMesh::CalculateVoxelSizes(), TexGen::CRotatedVoxelMesh::CalculateVoxelSizes(), TexGen::CShearedVoxelMesh::CalculateVoxelSizes(), TexGen::COctreeVoxelMesh::ConvertOctreeToNodes(), OutputAllNodesSet(), TexGen::CPrismVoxelMesh::OutputHexElements(), OutputHexElements(), TexGen::CPrismVoxelMesh::OutputNodes(), TexGen::CRectangularVoxelMesh::OutputNodes(), TexGen::CRotatedVoxelMesh::OutputNodes(), TexGen::CShearedVoxelMesh::OutputNodes(), TexGen::CStaggeredVoxelMesh::OutputPeriodicBoundaries(), OutputPeriodicBoundaries(), SaveVoxelMesh(), TexGen::COctreeVoxelMesh::SaveVoxelMesh(), TexGen::COctreeVoxelMesh::storePointInfo(), and TexGen::COctreeVoxelMesh::writeTempFile().
|
protected |
Definition at line 117 of file VoxelMesh.h.
Referenced by TexGen::CPrismVoxelMesh::CalculateVoxelSizes(), TexGen::CRectangularVoxelMesh::CalculateVoxelSizes(), TexGen::CRotatedVoxelMesh::CalculateVoxelSizes(), TexGen::CShearedVoxelMesh::CalculateVoxelSizes(), TexGen::COctreeVoxelMesh::ConvertOctreeToNodes(), TexGen::CPrismVoxelMesh::GetElementMap(), OutputAllNodesSet(), TexGen::CPrismVoxelMesh::OutputHexElements(), OutputHexElements(), TexGen::CPrismVoxelMesh::OutputNodes(), TexGen::CRectangularVoxelMesh::OutputNodes(), TexGen::CRotatedVoxelMesh::OutputNodes(), TexGen::CShearedVoxelMesh::OutputNodes(), TexGen::CStaggeredVoxelMesh::OutputPeriodicBoundaries(), OutputPeriodicBoundaries(), SaveVoxelMesh(), TexGen::COctreeVoxelMesh::SaveVoxelMesh(), TexGen::COctreeVoxelMesh::storePointInfo(), and TexGen::COctreeVoxelMesh::writeTempFile().