OGS
FileIO::GMSH::GMSHLineLoop Class Referencefinal

Detailed Description

Definition at line 15 of file GMSHLineLoop.h.

#include <GMSHLineLoop.h>

Public Member Functions

 GMSHLineLoop (bool is_sfc=false)
 ~GMSHLineLoop ()
bool isSurface () const
void setSurface (bool is_sfc)
void write (std::ostream &os, std::size_t line_offset, std::size_t sfc_offset=0) const

Private Attributes

std::vector< GMSHLine * > _lines
bool _is_sfc

Constructor & Destructor Documentation

◆ GMSHLineLoop()

FileIO::GMSH::GMSHLineLoop::GMSHLineLoop ( bool is_sfc = false)
explicit

Definition at line 14 of file GMSHLineLoop.cpp.

14: _is_sfc(is_sfc) {}

References _is_sfc.

◆ ~GMSHLineLoop()

FileIO::GMSH::GMSHLineLoop::~GMSHLineLoop ( )

Definition at line 16 of file GMSHLineLoop.cpp.

17{
18 const std::size_t n_lines(_lines.size());
19 for (std::size_t k(0); k < n_lines; k++)
20 {
21 delete _lines[k];
22 }
23}
std::vector< GMSHLine * > _lines

References _lines.

Member Function Documentation

◆ isSurface()

bool FileIO::GMSH::GMSHLineLoop::isSurface ( ) const
inline

Definition at line 20 of file GMSHLineLoop.h.

20{ return _is_sfc; }

References _is_sfc.

◆ setSurface()

void FileIO::GMSH::GMSHLineLoop::setSurface ( bool is_sfc)
inline

Definition at line 21 of file GMSHLineLoop.h.

21{ _is_sfc = is_sfc; }

References _is_sfc.

◆ write()

void FileIO::GMSH::GMSHLineLoop::write ( std::ostream & os,
std::size_t line_offset,
std::size_t sfc_offset = 0 ) const

Definition at line 25 of file GMSHLineLoop.cpp.

27{
28 const std::size_t n_lines(_lines.size());
29 for (std::size_t k(0); k < n_lines; k++)
30 {
31 (_lines[k])->write(os, line_offset + k);
32 }
33 os << "Line Loop(" << line_offset + n_lines << ") = {";
34 for (std::size_t k(0); k < n_lines - 1; k++)
35 {
36 os << line_offset + k << ",";
37 }
38 os << line_offset + n_lines - 1 << "};\n";
39
40 if (_is_sfc)
41 {
42 // write plane surface
43 os << "Plane Surface (" << sfc_offset << ") = {"
44 << line_offset + n_lines << "};\n";
45 }
46}
void write(std::ostream &os, std::size_t line_offset, std::size_t sfc_offset=0) const

References _is_sfc, _lines, and write().

Referenced by write().

Member Data Documentation

◆ _is_sfc

bool FileIO::GMSH::GMSHLineLoop::_is_sfc
private

Definition at line 27 of file GMSHLineLoop.h.

Referenced by GMSHLineLoop(), isSurface(), setSurface(), and write().

◆ _lines

std::vector<GMSHLine*> FileIO::GMSH::GMSHLineLoop::_lines
private

Definition at line 26 of file GMSHLineLoop.h.

Referenced by ~GMSHLineLoop(), and write().


The documentation for this class was generated from the following files: