|
Nektar++
|
Base class for CAD interface system. More...
#include <CADSystem.h>
Public Member Functions | |
| CADSystem (std::string name, std::string engine) | |
| Default constructor. | |
| virtual | ~CADSystem () |
| std::string | GetName () |
| Return the name of the CAD file. | |
| void | Set2D () |
| Set the CAD engine up to handle 2D geometries explicitly. | |
| bool | Is2D () |
| Returns whether the CAD engine is set in 2D mode. | |
| const std::string & | GetConfig (const std::string &key) const |
| Gets a configuration option. | |
| void | SetConfig (const std::string &key, const std::string &value) |
Sets a configuration option key to value. | |
| virtual bool | LoadCAD ()=0 |
| Initialises CAD and makes surface, curve and vertex maps. | |
| virtual std::array< NekDouble, 6 > | GetBoundingBox ()=0 |
| Returns bounding box of the domain. | |
| int | GetNumSurf () |
| Get the number of surfaces. | |
| int | GetNumCurve () |
| Get the number of curves. | |
| CADCurveSharedPtr | GetCurve (int i) |
| Gets a curve from the map. | |
| CADSurfSharedPtr | GetSurf (int i) |
| Gets a surface from the map. | |
| CADVertSharedPtr | GetVert (int i) |
| Gets a vert from the map. | |
| std::map< int, CADVertSharedPtr > | GetVerts () |
| Gets map of all vertices. | |
| int | GetNumVerts () const |
| Gets number of vertices. | |
| std::vector< std::array< NekDouble, 3 > > | GetVoidPoints () |
| Gets void points for tetrahedral meshing. | |
| void | SetVoidPoints (const std::vector< std::array< NekDouble, 3 > > &voidPts) |
| Sets void points for tetrahedral meshing. | |
| std::array< NekDouble, 3 > | GetPeriodicTranslationVector (int first, int second) |
| Return the vector of translation from one curve to another to allow for periodic mesh generation in 2D. | |
| std::string | GetEngine () const |
| Return the name of the CAD system engine (e.g. OCE). | |
| void | SetLogger (Logger &log) |
| void | CheckClosed () |
| Fail unless every curve is bounded by exactly two surfaces. | |
Protected Member Functions | |
| void | Report () |
| Reports basic properties to screen. | |
Protected Attributes | |
| std::string | m_name |
| Name of CAD file. | |
| std::string | m_engine |
| Name of CAD engine. | |
| std::map< int, CADCurveSharedPtr > | m_curves |
| Map of curves. | |
| std::map< int, CADSurfSharedPtr > | m_surfs |
| Map of surfaces. | |
| std::map< int, CADVertSharedPtr > | m_verts |
| Map of vertices. | |
| bool | m_2d = false |
| 2D cad flag | |
| std::map< std::string, std::string > | m_config |
| Configuration options which might be used per-engine, serialised in strings. | |
| std::vector< std::array< NekDouble, 3 > > | m_voidPoints |
| Points contained within volume voids for tetrahedralisation. | |
| Logger | m_log |
| Logger object. | |
Friends | |
| class | MemoryManager< CADSystem > |
Base class for CAD interface system.
A class which can load and interact with CAD for Nektar++. This class contains maps to subclasses surface and curves.
Definition at line 71 of file CADSystem.h.
|
inline |
Default constructor.
Definition at line 79 of file CADSystem.h.
|
inlinevirtual |
Definition at line 84 of file CADSystem.h.
|
inline |
Fail unless every curve is bounded by exactly two surfaces.
Anything else is not a closed manifold solid and the surface mesher has no closed boundary to work from. This is the condition the sewing in the OpenCASCADE engine exists to establish, so when it fails the sewing tolerance is the first thing to look at: a curve bounded by one surface is a seam that did not close, and one bounded by three or more is a genuine non-manifold join in the model.
Definition at line 265 of file CADSystem.h.
References Nektar::FATAL, m_curves, and m_log.
Referenced by Nektar::SpatialDomains::CADSystemOCE::LoadCAD().
|
pure virtual |
Returns bounding box of the domain.
Gets the bounding box of the domain by considering the start and end points of each curve in the geometry.
Implemented in Nektar::SpatialDomains::CADSystemOCE.
Referenced by Report().
|
inline |
Gets a configuration option.
| key | Configuration key. |
Definition at line 119 of file CADSystem.h.
References m_config.
|
inline |
Gets a curve from the map.
Definition at line 172 of file CADSystem.h.
References ASSERTL1, and m_curves.
Referenced by Nektar::SpatialDomains::CADSystemOCE::GetBoundingBox(), and GetPeriodicTranslationVector().
|
inline |
Return the name of the CAD system engine (e.g. OCE).
Definition at line 244 of file CADSystem.h.
References m_engine.
|
inline |
|
inline |
|
inline |
Get the number of surfaces.
Definition at line 156 of file CADSystem.h.
References m_surfs.
Referenced by GetPeriodicTranslationVector().
|
inline |
Gets number of vertices.
Definition at line 213 of file CADSystem.h.
References m_verts.
| std::array< NekDouble, 3 > CADSystem::GetPeriodicTranslationVector | ( | int | first, |
| int | second | ||
| ) |
Return the vector of translation from one curve to another to allow for periodic mesh generation in 2D.
Definition at line 65 of file CADSystem.cpp.
References Nektar::FATAL, GetCurve(), GetNumSurf(), and m_log.
|
inline |
|
inline |
|
inline |
|
inline |
Gets void points for tetrahedral meshing.
Definition at line 221 of file CADSystem.h.
References m_voidPoints.
|
inline |
Returns whether the CAD engine is set in 2D mode.
Definition at line 107 of file CADSystem.h.
References m_2d.
|
pure virtual |
Initialises CAD and makes surface, curve and vertex maps.
Implemented in Nektar::SpatialDomains::CADSystemOCE.
|
inlineprotected |
Reports basic properties to screen.
Definition at line 339 of file CADSystem.h.
References GetBoundingBox(), m_curves, m_engine, m_log, m_surfs, m_verts, and Nektar::VERBOSE.
Referenced by Nektar::SpatialDomains::CADSystemOCE::LoadCAD().
|
inline |
Set the CAD engine up to handle 2D geometries explicitly.
Definition at line 99 of file CADSystem.h.
References m_2d.
|
inline |
Sets a configuration option key to value.
| key | Configuration key. |
| value | The configuration value. |
Definition at line 131 of file CADSystem.h.
References m_config.
Definition at line 249 of file CADSystem.h.
References tinysimd::log(), m_log, and Nektar::Logger::SetPrefix().
|
inline |
Sets void points for tetrahedral meshing.
Definition at line 229 of file CADSystem.h.
References m_voidPoints.
|
friend |
Definition at line 364 of file CADSystem.h.
|
protected |
2D cad flag
Definition at line 327 of file CADSystem.h.
Referenced by Nektar::SpatialDomains::CADSystemOCE::BuildGeo(), Is2D(), Nektar::SpatialDomains::CADSystemOCE::LoadCAD(), and Set2D().
|
protected |
Configuration options which might be used per-engine, serialised in strings.
Definition at line 330 of file CADSystem.h.
Referenced by Nektar::SpatialDomains::CADSystemOCE::BuildNACA(), GetConfig(), Nektar::SpatialDomains::CADSystemOCE::LoadCAD(), and SetConfig().
|
protected |
Map of curves.
Definition at line 321 of file CADSystem.h.
Referenced by Nektar::SpatialDomains::CADSystemOCE::AddCurve(), Nektar::SpatialDomains::CADSystemOCE::AddSurf(), CheckClosed(), Nektar::SpatialDomains::CADSystemOCE::GetBoundingBox(), GetCurve(), GetNumCurve(), and Report().
|
protected |
Name of CAD engine.
Definition at line 319 of file CADSystem.h.
Referenced by GetEngine(), and Report().
|
protected |
Logger object.
Definition at line 334 of file CADSystem.h.
Referenced by Nektar::SpatialDomains::CADSystemOCE::AddCurve(), Nektar::SpatialDomains::CADSystemOCE::AddSurf(), Nektar::SpatialDomains::CADSystemOCE::AddVert(), Nektar::SpatialDomains::CADSystemOCE::BuildGeo(), Nektar::SpatialDomains::CADSystemOCE::BuildNACA(), CheckClosed(), GetPeriodicTranslationVector(), Nektar::SpatialDomains::CADSystemOCE::LoadCAD(), Report(), and SetLogger().
|
protected |
Name of CAD file.
Definition at line 317 of file CADSystem.h.
Referenced by GetName(), and Nektar::SpatialDomains::CADSystemOCE::LoadCAD().
|
protected |
Map of surfaces.
Definition at line 323 of file CADSystem.h.
Referenced by Nektar::SpatialDomains::CADSystemOCE::AddSurf(), GetNumSurf(), GetSurf(), Nektar::SpatialDomains::CADSystemOCE::LoadCAD(), and Report().
|
protected |
Map of vertices.
Definition at line 325 of file CADSystem.h.
Referenced by Nektar::SpatialDomains::CADSystemOCE::AddCurve(), Nektar::SpatialDomains::CADSystemOCE::AddVert(), GetNumVerts(), GetVert(), GetVerts(), Nektar::SpatialDomains::CADSystemOCE::LoadCAD(), and Report().
|
protected |
Points contained within volume voids for tetrahedralisation.
Definition at line 332 of file CADSystem.h.
Referenced by GetVoidPoints(), and SetVoidPoints().