OGS
FileIO::GMSH::GMSHLineLoop Class Referencefinal

Detailed Description

Definition at line 23 of file GMSHLineLoop.h.

#include <GMSHLineLoop.h>

Public Member Functions

 GMSHLineLoop (bool is_sfc=false)
 
virtual ~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 22 of file GMSHLineLoop.cpp.

22: _is_sfc(is_sfc) {}

◆ ~GMSHLineLoop()

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

Definition at line 24 of file GMSHLineLoop.cpp.

25{
26 const std::size_t n_lines(_lines.size());
27 for (std::size_t k(0); k < n_lines; k++)
28 {
29 delete _lines[k];
30 }
31}
std::vector< GMSHLine * > _lines

References _lines.

Member Function Documentation

◆ isSurface()

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

Definition at line 28 of file GMSHLineLoop.h.

28{ return _is_sfc; }

References _is_sfc.

◆ setSurface()

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

Definition at line 29 of file GMSHLineLoop.h.

29{ _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 33 of file GMSHLineLoop.cpp.

35{
36 const std::size_t n_lines(_lines.size());
37 for (std::size_t k(0); k < n_lines; k++)
38 {
39 (_lines[k])->write(os, line_offset + k);
40 }
41 os << "Line Loop(" << line_offset + n_lines << ") = {";
42 for (std::size_t k(0); k < n_lines - 1; k++)
43 {
44 os << line_offset + k << ",";
45 }
46 os << line_offset + n_lines - 1 << "};\n";
47
48 if (_is_sfc)
49 {
50 // write plane surface
51 os << "Plane Surface (" << sfc_offset << ") = {"
52 << line_offset + n_lines << "};\n";
53 }
54}
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 35 of file GMSHLineLoop.h.

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

◆ _lines

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

Definition at line 34 of file GMSHLineLoop.h.

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


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