namedBlock Class Reference

Gives name to a block. More...

Inheritance diagram for namedBlock:
[legend]
Collaboration diagram for namedBlock:
[legend]

Public Member Functions

 TypeNameNoDebug ("name")
 Runtime type information. More...
 
 namedBlock (const dictionary &dict, const label index, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, Istream &is)
 Construct from Istream setting points list. More...
 
virtual ~namedBlock ()=default
 Destructor. More...
 
- Public Member Functions inherited from word
 word ()=default
 Default construct. More...
 
 word (const word &)=default
 Copy construct. More...
 
 word (word &&w)=default
 Move construct. More...
 
 word (const string &s, bool doStrip=true)
 Copy construct from Foam::string. More...
 
 word (string &&s, bool doStrip=true)
 Move construct from Foam::string. More...
 
 word (const std::string &s, bool doStrip=true)
 Copy construct from std::string. More...
 
 word (std::string &&s, bool doStrip=true)
 Move construct from std::string. More...
 
 word (const char *s, bool doStrip=true)
 Copy from character array. More...
 
 word (const char *s, size_type len, bool doStrip)
 Copy from buffer for a maximum number of characters. More...
 
 word (Istream &is)
 Construct from Istream. More...
 
void stripInvalid ()
 Strip invalid characters from this word. More...
 
word lessExt () const
 Return word without extension (part before last .) More...
 
word ext () const
 Return file name extension (part after last .) More...
 
wordext (const word &ending)
 Append a '.' and the ending, and return the object. More...
 
wordoperator= (const word &s)
 Copy assignment, no character validation required. More...
 
wordoperator= (word &&s)
 Move assignment, no character validation required. More...
 
wordoperator= (const string &s)
 Copy assignment from Foam::string, stripping invalid characters. More...
 
wordoperator= (string &&s)
 Move assignment from Foam::string, stripping invalid characters. More...
 
wordoperator= (const std::string &s)
 Copy assignment from std::string, stripping invalid characters. More...
 
wordoperator= (std::string &&s)
 Move assignment from std::string, stripping invalid characters. More...
 
wordoperator= (const char *s)
 Copy, stripping invalid characters. More...
 
template<class PrimitiveType >
Foam::word printf (const char *fmt, const PrimitiveType &val)
 
template<class PrimitiveType >
Foam::word printf (const std::string &fmt, const PrimitiveType &val)
 
bool hasExt () const
 Various checks for extensions. More...
 
bool hasExt (const char *ending) const
 Various checks for extensions. More...
 
bool hasExt (const std::string &ending) const
 Various checks for extensions. More...
 
bool hasExt (const wordRe &ending) const
 Various checks for extensions. More...
 
bool removeExt ()
 Remove extension, returning true if string changed. More...
 
- Public Member Functions inherited from string
 string ()=default
 Default construct. More...
 
 string (const std::string &str)
 Copy construct from std::string. More...
 
 string (std::string &&str)
 Move construct from std::string. More...
 
 string (const char *str)
 Construct as copy of character array. More...
 
 string (const char *str, const size_type len)
 Construct as copy with a maximum number of characters. More...
 
 string (const char c)
 Construct from a single character. More...
 
 string (const size_type len, const char c)
 Construct fill copies of a single character. More...
 
 string (Istream &is)
 Construct from Istream. More...
 
bool match (const std::string &text) const
 Test for equality. More...
 
stringreplace (const std::string &s1, const std::string &s2, size_type pos=0)
 
stringreplaceAll (const std::string &s1, const std::string &s2, size_type pos=0)
 
stringreplaceAny (const std::string &s1, const char c2, size_type pos=0)
 
stringexpand (const bool allowEmpty=false)
 
bool removeRepeated (const char character)
 Remove repeated characters. More...
 
bool removeStart (const std::string &text)
 Remove the given text from the start of the string. More...
 
bool removeStart (const char c)
 Remove leading character, unless string is a single character. More...
 
