This module handles all geometry related concerns. More...
Classes | |
class | Bembel::Geometry |
this class wraps a GeometryVector and provides some basic functionality, like reading Geometry files More... | |
class | Bembel::Patch |
handles a single patch More... | |
Typedefs | |
typedef std::vector< Bembel::Patch > | Bembel::PatchVector |
typedef for PatchVector More... | |
typedef Eigen::Matrix< double, 12, 1 > | SurfacePoint |
typedef of SurfacePoint More... | |
typedef std::vector< SurfacePoint, Eigen::aligned_allocator< SurfacePoint > > | ElementSurfacePoints |
typedef std::vector<SurfacePoint> with aligned allocator of Eigen for compatibility with older compilers. | |
Functions | |
std::vector< Patch > | Bembel::LoadGeometryFileIGS (const std::string &file_name) noexcept |
loads geometry from IGES file. Note that the direction of the normals must be consistent. More... | |
void | Bembel::writeSection (std::string file_name, const std::vector< std::string > §ion, const char section_char) |
This function writes a given section to the specified file. More... | |
int | Bembel::writeParameterSection (std::string file_name, const std::vector< std::string > §ion, const int patch_idx, const int start_count) |
This function writes a the parameter section of the IGES file. More... | |
std::vector< std::string > | Bembel::makeSection (std::vector< std::string > data, const int linewidth=72) |
Transform a vector of Data in a vector of lines with a specific length. More... | |
void | Bembel::writeIGSHeader (std::string file_name) |
Write the IGES header into the given file. More... | |
int | Bembel::writeGlobalSection (std::string file_name) |
Write the IGES Global section into the given file. More... | |
int | Bembel::writeDirectory (std::string file_name, std::vector< int > start_idx, std::vector< int > number_of_lines) |
Write the IGES Directory section into the given file. More... | |
std::vector< std::string > | Bembel::writePatchData (const Patch &patch, const int precision) |
This Function writes the patch from Bembel into a vector which can be written into an IGES file. More... | |
void | Bembel::writeIGSFile (const std::vector< Patch > &geometry, std::string file_name, const int precision=6) |
Writes Geometry into an IGES file format. More... | |
std::vector< Patch > | Bembel::LoadGeometryFileDAT (const std::string &file_name) noexcept |
loads geometry from file with GEOPDE-format. Note that the direction of the normals must be consistent More... | |
void | Bembel::WriteDATFile (const std::vector< Patch > &Geometry, const std::string &file_name) |
exports a geometry from Bembel to a .dat file. More... | |
This module handles all geometry related concerns.
The Geometry class is the interface between geometry description and the remainder of the code. We provide an implementation of NURBS discretized patches via the Patch class, but the code is easily extensible to other parametric descriptions mapping from [0,1]2 to parts of the geometry, as long as the corresponding methods for point evaluation and evaluation of the point wise Jacobian are implemented.
typedef std::vector<Bembel::Patch> Bembel::PatchVector |
typedef for PatchVector
This is the default geometry format. If custom parametric mappings were to be implemented, one would need to change Bembel::Patch here to the new format, and the new format must provide an eval(), evalNorma(), evalJacobian() and updateSurfacePoint() method.
Definition at line 24 of file PatchVector.hpp.
typedef Eigen::Matrix<double, 12, 1> SurfacePoint |
typedef of SurfacePoint
This typedef is essential for any evaluation of a bilinear form. It provides all required geometry information, stored as follows: (0) x-coordinate of the evaluation point in the parameter domain [0,1]^2 of the current element, i.e we map [0,1]^2->element->surface (1) y-coordinate of the evaluation point in the parameter domain [0,1]^2 of the current element, i.e we map [0,1]^2->element->surface (2) a quadrature weight. Can be left empty if not used as part of a quadrature. (3) x-coordinate of patch eval in space (4) y-coordinate of patch eval in space (5) z-coordinate of patch eval in space (6) x-component of derivative in x-dir (7) y-component of derivative in x-dir (8) z-component of derivative in x-dir (9) x-component of derivative in y-dir (10) y-component of derivative in y-dir (11) z-component of derivative in y-dir For application of the pull-back to the reference domain, one requires the jacobian of any point on the surface. Calling eval and evalJacobian of the Patch class introduces work that needs to be done twice. The updateSurdacePoint method is specialized and should be used, since it avoids redundant work.
Definition at line 42 of file SurfacePoint.hpp.
|
inlinenoexcept |
loads geometry from file with GEOPDE-format. Note that the direction of the normals must be consistent
file_name | path/filename pointing to the geometry file |
Definition at line 25 of file GeometryIO.hpp.
|
noexcept |
loads geometry from IGES file. Note that the direction of the normals must be consistent.
file_name | path/filename pointing to the geometry file |
Definition at line 25 of file GeometryIGS.hpp.
std::vector<std::string> Bembel::makeSection | ( | std::vector< std::string > | data, |
const int | linewidth = 72 |
||
) |
Transform a vector of Data in a vector of lines with a specific length.
data | vector containing the entries written to the section |
linewidth | Maximum length of the lines |
Definition at line 205 of file GeometryIGS.hpp.
void Bembel::WriteDATFile | ( | const std::vector< Patch > & | Geometry, |
const std::string & | file_name | ||
) |
exports a geometry from Bembel to a .dat file.
Limitation: This functions assumes a p-open knot vector without internal knots.
Geometry | std::vector of NURBS::Patch describing geometry |
file_name | path/filename to be written to |
Definition at line 204 of file GeometryIO.hpp.
int Bembel::writeDirectory | ( | std::string | file_name, |
std::vector< int > | start_idx, | ||
std::vector< int > | number_of_lines | ||
) |
Write the IGES Directory section into the given file.
file_name | File name to write the section in. |
start_idx | Vector containing the start lines of the sections. |
number_of_lines | Vector containing the lengths of the sections. |
Definition at line 336 of file GeometryIGS.hpp.
int Bembel::writeGlobalSection | ( | std::string | file_name | ) |
Write the IGES Global section into the given file.
file_name | File name to write the section in. |
Definition at line 265 of file GeometryIGS.hpp.
void Bembel::writeIGSFile | ( | const std::vector< Patch > & | geometry, |
std::string | file_name, | ||
const int | precision = 6 |
||
) |
Writes Geometry into an IGES file format.
geometry | PatchVector which is written to the file. |
file_name | File name to write to. |
precision | Significant number of digits for writing floats. |
Definition at line 481 of file GeometryIGS.hpp.
void Bembel::writeIGSHeader | ( | std::string | file_name | ) |
Write the IGES header into the given file.
file_name | File name to write the header in. |
Definition at line 236 of file GeometryIGS.hpp.
int Bembel::writeParameterSection | ( | std::string | file_name, |
const std::vector< std::string > & | section, | ||
const int | patch_idx, | ||
const int | start_count | ||
) |
This function writes a the parameter section of the IGES file.
file_name | path/filename pointing to the geometry file |
section | vector containing the lines to be written to the file |
patch_idx | index counting in uneven number |
start_count | Start counting the lines with this index |
Definition at line 181 of file GeometryIGS.hpp.
std::vector<std::string> Bembel::writePatchData | ( | const Patch & | patch, |
const int | precision | ||
) |
This Function writes the patch from Bembel into a vector which can be written into an IGES file.
This function assumes that the patch knot vectors do not contains internal nodes.
patch | Bembel patch containing all information |
precision | Number of significant digits to save floats |
Definition at line 385 of file GeometryIGS.hpp.
void Bembel::writeSection | ( | std::string | file_name, |
const std::vector< std::string > & | section, | ||
const char | section_char | ||
) |
This function writes a given section to the specified file.
file_name | path/filename pointing to the geometry file |
section | vector containing the lines to be written to the file |
section_char | char to describe the section. Use 'S', 'G' or 'D' |
Definition at line 158 of file GeometryIGS.hpp.