|
Nektar++
|
#include <AeroForcesOpImpl.hpp>
Classes | |
| struct | BlockBoundary |
The boundary quadrature points on the elements of one block, in the operator's memory space, for a velocity gradient at one interleave width. The points are sorted by the storage offset of their first gradient source at that width, so that neighbouring threads read neighbouring entries of the gradient wherever the boundary allows. Each source is held as its storage offset within a component: that of the gradient at the width the points are sorted for, and that of the pressure at interleave width one (first) and at m_implInterleaveWidth (second), so that the pressure is read at either width. The normals and moment arms are stored point-minor, component d of point p at d * nPoints + p. More... | |
| struct | BlockBoundaryHost |
| The boundary quadrature points on the elements of one block, as they are gathered at configuration, with the normals and moment arms stored point-major. More... | |
| struct | RestrictionHost |
Restriction of boundary quadrature points from the elements of one block, as it is gathered at configuration: point i has the entries from rowOffset[i] up to rowOffset[i + 1], each reading quadrature point sourcePoint of element sourceElement of the block with its weight. A point whose restriction is a gather has one entry of weight one. More... | |
| struct | VolumeLocation |
Public Member Functions | |
| AeroForcesOpImpl (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) | |
Public Member Functions inherited from Nektar::AeroForcesOp< TData > | |
| void | Configure (const std::vector< unsigned int > &velocityComponents, const MultiRegions::ExpListSharedPtr &pressureExpansion, const unsigned int pressureComponent, const std::vector< bool > &selectedBoundaryRegions, const TData rho, const TData mu, const std::array< TData, 3 > &pivot) |
velocityComponents and pressureComponent are the indices of the velocity and pressure in the fields whose gradient and values Apply() receives, which may hold further components. | |
| void | Apply (LibUtilities::Field< TData, FieldState::Phys > &pressure, LibUtilities::Field< TData, FieldState::Phys > &velocityGradient) |
| Collective: every rank must call it. | |
| void | operator() (LibUtilities::Field< TData, FieldState::Phys > &pressure, LibUtilities::Field< TData, FieldState::Phys > &velocityGradient) |
| Collective: as Apply(). | |
| void | SetRootOnly (const bool rootOnly) |
Reduce the results of the next Apply() to rank zero alone if rootOnly, else to every rank. | |
| std::array< TData, 3 > | GetPressureForce () |
| Pressure force from the last Apply(). | |
| std::array< TData, 3 > | GetViscousForce () |
| Viscous force from the last Apply(). | |
| std::array< TData, 3 > | GetPressureMoment () |
| Moment of the pressure traction about the pivot from the last Apply(). | |
| std::array< TData, 3 > | GetViscousMoment () |
| Moment of the viscous traction about the pivot from the last Apply(). | |
Public Member Functions inherited from Nektar::MultiRegions::Operator< TData > | |
| virtual | ~Operator ()=default |
| Operator (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > components) | |
| Construct the interface part of a concrete operator; called by the factory-registered creator functions. | |
Static Public Member Functions | |
| static std::unique_ptr< MultiRegions::Operator< TData > > | Instantiate (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) |
Static Public Member Functions inherited from Nektar::AeroForcesOp< TData > | |
| static std::shared_ptr< AeroForcesOp< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const std::string &execStr="") |
expansionList and components are those of the velocity. | |
Static Public Member Functions inherited from Nektar::MultiRegions::Operator< TData > | |
| template<template< typename > typename TOperator> | |
| static std::shared_ptr< TOperator< TData > > | Create (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > components, const std::string &execStr) |
| Create a concrete operator instance through the operator factory. | |
| static std::string | GetOpExecSpace (std::shared_ptr< LibUtilities::SessionReader > session, const bool warn=true) |
| Return the execution space name ("opExecSpace") for an operator. | |
| static const DefaultOpImplRule * | GetDefaultOpImplRule (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace) |
| Return the row of the default implementation table (DefaultOpImplTable.hpp) that a block of elements takes, or null if none does. | |
| static std::string | GetDefaultOpImpl (const StdRegions::StdExpansionSharedPtr &exp, const std::string &execSpace) |
| Return the implementation a block of elements takes when neither the command line nor the session names one for its operator. | |
| static std::vector< unsigned int > | GetDefaultInterleaveWidths (const MultiRegions::ExpListSharedPtr &expansionList) |
Return the default interleave widths, one per block of expansionList, that persistent Fields (e.g. solution storage, time-integration and linear-solver workspace) built on it should be constructed with. | |
| static bool | IsDiscontinuousProjection (std::shared_ptr< LibUtilities::SessionReader > session) |
| Return true if the session uses a Discontinuous (DG) projection. | |
Static Public Attributes | |
| static std::string | className |
Static Public Attributes inherited from Nektar::AeroForcesOp< TData > | |
| static const std::string | name = "AeroForces" |
Protected Member Functions | |
| std::map< int, VolumeLocation > | BuildVolumeLocations (const MultiRegions::ExpListSharedPtr &expansion) |
| void | v_Configure (const std::vector< unsigned int > &velocityComponents, const MultiRegions::ExpListSharedPtr &pressureExpansion, const unsigned int pressureComponent, const std::vector< bool > &selectedBoundaryRegions, const TData rho, const TData mu, const std::array< TData, 3 > &pivot) override |
| void | v_Apply (LibUtilities::Field< TData, FieldState::Phys > &pressure, LibUtilities::Field< TData, FieldState::Phys > &velocityGradient) override |
Protected Member Functions inherited from Nektar::AeroForcesOp< TData > | |
| AeroForcesOp (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components) | |
| ~AeroForcesOp () override=default | |
| std::array< TData, 3 > | GetResultVector (const unsigned int offset) |
The 3-vector at offset of the reduced result, read on the host. | |
Static Protected Member Functions | |
| static bool | CompressRestriction (const std::vector< TData > &restriction, const size_t nSrc, const size_t nDst, std::vector< size_t > &pointMap) |
| static std::vector< TData > | BuildRestriction (const LocalRegions::ExpansionSharedPtr &volume, const unsigned int trace, const LocalRegions::ExpansionSharedPtr &boundary) |
| static void | AppendRestriction (const std::vector< TData > &restriction, const size_t nSrc, const size_t nDst, const size_t element, RestrictionHost &host) |
Append the rows of the restriction of one boundary face, read from element element of a block, to host: one entry of weight one per point if the restriction is a gather, else the nonzero entries of each row. | |
| static size_t | StorageOffset (const size_t element, const size_t point, const size_t nPoints, const size_t interleaveWidth) |
Storage offset of quadrature point point of element element within a component of a block of interleave width interleaveWidth whose elements have nPoints quadrature points. | |
| static BlockBoundary | UploadBlockBoundary (const BlockBoundaryHost &host, const unsigned int nDim, const unsigned int gradientInterleaveWidth) |
Copy the boundary points of one block to the operator's memory space, sorted and laid out for a velocity gradient at interleave width gradientInterleaveWidth. | |
Protected Attributes | |
| MultiRegions::ExpListSharedPtr | m_pressureExpansion |
| std::vector< BlockBoundaryHost > | m_boundaryHost |
| The boundary points of each block, indexed by block, as they are gathered at configuration. | |
| std::vector< std::array< BlockBoundary, 2 > > | m_boundary |
| The boundary points of each block, indexed by block, for a velocity gradient at interleave width one (first) and at m_implInterleaveWidth (second); empty until a gradient is first read at that width. | |
| std::array< unsigned int, 3 > | m_velocityComponents {} |
| unsigned int | m_pressureComponent = 0 |
| unsigned int | m_dimension = 0 |
| unsigned int | m_numPlanes = 1 |
| Number of local planes, or 1 without a homogeneous direction. | |
| unsigned int | m_gradientDirections = 0 |
| Number of directions of each velocity component in the gradient. | |
| TData | m_planeWeight = TData(1) |
| Weight of each plane in the average over the planes. | |
| TData | m_rho = TData(1) |
| TData | m_mu = TData(1) |
Protected Attributes inherited from Nektar::AeroForcesOp< TData > | |
| bool | m_rootOnly = false |
| Whether Apply() reduces the results to rank zero alone. | |
| LibUtilities::MemoryRegion< TData > | m_result |
| Reduced result of Apply(), of size resultSize, allocated by Configure(). | |
Protected Attributes inherited from Nektar::MultiRegions::Operator< TData > | |
| MultiRegions::ExpListSharedPtr | m_expansionList |
| Expansion list the operator acts on. | |
| std::vector< std::string > | m_components |
| Names of the field components the operator was built for. | |
| LibUtilities::NekDataWarehouseSharedPtr | m_dataWarehouse |
| Data warehouse shared with the other operators on the expansion list, used to build and cache shared tables (basis matrices, mode indices, geometric factors) once. | |
Static Protected Attributes | |
| static constexpr unsigned int | m_implInterleaveWidth |
| Interleave width of the execution space: an input block is read at this width or at width one. | |
Static Protected Attributes inherited from Nektar::AeroForcesOp< TData > | |
| static constexpr unsigned int | pressureForce = 0 |
| Offsets of the 3-vectors in m_result. | |
| static constexpr unsigned int | viscousForce = 3 |
| static constexpr unsigned int | pressureMoment = 6 |
| static constexpr unsigned int | viscousMoment = 9 |
| static constexpr unsigned int | resultSize = 12 |
| Number of entries in m_result. | |
Private Types | |
| using | MemSpace = typename ExecSpace::memory_space |
Definition at line 54 of file AeroForcesOpImpl.hpp.
|
private |
Definition at line 56 of file AeroForcesOpImpl.hpp.
|
inline |
Definition at line 59 of file AeroForcesOpImpl.hpp.
|
inlinestaticprotected |
Append the rows of the restriction of one boundary face, read from element element of a block, to host: one entry of weight one per point if the restriction is a gather, else the nonzero entries of each row.
Definition at line 253 of file AeroForcesOpImpl.hpp.
References ASSERTL1, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::CompressRestriction(), Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::RestrictionHost::rowOffset, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::RestrictionHost::sourceElement, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::RestrictionHost::sourcePoint, and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::RestrictionHost::weight.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
inlinestaticprotected |
Definition at line 223 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
inlineprotected |
Definition at line 161 of file AeroForcesOpImpl.hpp.
References Nektar::MultiRegions::GetCollection().
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
inlinestaticprotected |
Definition at line 182 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::AppendRestriction().
|
inlinestatic |
Definition at line 69 of file AeroForcesOpImpl.hpp.
|
inlinestaticprotected |
Storage offset of quadrature point point of element element within a component of a block of interleave width interleaveWidth whose elements have nPoints quadrature points.
Definition at line 292 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::UploadBlockBoundary().
|
inlinestaticprotected |
Copy the boundary points of one block to the operator's memory space, sorted and laid out for a velocity gradient at interleave width gradientInterleaveWidth.
Definition at line 303 of file AeroForcesOpImpl.hpp.
References Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundaryHost::gradient, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundary::gradientRowOffset, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundary::gradientSource, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundary::gradientWeight, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_implInterleaveWidth, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundaryHost::momentArms, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundary::momentArms, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundaryHost::nGradientSrc, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundary::nPoints, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundaryHost::nPressureSrc, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundaryHost::pressure, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundary::pressureRowOffset, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundary::pressureSource, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundary::pressureWeight, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::RestrictionHost::rowOffset, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::StorageOffset(), Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundaryHost::weightedNormals, and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BlockBoundary::weightedNormals.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply().
|
inlineoverrideprotectedvirtual |
Implements Nektar::AeroForcesOp< TData >.
Definition at line 568 of file AeroForcesOpImpl.hpp.
References ASSERTL0, ASSERTL1, Nektar::ErrorUtil::efatal, Nektar::LibUtilities::Field< TData, TState >::GetBlocks(), Nektar::LibUtilities::Field< TData, TState >::GetNumHomoModes(), Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_boundary, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_boundaryHost, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_dimension, Nektar::MultiRegions::Operator< TData >::m_expansionList, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_gradientDirections, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_implInterleaveWidth, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_mu, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_numPlanes, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_planeWeight, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_pressureComponent, Nektar::AeroForcesOp< TData >::m_result, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_rho, Nektar::AeroForcesOp< TData >::m_rootOnly, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_velocityComponents, NEKERROR, Nektar::LibUtilities::ReduceSum, and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::UploadBlockBoundary().
|
inlineoverrideprotectedvirtual |
Implements Nektar::AeroForcesOp< TData >.
Definition at line 398 of file AeroForcesOpImpl.hpp.
References Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::AppendRestriction(), ASSERTL0, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BuildRestriction(), Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::BuildVolumeLocations(), Nektar::MultiRegions::e3DH1D, Nektar::eHostPinned, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_boundary, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_boundaryHost, Nektar::MultiRegions::Operator< TData >::m_components, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_dimension, Nektar::MultiRegions::Operator< TData >::m_expansionList, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_mu, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_numPlanes, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_planeWeight, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_pressureComponent, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_pressureExpansion, Nektar::AeroForcesOp< TData >::m_result, Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_rho, and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::m_velocityComponents.
|
static |
Definition at line 66 of file AeroForcesOpImpl.hpp.
|
protected |
The boundary points of each block, indexed by block, for a velocity gradient at interleave width one (first) and at m_implInterleaveWidth (second); empty until a gradient is first read at that width.
Definition at line 148 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
protected |
The boundary points of each block, indexed by block, as they are gathered at configuration.
Definition at line 144 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
protected |
Definition at line 151 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
protected |
Number of directions of each velocity component in the gradient.
Definition at line 155 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply().
|
staticconstexprprotected |
Interleave width of the execution space: an input block is read at this width or at width one.
Definition at line 138 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::UploadBlockBoundary(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply().
|
protected |
Definition at line 159 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
protected |
Number of local planes, or 1 without a homogeneous direction.
Definition at line 153 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
protected |
Weight of each plane in the average over the planes.
Definition at line 157 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
protected |
Definition at line 150 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
protected |
Definition at line 141 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
protected |
Definition at line 158 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().
|
protected |
Definition at line 149 of file AeroForcesOpImpl.hpp.
Referenced by Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Apply(), and Nektar::detail::AeroForcesOpImpl< ExecSpace, TData >::v_Configure().