bool removeEnd (const std::string &text)
 Remove the given text from the end of the string. More...
 
bool removeEnd (const char c)
 Remove trailing character, unless string is a single character. More...
 
void swap (std::string &str)
 Swap contents. Self-swapping is a no-op. More...
 
bool operator() (const std::string &text) const
 Test for equality. Allows use as a predicate. More...
 
bool starts_with (const std::string &s) const
 True if string starts with the given prefix (cf. C++20) More...
 
bool starts_with (const char c) const
 True if string starts with the given character (cf. C++20) More...
 
bool ends_with (const std::string &s) const
 True if string ends with the given suffix (cf. C++20) More...
 
bool ends_with (const char c) const
 True if string ends with the given character (cf. C++20) More...
 
size_type count (const char c) const
 
bool startsWith (const std::string &s) const
 Deprecated(2019-11) More...
 
bool endsWith (const std::string &s) const
 Deprecated(2019-11) More...
 
bool removeTrailing (const char c)
 Deprecated(2019-11) More...
 
- Public Member Functions inherited from block
 TypeName ("block")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, block, Istream,(const dictionary &dict, const label index, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, Istream &is),(dict, index, vertices, edges, faces, is))
 
 block (const cellShape &bshape, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, const labelVector &density, const UList< gradingDescriptors > &expand=UList< gradingDescriptors >::null(), const word &zoneName="")
 Construct from components. Optional zone name. More...
 
 block (const dictionary &dict, const label index, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, Istream &is)
 Construct from components with Istream. More...
 
 block (const blockDescriptor &blockDesc)
 Construct from a block definition. More...
 
autoPtr< blockclone () const
 Clone. More...
 
virtual ~block ()=default
 Destructor. More...
 
const pointFieldpoints () const noexcept
 The points for filling the block. More...
 
const List< hexCell > & cells () const
 The hex cells for filling the block. More...
 
const FixedList< List< FixedList< label, 4 > >, 6 > & boundaryPatches () const noexcept
 The boundary patch faces for the block. More...
 
cellShapeList shapes () const
 The (hex) cell shapes for filling the block. More...
 
- Public Member Functions inherited from blockDescriptor
 blockDescriptor (const blockDescriptor &)=default
 Copy construct. More...
 
void operator= (const blockDescriptor &)=delete
 No copy assignment. More...
 
 blockDescriptor (const cellShape &bshape, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, const labelVector &density, const UList< gradingDescriptors > &expand=UList< gradingDescriptors >::null(), const word &zoneName=word::null)
 Construct from components. Optional zone name. More...
 
 blockDescriptor (const dictionary &dict, const label blockIndex, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, Istream &is)
 Construct from Istream. More...
 
const pointFieldvertices () const noexcept
 Reference to point field defining the block mesh. More...
 
const blockFaceListblockFaces () const noexcept
 Return reference to the list of curved faces. More...
 
const cellShapeblockShape () const noexcept
 Return the block shape. More...
 
const labelVectordensity () const noexcept
 The mesh density (number of cells) in the i,j,k directions. More...
 
const List< gradingDescriptors > & grading () const noexcept
 Expansion ratios in all directions. More...
 
const wordzoneName () const noexcept
 Return the (optional) zone name. More...
 
const FixedList< label, 6 > & curvedFaces () const noexcept
 Curved-face labels for each block-face (-1 for flat faces) More...
 
label nCurvedFaces () const noexcept
 Number of curved faces in this block. More...
 
const pointblockPoint (const label i) const
 Return block point for local label i. More...
 
label facePointLabel (const direction facei, const label i, const label j) const
 
bool vertex (const label i, const label j, const label k) const
 True if point i,j,k addresses a block vertex. More...
 
bool edge (const label i, const label j, const label k) const
 True if point i,j,k addresses a block edge. More...
 
int edgesPointsWeights (pointField(&edgesPoints)[12], scalarList(&edgesWeights)[12]) const
 Calculate the points and weights for all edges. More...
 
bool edgePointsWeights (const label edgei, pointField &edgePoints, scalarList &edgeWeights, const label nDiv, const gradingDescriptors &gd=gradingDescriptors()) const
 
bool edgePointsWeights (const label edgei, pointField &edgePoints, scalarList &edgeWeights) const
 Calculate points and weights for specified edge. More...
 
bool flatFaceOrEdge (const label i, const label j, const label k) const
 Return true if point i,j,k addresses a block flat face or edge. More...
 
FixedList< pointField, 6 > facePoints (const pointField &points) const
 Return the list of face-points for all of the faces of the block. More...
 
void correctFacePoints (FixedList< pointField, 6 > &) const
 Correct the location of the given face-points. More...
 
InfoProxy< blockDescriptorinfo () const
 Return info proxy. More...
 
- Public Member Functions inherited from ijkMesh
 ijkMesh ()
 Construct zero-sized. More...
 
 ijkMesh (const labelVector &ijk)
 Construct with addressing. More...
 
 ijkMesh (const label nx, const label ny, const label nz)
 Construct with addressing. More...
 
label nPoints () const
 The number of mesh points (nx+1)*(ny+1)*(nz+1) in the i-j-k mesh. More...
 
label nCells () const
 The number of mesh cells (nx*ny*nz) in the i-j-k mesh. More...
 
label nFaces () const
 The total number of mesh faces in the i-j-k mesh. More...
 
label nInternalFaces () const
 The number of internal faces in the i-j-k mesh. More...
 
label nBoundaryFaces () const
 The number of boundary faces in the i-j-k mesh. More...
 
label nBoundaryFaces (const direction shapeFacei) const
 The number of boundary faces on the box face. More...
 
label cellLabel (const label i, const label j, const label k) const
 The linear cell index for an i-j-k position - same as index() More...
 
label cellLabel (const labelVector &ijk) const
 The linear cell index for an i-j-k position - same as index() More...
 
label pointLabel (const label i, const label j, const label k) const
 The linear point index for an i-j-k position. More...
 
label pointLabel (const labelVector &ijk) const
 The linear point index for an i-j-k position. More...
 
hexCell vertLabels (const label i, const label j, const label k) const
 The hex cell vertices for an i-j-k position. More...
 
hexCell vertLabels (const labelVector &ijk) const
 The hex cell vertices for an i-j-k position. More...
 
- Public Member Functions inherited from ijkAddressing
 ijkAddressing ()
 Construct zero-size addressing. More...
 
 ijkAddressing (const labelVector &ijk)
 Construct with addressing. More...
 
 ijkAddressing (const label ni, const label nj, const label nk)
 Construct with addressing components. More...
 
bool empty () const
 Addressing is considered empty if any component is zero. More...
 
const labelVectorsizes () const
 The (i,j,k) addressing dimensions. More...
 
labelVectorsizes ()
 Return the (i,j,k) dimensions for modification. More...
 
label size () const
 Return the total i*j*k size. More...
 
const label & size (const vector::components cmpt) const
 The addressing dimension in the given direction. More...
 
void clear ()
 Reset to (0,0,0) sizing. More...
 
void reset (const label ni, const label nj, const label nk)
 Change the sizing parameters. More...
 
void reset (const labelVector &newSizes)
 Change the sizing parameters. More...
 
label index (const label i, const label j, const label k) const
 Linear addressing index (offset) for an (i,j,k) position. More...
 
label index (const labelVector &ijk) const
 Linear addressing index (offset) for an (i,j,k) position. More...
 
labelVector index (const label idx) const
 The (i,j,k) indexing from linear addressing. More...
 
void checkIndex (const label i, const label j, const label k, const bool allowExtra=false) const
 Check indices are within ni,nj,nk range. More...
 
void checkIndex (const labelVector &ijk, const bool allowExtra=false) const
 Check indices are within ni,nj,nk range. More...
 
