NeoN
A framework for CFD software
Loading...
Searching...
No Matches
NeoN::BoundaryData< ValueType > Class Template Reference

Represents the boundary fields for a computational domain. More...

#include <boundaryData.hpp>

Public Types

using BoundaryDataType = ValueType

Public Member Functions

 ~BoundaryData ()
 BoundaryData (const BoundaryData< ValueType > &rhs)
 Copy constructor.
 BoundaryData (BoundaryData< ValueType > &&rhs)
 Move constructor.
 BoundaryData (const Executor &exec, const BoundaryData< ValueType > &rhs)
 Copy constructor.
 BoundaryData (const Executor &exec, sizeType nBoundaryFaces, localIdx nBoundaryTypes)
 constructor with default initialized Vectors from sizes.
 BoundaryData (const Executor &exec, const std::vector< localIdx > &offsets)
 constructor from a given offsets vector @warn all members except offsets are default constructed
const Vector< ValueType > & value () const
 Get the view storing the computed values from the boundary condition.
Vector< ValueType > & value ()
 Get the view storing the computed values from the boundary condition.
const Vector< ValueType > & refValue () const
 Get the view storing the Dirichlet boundary values.
Vector< ValueType > & refValue ()
 Get the view storing the Dirichlet boundary values.
const Vector< scalar > & valueFraction () const
 Get the view storing the fraction of the boundary value.
Vector< scalar > & valueFraction ()
 Get the view storing the fraction of the boundary value.
const Vector< ValueType > & refGrad () const
 Get the view storing the Neumann boundary values.
Vector< ValueType > & refGrad ()
 Get the view storing the Neumann boundary values.
const Vector< int > & boundaryTypes () const
 Get the view storing the boundary types.
const Vector< localIdx > & offset () const
 Get the view storing the offsets of each boundary.
sizeType nBoundaries () const
 Get the number of boundaries.
sizeType nBoundaryFaces () const
 Get the number of boundary faces.
sizeType nBoundaryFaces (localIdx patchId) const
 Get the number of boundary faces for this patch.
const Executor & exec ()
BoundaryData< ValueType > & operator= (const BoundaryData< ValueType > &rhs)
BoundaryData< ValueType > & operator= (BoundaryData< ValueType > &&rhs)
void waitAll () const
std::pair< localIdx, localIdx > range (localIdx patchId) const
 Get the range for a given patchId.

Friends

struct NoWaitAccess
 Grants NoWaitAccess (and only it) access to valueNoWait().

Detailed Description

template<typename ValueType>
class NeoN::BoundaryData< ValueType >

Represents the boundary fields for a computational domain.

The BoundaryData class stores the boundary conditions and related information for a computational domain. It provides access to the computed values, reference values, value fractions, reference gradients, boundary types, offsets, and the number of boundaries and boundary faces.

Template Parameters
ValueTypeThe type of the underlying field values

Definition at line 42 of file boundaryData.hpp.

Member Typedef Documentation

◆ BoundaryDataType

template<typename ValueType>
using NeoN::BoundaryData< ValueType >::BoundaryDataType = ValueType

Definition at line 47 of file boundaryData.hpp.

Constructor & Destructor Documentation

◆ ~BoundaryData()

template<typename ValueType>
NeoN::BoundaryData< ValueType >::~BoundaryData ( )
inline

Definition at line 49 of file boundaryData.hpp.

◆ BoundaryData() [1/5]

template<typename ValueType>
NeoN::BoundaryData< ValueType >::BoundaryData ( const BoundaryData< ValueType > & rhs)
inline

Copy constructor.

Parameters
rhsThe boundaryVectors object to be copied.

Definition at line 61 of file boundaryData.hpp.

◆ BoundaryData() [2/5]

template<typename ValueType>
NeoN::BoundaryData< ValueType >::BoundaryData ( BoundaryData< ValueType > && rhs)
inline

Move constructor.

