|
Nektar++
|
The lift-and-project operator against the chain it replaces, IProductWRTPhysTrace (appending) + IProductWRTBase without integration + MultiplyByElmtInvMass + BwdTrans, on the mesh of the derived fixture with its expansions replaced: every element of the given expansion type, number of modes and number of points per direction. More...
#include <TestPhysLiftProject.hpp>
Public Member Functions | |
| TestPhysLiftProject ()=default | |
| bool | RunExpansion (const SpatialDomains::ExpansionType type, const int nmodes, const int npts, const TData tol) |
Run one expansion: type with nmodes modes and, when positive, npts points per direction (the type's own otherwise). | |
Public Member Functions inherited from TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField > | |
| TestOp ()=default | |
| virtual | ~TestOp () |
| void | Configure (void) |
| void | Configure3DH1 (const unsigned int nhomo=1) |
| void | Configure3DH2 (const unsigned int nhomoY=1, const unsigned int nhomoZ=1) |
| void | SetSession (void) |
| void | SetExpList (void) |
| void | SetExpList3DH1 (const unsigned int nhomo=1) |
| void | SetExpList3DH2 (const unsigned int nhomoY=1, const unsigned int nhomoZ=1) |
| virtual void | SetFixture (const unsigned int nhomo) |
| virtual bool | Compare (TData tol) |
| Compare this field to another field, with absolute tolerance tol. The two must have the same blocks and components; their interleave widths may differ. | |
Public Attributes | |
| std::set< std::string > | m_forms |
| The forms and geometry types the cases run so far reached, as "Pointwise/affine" and so on, with "/direct lift" where the Device SumFac and SumFacTOP implementations lift the trace directly (DirectLift()) and "/dense tail" where the Device SumFacTOP implementation applies the dense projector (PhysLiftProjectDenseTail()). | |
Protected Member Functions | |
| void | SetExpansions (const SpatialDomains::ExpansionType type, const int nmodes, const int npts) |
Read the mesh and give every element type with nmodes modes and npts points, then build the expansion list. | |
| void | RecordForms () |
| Note the form and geometry type of every block. | |
| bool | RunVariant (const bool lift, const bool append, const TData scale, const bool interleaved, const TData tol) |
| One variant: the operator and the chain from the same inputs. | |
Static Protected Member Functions | |
| static bool | DirectLift (const LocalRegions::ExpansionSharedPtr &exp) |
Whether the Device SumFac and SumFacTOP implementations lift the trace of the block of exp directly at every point: Pointwise blocks whose trace values lie at volume points, segments, and quadrilaterals and hexahedra whose traces have the volume points in every in-trace direction, and triangles, tetrahedra, prisms and pyramids of one point. | |
| static std::vector< TData > | Values (Field< TData, FieldState::Phys > &field, const TData seed) |
Values for field, element-local and different in every entry and component. | |
| static bool | Matches (const std::vector< TData > &out, const std::vector< TData > &expected, const TData tol) |
Whether out matches expected within tol times the largest entry of expected. | |
Additional Inherited Members | |
Static Public Member Functions inherited from TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField > | |
| static void | MixInterleaveWidths (TField &field) |
Put the blocks of field at alternating interleave widths, the execution space's vector width on even blocks and 1 on odd ones, reshaping the data in place: a field whose blocks differ in width, for an operator that must read any mix, such as the trace flux, which addresses each trace at the width of the element block it lies in. On Serial every width is 1 and nothing changes. | |
Protected Attributes inherited from TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField > | |
| std::string | meshName |
| Field< TData, stateIn > * | fixt_in |
| Field< TData, stateOut > * | fixt_out |
| Field< TData, stateIn > * | fixt_out_2 |
| Field< TData, stateOut > * | fixt_expected |
| std::shared_ptr< MultiRegions::ExpList > | fixt_explist |
| LibUtilities::SessionReaderSharedPtr | session |
The lift-and-project operator against the chain it replaces, IProductWRTPhysTrace (appending) + IProductWRTBase without integration + MultiplyByElmtInvMass + BwdTrans, on the mesh of the derived fixture with its expansions replaced: every element of the given expansion type, number of modes and number of points per direction.
Each case is run with and without the trace, with the scale left at one and overwriting, and with a scale and appending onto a field that already holds values. Where the execution space interleaves, the case is run again with the inputs handed in at the operator's width, which the weak DG right-hand side does, and the inputs are checked to come back intact.
Definition at line 70 of file TestPhysLiftProject.hpp.
|
default |
|
inlinestaticprotected |
Whether the Device SumFac and SumFacTOP implementations lift the trace of the block of exp directly at every point: Pointwise blocks whose trace values lie at volume points, segments, and quadrilaterals and hexahedra whose traces have the volume points in every in-trace direction, and triangles, tetrahedra, prisms and pyramids of one point.
Definition at line 150 of file TestPhysLiftProject.hpp.
References Nektar::LibUtilities::Hex, Nektar::MultiRegions::detail::PhysLiftProjectFormOf(), Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, Nektar::LibUtilities::Quad, Nektar::LibUtilities::Seg, Nektar::LibUtilities::Tet, and Nektar::LibUtilities::Tri.
Referenced by TestPhysLiftProject< TData >::RecordForms().
|
inlinestaticprotected |
Whether out matches expected within tol times the largest entry of expected.
Definition at line 324 of file TestPhysLiftProject.hpp.
Referenced by TestPhysLiftProject< TData >::RunVariant().
|
inlineprotected |
Note the form and geometry type of every block.
Definition at line 185 of file TestPhysLiftProject.hpp.
References TestPhysLiftProject< TData >::DirectLift(), Nektar::SpatialDomains::eDeformed, TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField >::fixt_explist, Nektar::MultiRegions::GetCollection(), Nektar::Collections::Collection::GetExpVector(), TestPhysLiftProject< TData >::m_forms, Nektar::MultiRegions::detail::PhysLiftProjectDenseTail(), and Nektar::MultiRegions::detail::PhysLiftProjectFormOf().
Referenced by TestPhysLiftProject< TData >::RunExpansion().
|
inline |
Run one expansion: type with nmodes modes and, when positive, npts points per direction (the type's own otherwise).
tol, relative to the largest entry of the reference. Definition at line 84 of file TestPhysLiftProject.hpp.
References TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField >::fixt_explist, TestPhysLiftProject< TData >::RecordForms(), TestPhysLiftProject< TData >::RunVariant(), TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField >::session, TestPhysLiftProject< TData >::SetExpansions(), and TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField >::SetSession().
|
inlineprotected |
One variant: the operator and the chain from the same inputs.
Definition at line 228 of file TestPhysLiftProject.hpp.
References Nektar::MultiRegions::BwdTransOp< TData >::Create(), Nektar::MultiRegions::IProductWRTBaseOp< TData >::Create(), Nektar::MultiRegions::IProductWRTPhysTraceOp< TData >::Create(), Nektar::MultiRegions::MultiplyByElmtInvMassOp< TData >::Create(), Nektar::MultiRegions::PhysLiftProjectOp< TData >::Create(), TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField >::fixt_explist, TestPhysLiftProject< TData >::Matches(), Nektar::LibUtilities::Field< TData, TState >::ReshapeStorage(), TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField >::session, sum, and TestPhysLiftProject< TData >::Values().
Referenced by TestPhysLiftProject< TData >::RunExpansion().
|
inlineprotected |
Read the mesh and give every element type with nmodes modes and npts points, then build the expansion list.
Definition at line 122 of file TestPhysLiftProject.hpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::SpatialDomains::MeshGraph::DefineBasisKeyFromExpansionType(), Nektar::Collections::eNoCollection, TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField >::fixt_explist, graph, Nektar::SpatialDomains::MeshGraphIO::Read(), and TestOp< TData, FieldState::Phys, FieldState::Phys, MultiRegions::DisContField >::session.
Referenced by TestPhysLiftProject< TData >::RunExpansion().
|
inlinestaticprotected |
Values for field, element-local and different in every entry and component.
Definition at line 215 of file TestPhysLiftProject.hpp.
Referenced by TestPhysLiftProject< TData >::RunVariant().
| std::set<std::string> TestPhysLiftProject< TData >::m_forms |
The forms and geometry types the cases run so far reached, as "Pointwise/affine" and so on, with "/direct lift" where the Device SumFac and SumFacTOP implementations lift the trace directly (DirectLift()) and "/dense tail" where the Device SumFacTOP implementation applies the dense projector (PhysLiftProjectDenseTail()).
Definition at line 117 of file TestPhysLiftProject.hpp.
Referenced by TestPhysLiftProject< TData >::RecordForms().