OGS
FileIO::GMSH::GMSHLineLoop Class Referencefinal

Detailed Description

Definition at line 22 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 21 of file GMSHLineLoop.cpp.

21 : _is_sfc(is_sfc) {}

◆ ~GMSHLineLoop()

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

Definition at line 23 of file GMSHLineLoop.cpp.

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

References _lines.

Member Function Documentation

◆ isSurface()

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

Definition at line 27 of file GMSHLineLoop.h.

27 { return _is_sfc; }

References _is_sfc.

◆ setSurface()

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

Definition at line 28 of file GMSHLineLoop.h.

28 { _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 32 of file GMSHLineLoop.cpp.

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

References _is_sfc, and _lines.

Member Data Documentation

◆ _is_sfc

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

Definition at line 34 of file GMSHLineLoop.h.

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

◆ _lines

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

Definition at line 33 of file GMSHLineLoop.h.

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


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