Note
The user-declared destructor and copy constructor suppress the implicit move constructor, so without this every move (e.g. Field's move constructor) copied all boundary vectors. Completes any in-flight processor-halo exchange of rhs first, so no pending MPI request refers to the moved buffers.
Parameters
rhsThe boundaryVectors object to be moved from.

Definition at line 76 of file boundaryData.hpp.

◆ BoundaryData() [3/5]

template<typename ValueType>
NeoN::BoundaryData< ValueType >::BoundaryData ( const Executor & exec,
const BoundaryData< ValueType > & rhs )
inline

Copy constructor.

Parameters
rhsThe boundaryVectors object to be copied.

Definition at line 89 of file boundaryData.hpp.

◆ BoundaryData() [4/5]

template<typename ValueType>
NeoN::BoundaryData< ValueType >::BoundaryData ( const Executor & exec,
sizeType nBoundaryFaces,
localIdx nBoundaryTypes )
inline

constructor with default initialized Vectors from sizes.

Parameters
exec- The executor
nBoundaryFaces- The total number of boundary faces
nBoundaryType- The total number of boundary patches

Definition at line 103 of file boundaryData.hpp.

◆ BoundaryData() [5/5]

template<typename ValueType>
NeoN::BoundaryData< ValueType >::BoundaryData ( const Executor & exec,
const std::vector< localIdx > & offsets )
inline

constructor from a given offsets vector @warn all members except offsets are default constructed

Parameters
exec- The executor
offsets- The total number of boundary faces

Definition at line 118 of file boundaryData.hpp.

Member Function Documentation

◆ boundaryTypes()

template<typename ValueType>
const Vector< int > & NeoN::BoundaryData< ValueType >::boundaryTypes ( ) const
inline

Get the view storing the boundary types.

Returns
The view storing the boundary types.

Definition at line 175 of file boundaryData.hpp.

◆ exec()

template<typename ValueType>
const Executor & NeoN::BoundaryData< ValueType >::exec ( )
inline

Definition at line 204 of file boundaryData.hpp.

◆ nBoundaries()

template<typename ValueType>
sizeType NeoN::BoundaryData< ValueType >::nBoundaries ( ) const
inline

Get the number of boundaries.

Returns
The number of boundaries.

Definition at line 187 of file boundaryData.hpp.

◆ nBoundaryFaces() [1/2]

template<typename ValueType>
sizeType NeoN::BoundaryData< ValueType >::nBoundaryFaces ( ) const
inline

Get the number of boundary faces.

Returns
The number of boundary faces.

Definition at line 193 of file boundaryData.hpp.

◆ nBoundaryFaces() [2/2]

template<typename ValueType>
sizeType NeoN::BoundaryData< ValueType >::nBoundaryFaces ( localIdx patchId) const
inline

Get the number of boundary faces for this patch.

Returns
The number of boundary faces for this patch.

Definition at line 199 of file boundaryData.hpp.

◆ offset()

template<typename ValueType>
const Vector< localIdx > & NeoN::BoundaryData< ValueType >::offset ( ) const
inline

Get the view storing the offsets of each boundary.

Returns
The view storing the offsets of each boundary.

Definition at line 181 of file boundaryData.hpp.

◆ operator=() [1/2]

template<typename ValueType>
BoundaryData< ValueType > & NeoN::BoundaryData< ValueType >::operator= ( BoundaryData< ValueType > && rhs)
inline

Definition at line 225 of file boundaryData.hpp.

◆ operator=() [2/2]

template<typename ValueType>
BoundaryData< ValueType > & NeoN::BoundaryData< ValueType >::operator= ( const BoundaryData< ValueType > & rhs)
inline

Definition at line 206 of file boundaryData.hpp.

◆ range()

template<typename ValueType>
std::pair< localIdx, localIdx > NeoN::BoundaryData< ValueType >::range ( localIdx patchId) const
inline

Get the range for a given patchId.

Returns
The number of boundary faces.

Definition at line 408 of file boundaryData.hpp.

◆ refGrad() [1/2]

template<typename ValueType>
Vector< ValueType > & NeoN::BoundaryData< ValueType >::refGrad ( )
inline

Get the view storing the Neumann boundary values.

Returns
The view storing the Neumann boundary values.

Definition at line 169 of file boundaryData.hpp.

◆ refGrad() [2/2]

template<typename ValueType>
const Vector< ValueType > & NeoN::BoundaryData< ValueType >::refGrad ( ) const
inline

Get the view storing the Neumann boundary values.

Returns
The view storing the Neumann boundary values.

Definition at line 163 of file boundaryData.hpp.

◆ refValue() [1/2]

template<typename ValueType>
Vector< ValueType > & NeoN::BoundaryData< ValueType >::refValue ( )
inline

Get the view storing the Dirichlet boundary values.

Returns
The view storing the Dirichlet boundary values.

Definition at line 151 of file boundaryData.hpp.

◆ refValue() [2/2]

template<typename ValueType>
const Vector< ValueType > & NeoN::BoundaryData< ValueType >::refValue ( ) const
inline

Get the view storing the Dirichlet boundary values.

Returns
The view storing the Dirichlet boundary values.

Definition at line 145 of file boundaryData.hpp.

◆ value() [1/2]

template<typename ValueType>
Vector< ValueType > & NeoN::BoundaryData< ValueType >::value ( )
inline

Get the view storing the computed values from the boundary condition.

Note
calls waitAll to ensure all boundary data is updated.
Returns
The view storing the computed values.

Definition at line 138 of file boundaryData.hpp.

◆ value() [2/2]

template<typename ValueType>
const Vector< ValueType > & NeoN::BoundaryData< ValueType >::value ( ) const
inline

Get the view storing the computed values from the boundary condition.

Note
calls waitAll to ensure all boundary data is updated.
Returns
The view storing the computed values.

Definition at line 126 of file boundaryData.hpp.

◆ valueFraction() [1/2]

template<typename ValueType>
Vector< scalar > & NeoN::BoundaryData< ValueType >::valueFraction ( )
inline

Get the view storing the fraction of the boundary value.

Returns
The view storing the fraction of the boundary value.

Definition at line 160 of file boundaryData.hpp.

◆ valueFraction() [2/2]

template<typename ValueType>
const Vector< scalar > & NeoN::BoundaryData< ValueType >::valueFraction ( ) const
inline

Get the view storing the fraction of the boundary value.

Returns
The view storing the fraction of the boundary value.

Definition at line 154 of file boundaryData.hpp.

◆ waitAll()

template<typename ValueType>
void NeoN::BoundaryData< ValueType >::waitAll ( ) const
inline

Definition at line 343 of file boundaryData.hpp.

◆ NoWaitAccess

template<typename ValueType>
friend struct NoWaitAccess
friend

Grants NoWaitAccess (and only it) access to valueNoWait().

Definition at line 416 of file boundaryData.hpp.


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