void checkSizes () const
 Check that all components of sizes() are non-negative. More...
 
void checkSizes (const labelVector &other) const
 Check that all components of sizes() match. More...
 
void checkSizes (const label nTotal) const
 Check that the total size matches. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from word
template<class PrimitiveType >
static word printf (const char *fmt, const PrimitiveType &val)
 Use a printf-style formatter for a primitive. More...
 
template<class PrimitiveType >
static word printf (const std::string &fmt, const PrimitiveType &val)
 Use a printf-style formatter for a primitive. More...
 
static bool valid (char c)
 Is this character valid for a word? More...
 
static word validate (const std::string &s, const bool prefix=false)
 Construct validated word (no invalid characters). More...
 
static word validate (const char *first, const char *last, const bool prefix=false)
 
- Static Public Member Functions inherited from string
template<class StringType >
static bool valid (const std::string &str)
 Does the string contain valid characters only? More...
 
template<class StringType >
static bool stripInvalid (std::string &str)
 Strip invalid characters from the given string. More...
 
template<class StringType >
static StringType validate (const std::string &str)
 Return a valid String from the given string. More...
 
- Static Public Member Functions inherited from block
static autoPtr< blockNew (const dictionary &dict, const label index, const pointField &points, const blockEdgeList &edges, const blockFaceList &faces, Istream &)
 New function which constructs and returns pointer to a block. More...
 
- Static Public Member Functions inherited from blockDescriptor
static void write (Ostream &, const label blocki, const dictionary &)
 Write block index with dictionary lookup. More...
 
- Static Public Attributes inherited from word
static const char *const typeName = "word"
 The typeName. More...
 
static int debug
 Debugging. More...
 
static const word null
 An empty word. More...
 
- Static Public Attributes inherited from string
static const char *const typeName = "string"
 The type name "string". More...
 
static int debug
 The debug flag. More...
 
static const string null
 An empty string. More...
 
- Protected Member Functions inherited from string
std::string::size_type find_ext () const
 Find position of a file extension dot, return npos on failure. More...
 
word ext () const
 Return file name extension (part after last .) More...
 
bool ext (const word &ending)
 Append a '.' and the ending. More...
 
bool hasPath () const
 Return true if it contains a '/' character. More...
 
bool hasExt () const
 Return true if it has an extension or simply ends with a '.'. More...
 
bool hasExt (const char *ending) const
 Return true if the extension is the same as the given ending. More...
 
bool hasExt (const std::string &ending) const
 Return true if the extension is the same as the given ending. More...
 
bool hasExt (const wordRe &ending) const
 Return true if the extension matches the given ending. More...
 
bool removeExt ()
 Remove extension, returning true if string changed. More...
 
bool removePath ()
 Remove leading path, returning true if string changed. More...
 
- Static Protected Member Functions inherited from string
static std::string::size_type find_ext (const std::string &str)
 Find position of a file extension dot, return npos on failure. More...
 
template<class PrimitiveType >
static std::string::size_type string_printf (std::string &output, const char *fmt, const PrimitiveType &val)
 A printf-style formatter for a primitive. More...
 
template<class PrimitiveType >
static std::string::size_type string_printf (std::string &output, const std::string &fmt, const PrimitiveType &val)
 A printf-style formatter for a primitive. More...
 

Detailed Description

Gives name to a block.

Source files

Definition at line 53 of file namedBlock.H.

Constructor & Destructor Documentation

◆ namedBlock()

namedBlock ( const dictionary dict,
const label  index,
const pointField vertices,
const blockEdgeList edges,
const blockFaceList faces,
Istream is 
)

Construct from Istream setting points list.

Definition at line 46 of file namedBlock.C.

References dictionary::add(), dict, dictionary::findDict(), ijkAddressing::index(), and Foam::vertices().

Here is the call graph for this function:

◆ ~namedBlock()

virtual ~namedBlock ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeNameNoDebug()

TypeNameNoDebug ( "name"  )

Runtime type information.


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