|
Nektar++
|
#include <TestAvgAssmbScatr.hpp>
Public Member Functions | |
| TestAvgAssmbScatr ()=default | |
| void | SetTestCase () |
| Fill the input from the element centroids, which a partition does not change, set the expected solution to the legacy average and create the operator. | |
| void | ReshapeInput () |
| Reshape the input to the interleave width of the execution space. | |
| bool | RunTestCase () |
| Average the input in place into the output, and return whether the average keeps the interleave width of the input. | |
| void | RunTestCaseTwice () |
| Average the input once into the expected solution and that once more into the output, which must then equal the expected solution. | |
| void | RunTestCaseContinuous () |
| Average the continuous legacy average, which must be left unchanged. | |
| void | RunTestCaseReuseFirst () |
| First of two inputs to one operator: the continuous legacy average at interleave width 1, averaged in place in the output, which must be left unchanged. | |
| void | RunTestCaseReuseSecond () |
| Second of two inputs to the same operator: the discontinuous input at the interleave width of the execution space, averaged into the output, which must equal the legacy average. | |
| void | ExpectedSolution () |
| Set the expected solution to AvgAssemble() then GlobalToLocal() of the input, per component. | |
Public Member Functions inherited from TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField > | |
| 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::shared_ptr< AvgAssmbScatrOp< TData > > | fixt_op |
| Operator under test, created once per test case. | |
Additional Inherited Members | |
Static Public Member Functions inherited from TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField > | |
| 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::Coeff, FieldState::Coeff, ContField > | |
| 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 |
Definition at line 63 of file TestAvgAssmbScatr.hpp.
|
default |
|
inline |
Set the expected solution to AvgAssemble() then GlobalToLocal() of the input, per component.
Definition at line 190 of file TestAvgAssmbScatr.hpp.
References Nektar::Collections::eNoCollection, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_expected, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_explist, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_in, Nektar::LibUtilities::Field< TData, TState >::GetNumComponents(), graph, Nektar::SpatialDomains::MeshGraphIO::Read(), TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::session, and Nektar::LibUtilities::Field< TData, TState >::ToArray().
Referenced by TestAvgAssmbScatr< TData >::SetTestCase().
|
inline |
Reshape the input to the interleave width of the execution space.
Definition at line 124 of file TestAvgAssmbScatr.hpp.
References TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_in, Nektar::MultiRegions::Operator< TData >::GetOpExecSpace(), Nektar::LibUtilities::Field< TData, TState >::ReshapeStorage(), and TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::session.
Referenced by TestAvgAssmbScatr< TData >::RunTestCase(), TestAvgAssmbScatr< TData >::RunTestCaseContinuous(), TestAvgAssmbScatr< TData >::RunTestCaseReuseSecond(), and TestAvgAssmbScatr< TData >::RunTestCaseTwice().
|
inline |
Average the input in place into the output, and return whether the average keeps the interleave width of the input.
Definition at line 136 of file TestAvgAssmbScatr.hpp.
References TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_in, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_out, Nektar::LibUtilities::Field< TData, TState >::GetInterleaveWidth(), and TestAvgAssmbScatr< TData >::ReshapeInput().
|
inline |
Average the continuous legacy average, which must be left unchanged.
Definition at line 160 of file TestAvgAssmbScatr.hpp.
References TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_expected, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_in, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_out, and TestAvgAssmbScatr< TData >::ReshapeInput().
|
inline |
First of two inputs to one operator: the continuous legacy average at interleave width 1, averaged in place in the output, which must be left unchanged.
Definition at line 172 of file TestAvgAssmbScatr.hpp.
References TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_expected, and TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_out.
|
inline |
Second of two inputs to the same operator: the discontinuous input at the interleave width of the execution space, averaged into the output, which must equal the legacy average.
Definition at line 182 of file TestAvgAssmbScatr.hpp.
References TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_in, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_out, and TestAvgAssmbScatr< TData >::ReshapeInput().
|
inline |
Average the input once into the expected solution and that once more into the output, which must then equal the expected solution.
Definition at line 149 of file TestAvgAssmbScatr.hpp.
References TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_expected, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_in, TestAvgAssmbScatr< TData >::fixt_op, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_out, and TestAvgAssmbScatr< TData >::ReshapeInput().
|
inline |
Fill the input from the element centroids, which a partition does not change, set the expected solution to the legacy average and create the operator.
Definition at line 76 of file TestAvgAssmbScatr.hpp.
References Nektar::MultiRegions::AvgAssmbScatrOp< TData >::Create(), el, TestAvgAssmbScatr< TData >::ExpectedSolution(), TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_explist, TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::fixt_in, TestAvgAssmbScatr< TData >::fixt_op, Nektar::LibUtilities::Field< TData, TState >::GetBlocks(), Nektar::MultiRegions::GetCollection(), Nektar::LibUtilities::Field< TData, TState >::GetNumComponents(), and TestOp< TData, FieldState::Coeff, FieldState::Coeff, ContField >::session.
| std::shared_ptr<AvgAssmbScatrOp<TData> > TestAvgAssmbScatr< TData >::fixt_op |
Operator under test, created once per test case.
Definition at line 71 of file TestAvgAssmbScatr.hpp.
Referenced by TestAvgAssmbScatr< TData >::RunTestCaseTwice(), and TestAvgAssmbScatr< TData >::SetTestCase().