Nektar++
|
A helper class to deal with trace operations in the discontinuous Galerkin code. More...
#include <LocTraceToTraceMap.h>
Public Member Functions | |
LocTraceToTraceMap (const ExpList &locExp, const ExpListSharedPtr &trace, const Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > &elmtToTrace, const std::vector< bool > &LeftAdjacents) | |
Set up trace to trace mapping components. More... | |
virtual | ~LocTraceToTraceMap () |
void | Setup (const ExpList &locExp, const ExpListSharedPtr &trace, const Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > &elmtToTrace, const std::vector< bool > &LeftAdjacents) |
Set up member variables for a two-dimensional problem. More... | |
void | LocTracesFromField (const Array< OneD, const NekDouble > &field, Array< OneD, NekDouble > faces) |
Gather the local elemental traces in physical space from field using m_locTraceToFieldMap. Note traces are blocked together in similar trace point ordering. More... | |
void | FwdLocTracesFromField (const Array< OneD, const NekDouble > &field, Array< OneD, NekDouble > faces) |
Gather the forwards-oriented local traces in physical space from field using m_locTraceToFieldMap. More... | |
void | AddLocTracesToField (const Array< OneD, const NekDouble > &faces, Array< OneD, NekDouble > &field) |
Reverse process of LocTracesFromField() Add the local traces in physical space to field using m_locTraceToFieldMap. More... | |
void | ReshuffleLocTracesForInterp (const int dir, const Array< OneD, const NekDouble > &loctraces, Array< OneD, NekDouble > reshuffle) |
Reshuffle local elemental traces in physical space so that similar faces points are blocked together so they can then be interpolated with InterpLocTraceToTrace method. More... | |
void | UnshuffleLocTraces (const int dir, const Array< OneD, const NekDouble > &loctraces, Array< OneD, NekDouble > unshuffle) |
Unshuffle local elemental traces in physical space from similar faces points are blocked together to the local elemental trace format. More... | |
void | InterpLocTracesToTrace (const int dir, const Array< OneD, const NekDouble > &loctraces, Array< OneD, NekDouble > &traces) |
void | InterpLocEdgesToTrace (const int dir, const Array< OneD, const NekDouble > &locfaces, Array< OneD, NekDouble > &edges) |
Interpolate local trace edges to global trace edge point distributions where required. More... | |
void | InterpLocFacesToTrace (const int dir, const Array< OneD, const NekDouble > &locfaces, Array< OneD, NekDouble > faces) |
Interpolate local faces to trace face point distributions where required. More... | |
void | InterpLocTracesToTraceTranspose (const int dir, const Array< OneD, const NekDouble > &traces, Array< OneD, NekDouble > &loctraces) |
void | InterpLocEdgesToTraceTranspose (const int dir, const Array< OneD, const NekDouble > &edges, Array< OneD, NekDouble > &locedges) |
Transpose of interp local edges to Trace methods. More... | |
void | InterpLocFacesToTraceTranspose (const int dir, const Array< OneD, const NekDouble > &traces, Array< OneD, NekDouble > &loctraces) |
Transpose of interp local faces to Trace methods. More... | |
void | InterpTraceToLocTrace (const int dir, const Array< OneD, NekDouble > &traces, Array< OneD, NekDouble > &loctraces) |
void | InterpTraceToLocEdges (const int dir, const Array< OneD, const NekDouble > &locfaces, Array< OneD, NekDouble > &edges) |
Interpolate global trace edge to local trace edges point distributions where required. More... | |
void | InterpTraceToLocFaces (const int dir, const Array< OneD, const NekDouble > &faces, Array< OneD, NekDouble > &locfaces) |
Interpolate global trace edge to local trace edges point distributions where required. More... | |
void | AddTraceCoeffsToFieldCoeffs (const Array< OneD, const NekDouble > &trace, Array< OneD, NekDouble > &field) |
Add contributions from trace coefficients to the elemental field storage. More... | |
void | AddTraceCoeffsToFieldCoeffs (const int dir, const Array< OneD, const NekDouble > &race, Array< OneD, NekDouble > &field) |
Add contributions from backwards or forwards oriented trace coefficients to the elemental field storage. More... | |
void | CalcLocTracePhysToTraceIDMap (const ExpListSharedPtr &tracelist, const int ndim) |
void | CalcLocTracePhysToTraceIDMap_2D (const ExpListSharedPtr &tracelist) |
void | CalcLocTracePhysToTraceIDMap_3D (const ExpListSharedPtr &tracelist) |
int | GetNFwdLocTracePts () |
Return the number of ‘forward’ local trace points. More... | |
int | GetNLocTracePts () |
Return the number of local trace points. More... | |
const Array< OneD, const Array< OneD, bool > > & | GetLeftRightAdjacentExpFlag () const |
const Array< OneD, const Array< OneD, int > > & | GetLeftRightAdjacentExpId () const |
const Array< OneD, const Array< OneD, Array< OneD, int > > > & | GetTraceCoeffToLeftRightExpCoeffMap () const |
const Array< OneD, const Array< OneD, Array< OneD, int > > > & | GetTraceCoeffToLeftRightExpCoeffSign () const |
const Array< OneD, int > & | GetElemNeighbsNumb () const |
const Array< OneD, const Array< OneD, int > > & | GetElemNeighbsId () const |
const Array< OneD, const Array< OneD, int > > & | GetLocTracephysToTraceIDMap () const |
void | SetLocTracePhysToTraceIDMap (const Array< OneD, Array< OneD, int > > &inarray) |
const Array< OneD, const int > & | GetLocTraceToFieldMap () const |
void | TraceLocToElmtLocCoeffMap (const ExpList &locExp, const ExpListSharedPtr &trace) |
Set up maps between coefficients on trace and in cells. More... | |
Private Member Functions | |
void | FindElmtNeighbors (const ExpList &locExp, const ExpListSharedPtr &trace) |
Private Attributes | |
int | m_expdim |
Expansion Dimension we have setup for trace mapping. More... | |
int | m_nFwdLocTracePts |
The number of forward trace points. A local trace element is ‘forward’ if it is the side selected for the global trace. More... | |
int | m_nLocTracePts |
The number of local trace points. More... | |
int | m_nTracePts |
The number of global trace points. More... | |
Array< OneD, int > | m_locTraceToFieldMap |
A mapping from the local elemental trace points, arranged as all forwards traces followed by backwards traces, to elemental storage. More... | |
Array< OneD, Array< OneD, int > > | m_locTraceToElmtTraceMap |
A mapping from the local elemental trace points, arranged as all forwards traces followed by backwards traces, to elemental storage. More... | |
Array< OneD, Array< OneD, int > > | m_locInterpTraceToTraceMap |
A mapping from local trace points to the global trace. Dimension 0 holds forward traces, dimension 1 backward. More... | |
Array< OneD, Array< OneD, InterpLocTraceToTrace > > | m_interpTrace |
A mapping holding the type of interpolation needed for each local trace. Dimension 0 holds forward traces, dimension 1 backward. More... | |
Array< OneD, Array< OneD, DNekMatSharedPtr > > | m_interpTraceI0 |
Interpolation matrices for either 2D edges or first coordinate of 3D face. More... | |
Array< OneD, Array< OneD, DNekMatSharedPtr > > | m_interpTraceI1 |
Interpolation matrices for the second coordinate of 3D face, not used in 2D. More... | |
Array< OneD, Array< OneD, DNekMatSharedPtr > > | m_interpFromTraceI0 |
Interpolation matrices for either 2D edges or first coordinate of 3D face using going "from' to 'to' points (i.e. the reverse of other techniques) More... | |
Array< OneD, Array< OneD, DNekMatSharedPtr > > | m_interpFromTraceI1 |
Interpolation matrices for either 2D edges or first coordinate of 3D face using going "from' to 'to' points (i.e. the reverse of other techniques) More... | |
Array< OneD, Array< OneD, TraceInterpPoints > > | m_interpPoints |
Interpolation points key distributions to each of the local to global mappings. More... | |
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > | m_interpEndPtI0 |
Mapping to hold first coordinate direction endpoint interpolation, which can be more optimal if using Gauss-Radau distribution for triangles. More... | |
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > | m_interpEndPtI1 |
Mapping to hold second coordinate direction endpoint interpolation, which can be more optimal if using Gauss-Radau distribution for triangles. More... | |
Array< OneD, Array< OneD, int > > | m_interpNtraces |
Number of edges/faces on a 2D/3D element that require interpolation. More... | |
int | m_nTraceCoeffs [2] |
Number of forwards/backwards trace coefficients. More... | |
Array< OneD, Array< OneD, int > > | m_traceCoeffsToElmtMap |
Mapping from forwards/backwards trace coefficients to elemental coefficient storage. More... | |
Array< OneD, Array< OneD, int > > | m_traceCoeffsToElmtTrace |
Mapping from forwards/backwards trace coefficients to the position of the trace element in global storage. More... | |
Array< OneD, Array< OneD, int > > | m_traceCoeffsToElmtSign |
Sign array for mapping from forwards/backwards trace coefficients to local trace storage. More... | |
Array< OneD, Array< OneD, bool > > | m_leftRightAdjacentExpFlag |
Flag indicates whether the expansion that are the left & right adjacent to current trace exists. More... | |
Array< OneD, Array< OneD, int > > | m_leftRightAdjacentExpId |
The expansion ID that are the left & right adjacent to current trace. More... | |
Array< OneD, Array< OneD, Array< OneD, int > > > | m_traceCoeffToLeftRightExpCoeffMap |
The map of every coeff from current trace to the left & right adjacent expasion coeffs. More... | |
Array< OneD, Array< OneD, Array< OneD, int > > > | m_traceCoeffToLeftRightExpCoeffSign |
The sign of every coeff from current trace to the left & right adjacent expasion coeffs. More... | |
Array< OneD, Array< OneD, Array< OneD, int > > > | m_tracePhysToLeftRightExpPhysMap |
The map of every phys from current trace to the left & right adjacent expasion phys. This map is only used when no interpolation is needed in getting GetFwdBwdTracePhys. If interpolation is needed, it should be determined as the InnerProduct of m_locTraceToFieldMap matrix and interpolation matrix. More... | |
Array< OneD, int > | m_ElemNeighbsNumb |
Array< OneD, Array< OneD, int > > | m_ElemNeighbsId |
Array< OneD, Array< OneD, int > > | m_LocTracephysToTraceIDMap |
A helper class to deal with trace operations in the discontinuous Galerkin code.
This class sets up a number of mappings to deal with operations that take the "local trace" of an expansion list – i.e. the concatenation of all elemental facets – to the "global trace" – where the duplicate facets between connected elements have been removed.
Elements: Local trace: Global trace: +----+----+ + +---+ + + +---+ + + +---+ + +---+ + | | | | | | | | | | | | | | | | | | | | +----+----+ + +---+ + + +---+ + + +---+ + +---+ +
There are a number of mappings that are required that this class provides maps for:
These are documented in the member variables and class functions.
Definition at line 152 of file LocTraceToTraceMap.h.
Nektar::MultiRegions::LocTraceToTraceMap::LocTraceToTraceMap | ( | const ExpList & | locExp, |
const ExpListSharedPtr & | trace, | ||
const Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > & | elmtToTrace, | ||
const std::vector< bool > & | LeftAdjacents | ||
) |
Set up trace to trace mapping components.
locExp | Expansion list of full dimension problem. |
trace | Expansion list of one dimension lower trace. |
elmtToTrace | Mapping from elemental facets to trace. |
leftAdjacents | Vector of bools denoting forwards-oriented traces. |
Definition at line 60 of file LocTraceToTraceMap.cpp.
References Nektar::MultiRegions::ExpList::GetExp(), m_expdim, and Setup().
|
virtual |
Definition at line 75 of file LocTraceToTraceMap.cpp.
void Nektar::MultiRegions::LocTraceToTraceMap::AddLocTracesToField | ( | const Array< OneD, const NekDouble > & | faces, |
Array< OneD, NekDouble > & | field | ||
) |
Reverse process of LocTracesFromField() Add the local traces in physical space to field using m_locTraceToFieldMap.
field | Solution field in physical space |
faces | local traces. |
Definition at line 1046 of file LocTraceToTraceMap.cpp.
References Vmath::Assmb(), m_locTraceToFieldMap, and Vmath::Vadd().
void Nektar::MultiRegions::LocTraceToTraceMap::AddTraceCoeffsToFieldCoeffs | ( | const Array< OneD, const NekDouble > & | trace, |
Array< OneD, NekDouble > & | field | ||
) |
Add contributions from trace coefficients to the elemental field storage.
trace | Array of global trace coefficients. |
field | Array containing field coefficients storage. |
Definition at line 1884 of file LocTraceToTraceMap.cpp.
References m_nTraceCoeffs, m_traceCoeffsToElmtMap, m_traceCoeffsToElmtSign, and m_traceCoeffsToElmtTrace.
void Nektar::MultiRegions::LocTraceToTraceMap::AddTraceCoeffsToFieldCoeffs | ( | const int | dir, |
const Array< OneD, const NekDouble > & | trace, | ||
Array< OneD, NekDouble > & | field | ||
) |
Add contributions from backwards or forwards oriented trace coefficients to the elemental field storage.
dir | Selects forwards (0) or backwards (1) direction |
trace | Array of global trace coefficients. |
field | Array containing field coefficients storage. |
Definition at line 1904 of file LocTraceToTraceMap.cpp.
References m_nTraceCoeffs, m_traceCoeffsToElmtMap, m_traceCoeffsToElmtSign, and m_traceCoeffsToElmtTrace.
void Nektar::MultiRegions::LocTraceToTraceMap::CalcLocTracePhysToTraceIDMap | ( | const ExpListSharedPtr & | tracelist, |
const int | ndim | ||
) |
Definition at line 660 of file LocTraceToTraceMap.cpp.
References CalcLocTracePhysToTraceIDMap_2D(), CalcLocTracePhysToTraceIDMap_3D(), Nektar::ErrorUtil::efatal, and NEKERROR.
void Nektar::MultiRegions::LocTraceToTraceMap::CalcLocTracePhysToTraceIDMap_2D | ( | const ExpListSharedPtr & | tracelist | ) |
Definition at line 677 of file LocTraceToTraceMap.cpp.
References tinysimd::abs(), ASSERTL0, Vmath::Fill(), Vmath::Gathr(), Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::NekConstants::kNekZeroTol, m_interpNtraces, m_interpPoints, m_interpTrace, m_locInterpTraceToTraceMap, m_LocTracephysToTraceIDMap, m_nFwdLocTracePts, m_nLocTracePts, and m_nTracePts.
Referenced by CalcLocTracePhysToTraceIDMap().
void Nektar::MultiRegions::LocTraceToTraceMap::CalcLocTracePhysToTraceIDMap_3D | ( | const ExpListSharedPtr & | tracelist | ) |
Definition at line 755 of file LocTraceToTraceMap.cpp.
References tinysimd::abs(), ASSERTL0, Vmath::Fill(), Vmath::Gathr(), Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::NekConstants::kNekZeroTol, m_interpNtraces, m_interpPoints, m_interpTrace, m_locInterpTraceToTraceMap, m_LocTracephysToTraceIDMap, m_nFwdLocTracePts, m_nLocTracePts, and m_nTracePts.
Referenced by CalcLocTracePhysToTraceIDMap().
|
private |
Definition at line 907 of file LocTraceToTraceMap.cpp.
References ASSERTL0, Nektar::MultiRegions::ExpList::GetExp(), m_ElemNeighbsId, m_ElemNeighbsNumb, m_leftRightAdjacentExpFlag, m_leftRightAdjacentExpId, and Vmath::Vcopy().
Referenced by Setup().
void Nektar::MultiRegions::LocTraceToTraceMap::FwdLocTracesFromField | ( | const Array< OneD, const NekDouble > & | field, |
Array< OneD, NekDouble > | faces | ||
) |
Gather the forwards-oriented local traces in physical space from field using m_locTraceToFieldMap.
field | Solution field in physical space |
faces | Resulting local forwards-oriented traces. |
Definition at line 1063 of file LocTraceToTraceMap.cpp.
References Vmath::Gathr(), m_locTraceToFieldMap, and m_nFwdLocTracePts.
|
inline |
Definition at line 294 of file LocTraceToTraceMap.h.
References m_ElemNeighbsId.
|
inline |
Definition at line 287 of file LocTraceToTraceMap.h.
References m_ElemNeighbsNumb.
|
inline |
Definition at line 262 of file LocTraceToTraceMap.h.
References m_leftRightAdjacentExpFlag.
|
inline |
Definition at line 268 of file LocTraceToTraceMap.h.
References m_leftRightAdjacentExpId.
|
inline |
Definition at line 300 of file LocTraceToTraceMap.h.
References m_LocTracephysToTraceIDMap.
|
inline |
Definition at line 312 of file LocTraceToTraceMap.h.
References m_locTraceToFieldMap.
|
inline |
Return the number of ‘forward’ local trace points.
Definition at line 248 of file LocTraceToTraceMap.h.
References m_nFwdLocTracePts.
|
inline |
Return the number of local trace points.
Definition at line 256 of file LocTraceToTraceMap.h.
References m_nLocTracePts.
|
inline |
Definition at line 275 of file LocTraceToTraceMap.h.
References m_traceCoeffToLeftRightExpCoeffMap.
|
inline |
Definition at line 282 of file LocTraceToTraceMap.h.
References m_traceCoeffToLeftRightExpCoeffSign.
|
inline |
Interpolate local trace edges to global trace edge point distributions where required.
dir | Selects forwards (0) or backwards (1) direction. |
locfaces | Local trace edge storage. |
faces | Global trace edge storage |
Definition at line 1140 of file LocTraceToTraceMap.cpp.
References ASSERTL1, Blas::Ddot(), Blas::Dgemm(), Nektar::ErrorUtil::efatal, Nektar::MultiRegions::eInterpDir0, Nektar::MultiRegions::eInterpEndPtDir0, Nektar::MultiRegions::eNoInterp, Nektar::LibUtilities::PointsKey::GetNumPoints(), m_interpEndPtI0, m_interpNtraces, m_interpPoints, m_interpTrace, m_interpTraceI0, m_locInterpTraceToTraceMap, m_nTracePts, NEKERROR, Vmath::Scatr(), and Vmath::Vcopy().
Referenced by InterpLocTracesToTrace().
void Nektar::MultiRegions::LocTraceToTraceMap::InterpLocEdgesToTraceTranspose | ( | const int | dir, |
const Array< OneD, const NekDouble > & | edges, | ||
Array< OneD, NekDouble > & | locedges | ||
) |
Transpose of interp local edges to Trace methods.
Transpose of Interp local edges to trace.
dir | Selects forwards (0) or backwards (1) direction. |
edges | Global trace edge |
locedges | Local trace edge |
Definition at line 1398 of file LocTraceToTraceMap.cpp.
References ASSERTL1, Blas::Dgemm(), Nektar::ErrorUtil::efatal, Nektar::MultiRegions::eInterpDir0, Nektar::MultiRegions::eInterpEndPtDir0, Nektar::MultiRegions::eNoInterp, Vmath::Gathr(), Nektar::LibUtilities::PointsKey::GetNumPoints(), m_interpEndPtI0, m_interpNtraces, m_interpPoints, m_interpTrace, m_interpTraceI0, m_locInterpTraceToTraceMap, m_nTracePts, NEKERROR, Vmath::Svtvp(), and Vmath::Vcopy().
Referenced by InterpLocTracesToTraceTranspose().
void Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTrace | ( | const int | dir, |
const Array< OneD, const NekDouble > & | locfaces, | ||
Array< OneD, NekDouble > | faces | ||
) |
Interpolate local faces to trace face point distributions where required.
dir | Selects forwards (0) or backwards (1) direction. |
locfaces | Local trace face storage. |
faces | Global trace face storage |
Definition at line 1222 of file LocTraceToTraceMap.cpp.
References ASSERTL0, ASSERTL1, Blas::Ddot(), Blas::Dgemm(), Blas::Dgemv(), Nektar::MultiRegions::eInterpBothDirs, Nektar::MultiRegions::eInterpDir0, Nektar::MultiRegions::eInterpDir1, Nektar::MultiRegions::eInterpEndPtDir0, Nektar::MultiRegions::eInterpEndPtDir0InterpDir1, Nektar::MultiRegions::eInterpEndPtDir1, Nektar::MultiRegions::eNoInterp, Nektar::LibUtilities::PointsKey::GetNumPoints(), m_interpEndPtI0, m_interpEndPtI1, m_interpNtraces, m_interpPoints, m_interpTrace, m_interpTraceI0, m_interpTraceI1, m_locInterpTraceToTraceMap, m_nTracePts, Vmath::Scatr(), and Vmath::Vcopy().
Referenced by InterpLocTracesToTrace().
void Nektar::MultiRegions::LocTraceToTraceMap::InterpLocFacesToTraceTranspose | ( | const int | dir, |
const Array< OneD, const NekDouble > & | traces, | ||
Array< OneD, NekDouble > & | loctraces | ||
) |
Transpose of interp local faces to Trace methods.
transpose of interp local faces to trace
dir | Selects forwards (0) or backwards (1) direction. |
loctraces | Local trace |
traces | trace . |
Definition at line 1479 of file LocTraceToTraceMap.cpp.
References ASSERTL1, Blas::Dgemm(), Nektar::MultiRegions::eInterpBothDirs, Nektar::MultiRegions::eInterpDir0, Nektar::MultiRegions::eInterpDir1, Nektar::MultiRegions::eInterpEndPtDir0, Nektar::MultiRegions::eInterpEndPtDir0InterpDir1, Nektar::MultiRegions::eInterpEndPtDir1, Nektar::MultiRegions::eNoInterp, Vmath::Gathr(), Nektar::LibUtilities::PointsKey::GetNumPoints(), m_interpEndPtI0, m_interpEndPtI1, m_interpNtraces, m_interpPoints, m_interpTrace, m_interpTraceI0, m_interpTraceI1, m_locInterpTraceToTraceMap, m_nTracePts, Vmath::Svtvp(), and Vmath::Vcopy().
Referenced by InterpLocTracesToTraceTranspose().
void Nektar::MultiRegions::LocTraceToTraceMap::InterpLocTracesToTrace | ( | const int | dir, |
const Array< OneD, const NekDouble > & | loctraces, | ||
Array< OneD, NekDouble > & | traces | ||
) |
Definition at line 1109 of file LocTraceToTraceMap.cpp.
References Nektar::ErrorUtil::efatal, InterpLocEdgesToTrace(), InterpLocFacesToTrace(), m_expdim, m_locInterpTraceToTraceMap, NEKERROR, and Vmath::Scatr().
void Nektar::MultiRegions::LocTraceToTraceMap::InterpLocTracesToTraceTranspose | ( | const int | dir, |
const Array< OneD, const NekDouble > & | traces, | ||
Array< OneD, NekDouble > & | loctraces | ||
) |
Definition at line 1373 of file LocTraceToTraceMap.cpp.
References Nektar::ErrorUtil::efatal, InterpLocEdgesToTraceTranspose(), InterpLocFacesToTraceTranspose(), m_expdim, and NEKERROR.
|
inline |
Interpolate global trace edge to local trace edges point distributions where required.
dir | Selects forwards (0) or backwards (1) direction. |
locfaces | Local trace edge storage. |
faces | Global trace edge storage |
Definition at line 1677 of file LocTraceToTraceMap.cpp.
References ASSERTL0, ASSERTL1, Blas::Dgemm(), Nektar::MultiRegions::eInterpDir0, Nektar::MultiRegions::eInterpEndPtDir0, Nektar::MultiRegions::eNoInterp, Vmath::Gathr(), Nektar::LibUtilities::PointsKey::GetNumPoints(), m_interpFromTraceI0, m_interpNtraces, m_interpPoints, m_interpTrace, m_locInterpTraceToTraceMap, m_nTracePts, and Vmath::Vcopy().
Referenced by InterpTraceToLocTrace().
void Nektar::MultiRegions::LocTraceToTraceMap::InterpTraceToLocFaces | ( | const int | dir, |
const Array< OneD, const NekDouble > & | faces, | ||
Array< OneD, NekDouble > & | locfaces | ||
) |
Interpolate global trace edge to local trace edges point distributions where required.
dir | Selects forwards (0) or backwards (1) direction. |
locfaces | Local trace edge storage. |
faces | Global trace edge storage |
Definition at line 1756 of file LocTraceToTraceMap.cpp.
References ASSERTL0, ASSERTL1, Blas::Dgemm(), Nektar::MultiRegions::eInterpBothDirs, Nektar::MultiRegions::eInterpDir0, Nektar::MultiRegions::eInterpDir1, Nektar::MultiRegions::eInterpEndPtDir0InterpDir1, Nektar::MultiRegions::eInterpEndPtDir1, Nektar::MultiRegions::eNoInterp, Vmath::Gathr(), Nektar::LibUtilities::PointsKey::GetNumPoints(), m_interpFromTraceI0, m_interpFromTraceI1, m_interpNtraces, m_interpPoints, m_interpTrace, m_locInterpTraceToTraceMap, m_nTracePts, and Vmath::Vcopy().
Referenced by InterpTraceToLocTrace().
void Nektar::MultiRegions::LocTraceToTraceMap::InterpTraceToLocTrace | ( | const int | dir, |
const Array< OneD, NekDouble > & | traces, | ||
Array< OneD, NekDouble > & | loctraces | ||
) |
Definition at line 1645 of file LocTraceToTraceMap.cpp.
References ASSERTL0, Vmath::Gathr(), InterpTraceToLocEdges(), InterpTraceToLocFaces(), m_expdim, and m_locInterpTraceToTraceMap.
void Nektar::MultiRegions::LocTraceToTraceMap::LocTracesFromField | ( | const Array< OneD, const NekDouble > & | field, |
Array< OneD, NekDouble > | faces | ||
) |
Gather the local elemental traces in physical space from field using m_locTraceToFieldMap. Note traces are blocked together in similar trace point ordering.
field | Solution field in physical space |
faces | Resulting local traces. |
Definition at line 1028 of file LocTraceToTraceMap.cpp.
References Vmath::Gathr(), and m_locTraceToFieldMap.
void Nektar::MultiRegions::LocTraceToTraceMap::ReshuffleLocTracesForInterp | ( | const int | dir, |
const Array< OneD, const NekDouble > & | loctraces, | ||
Array< OneD, NekDouble > | reshuffle | ||
) |
Reshuffle local elemental traces in physical space so that similar faces points are blocked together so they can then be interpolated with InterpLocTraceToTrace method.
loctrace | local traces in physical space |
reshuffle | traces ordered in reshuffled format of similar patterns. |
Definition at line 1077 of file LocTraceToTraceMap.cpp.
References ASSERTL1, Vmath::Gathr(), and m_locTraceToElmtTraceMap.
|
inline |
Definition at line 305 of file LocTraceToTraceMap.h.
References m_LocTracephysToTraceIDMap.
void Nektar::MultiRegions::LocTraceToTraceMap::Setup | ( | const ExpList & | locExp, |
const ExpListSharedPtr & | trace, | ||
const Array< OneD, Array< OneD, LocalRegions::ExpansionSharedPtr > > & | elmtToTrace, | ||
const std::vector< bool > & | LeftAdjacents | ||
) |
Set up member variables for a two-dimensional problem.
locExp | Expansion list of elements |
trace | Expansion list of the trace. |
elmtToTrace | Mapping from elemental trace to unique trace. |
leftAdjacents | Vector of bools denoting forwards-oriented traces. |
Definition at line 87 of file LocTraceToTraceMap.cpp.
References Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::MultiRegions::eInterpBothDirs, Nektar::MultiRegions::eInterpDir0, Nektar::MultiRegions::eInterpDir1, Nektar::MultiRegions::eInterpEndPtDir0, Nektar::MultiRegions::eInterpEndPtDir0InterpDir1, Nektar::MultiRegions::eInterpEndPtDir1, Nektar::MultiRegions::eNoInterp, Nektar::LibUtilities::eNoPointsType, FindElmtNeighbors(), Nektar::MultiRegions::ExpList::GetCoeff_Offset(), Nektar::MultiRegions::ExpList::GetExp(), Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::MultiRegions::ExpList::GetPhys_Offset(), Nektar::LibUtilities::PointsKey::GetPointsType(), m_expdim, m_interpEndPtI0, m_interpEndPtI1, m_interpFromTraceI0, m_interpFromTraceI1, m_interpNtraces, m_interpPoints, m_interpTrace, m_interpTraceI0, m_interpTraceI1, m_locInterpTraceToTraceMap, m_locTraceToElmtTraceMap, m_locTraceToFieldMap, m_nFwdLocTracePts, m_nLocTracePts, m_nTraceCoeffs, m_nTracePts, m_traceCoeffsToElmtMap, m_traceCoeffsToElmtSign, m_traceCoeffsToElmtTrace, Nektar::LibUtilities::P, Nektar::LibUtilities::PointsManager(), sign, TraceLocToElmtLocCoeffMap(), and Vmath::Vcopy().
Referenced by LocTraceToTraceMap().
void Nektar::MultiRegions::LocTraceToTraceMap::TraceLocToElmtLocCoeffMap | ( | const ExpList & | locExp, |
const ExpListSharedPtr & | trace | ||
) |
Set up maps between coefficients on trace and in cells.
locExp | Expansion list in elements |
trace | Expansion list on traces. |
Definition at line 847 of file LocTraceToTraceMap.cpp.
References Nektar::MultiRegions::ExpList::GetCoeffsToElmt(), m_leftRightAdjacentExpFlag, m_leftRightAdjacentExpId, m_nTraceCoeffs, m_traceCoeffsToElmtMap, m_traceCoeffsToElmtSign, m_traceCoeffsToElmtTrace, m_traceCoeffToLeftRightExpCoeffMap, m_traceCoeffToLeftRightExpCoeffSign, and sign.
Referenced by Setup().
void Nektar::MultiRegions::LocTraceToTraceMap::UnshuffleLocTraces | ( | const int | dir, |
const Array< OneD, const NekDouble > & | loctraces, | ||
Array< OneD, NekDouble > | unshuffle | ||
) |
Unshuffle local elemental traces in physical space from similar faces points are blocked together to the local elemental trace format.
loctrace | local traces in physical space |
reshuffle | traces ordered in reshuffled format of similar patterns. |
Definition at line 1095 of file LocTraceToTraceMap.cpp.
References ASSERTL1, m_locTraceToElmtTraceMap, and Vmath::Scatr().
Definition at line 404 of file LocTraceToTraceMap.h.
Referenced by FindElmtNeighbors(), and GetElemNeighbsId().
Definition at line 402 of file LocTraceToTraceMap.h.
Referenced by FindElmtNeighbors(), and GetElemNeighbsNumb().
|
private |
Expansion Dimension we have setup for trace mapping.
Definition at line 322 of file LocTraceToTraceMap.h.
Referenced by InterpLocTracesToTrace(), InterpLocTracesToTraceTranspose(), InterpTraceToLocTrace(), LocTraceToTraceMap(), and Setup().
|
private |
Mapping to hold first coordinate direction endpoint interpolation, which can be more optimal if using Gauss-Radau distribution for triangles.
Definition at line 363 of file LocTraceToTraceMap.h.
Referenced by InterpLocEdgesToTrace(), InterpLocEdgesToTraceTranspose(), InterpLocFacesToTrace(), InterpLocFacesToTraceTranspose(), and Setup().
|
private |
Mapping to hold second coordinate direction endpoint interpolation, which can be more optimal if using Gauss-Radau distribution for triangles.
Definition at line 367 of file LocTraceToTraceMap.h.
Referenced by InterpLocFacesToTrace(), InterpLocFacesToTraceTranspose(), and Setup().
|
private |
Interpolation matrices for either 2D edges or first coordinate of 3D face using going "from' to 'to' points (i.e. the reverse of other techniques)
Definition at line 353 of file LocTraceToTraceMap.h.
Referenced by InterpTraceToLocEdges(), InterpTraceToLocFaces(), and Setup().
|
private |
Interpolation matrices for either 2D edges or first coordinate of 3D face using going "from' to 'to' points (i.e. the reverse of other techniques)
Definition at line 357 of file LocTraceToTraceMap.h.
Referenced by InterpTraceToLocFaces(), and Setup().
Number of edges/faces on a 2D/3D element that require interpolation.
Definition at line 369 of file LocTraceToTraceMap.h.
Referenced by CalcLocTracePhysToTraceIDMap_2D(), CalcLocTracePhysToTraceIDMap_3D(), InterpLocEdgesToTrace(), InterpLocEdgesToTraceTranspose(), InterpLocFacesToTrace(), InterpLocFacesToTraceTranspose(), InterpTraceToLocEdges(), InterpTraceToLocFaces(), and Setup().
|
private |
Interpolation points key distributions to each of the local to global mappings.
Definition at line 360 of file LocTraceToTraceMap.h.
Referenced by CalcLocTracePhysToTraceIDMap_2D(), CalcLocTracePhysToTraceIDMap_3D(), InterpLocEdgesToTrace(), InterpLocEdgesToTraceTranspose(), InterpLocFacesToTrace(), InterpLocFacesToTraceTranspose(), InterpTraceToLocEdges(), InterpTraceToLocFaces(), and Setup().
|
private |
A mapping holding the type of interpolation needed for each local trace. Dimension 0 holds forward traces, dimension 1 backward.
Definition at line 343 of file LocTraceToTraceMap.h.
Referenced by CalcLocTracePhysToTraceIDMap_2D(), CalcLocTracePhysToTraceIDMap_3D(), InterpLocEdgesToTrace(), InterpLocEdgesToTraceTranspose(), InterpLocFacesToTrace(), InterpLocFacesToTraceTranspose(), InterpTraceToLocEdges(), InterpTraceToLocFaces(), and Setup().
|
private |
Interpolation matrices for either 2D edges or first coordinate of 3D face.
Definition at line 346 of file LocTraceToTraceMap.h.
Referenced by InterpLocEdgesToTrace(), InterpLocEdgesToTraceTranspose(), InterpLocFacesToTrace(), InterpLocFacesToTraceTranspose(), and Setup().
|
private |
Interpolation matrices for the second coordinate of 3D face, not used in 2D.
Definition at line 349 of file LocTraceToTraceMap.h.
Referenced by InterpLocFacesToTrace(), InterpLocFacesToTraceTranspose(), and Setup().
|
private |
Flag indicates whether the expansion that are the left & right adjacent to current trace exists.
Definition at line 383 of file LocTraceToTraceMap.h.
Referenced by FindElmtNeighbors(), GetLeftRightAdjacentExpFlag(), and TraceLocToElmtLocCoeffMap().
|
private |
The expansion ID that are the left & right adjacent to current trace.
Definition at line 385 of file LocTraceToTraceMap.h.
Referenced by FindElmtNeighbors(), GetLeftRightAdjacentExpId(), and TraceLocToElmtLocCoeffMap().
|
private |
A mapping from local trace points to the global trace. Dimension 0 holds forward traces, dimension 1 backward.
Definition at line 340 of file LocTraceToTraceMap.h.
Referenced by CalcLocTracePhysToTraceIDMap_2D(), CalcLocTracePhysToTraceIDMap_3D(), InterpLocEdgesToTrace(), InterpLocEdgesToTraceTranspose(), InterpLocFacesToTrace(), InterpLocFacesToTraceTranspose(), InterpLocTracesToTrace(), InterpTraceToLocEdges(), InterpTraceToLocFaces(), InterpTraceToLocTrace(), and Setup().
|
private |
Definition at line 406 of file LocTraceToTraceMap.h.
Referenced by CalcLocTracePhysToTraceIDMap_2D(), CalcLocTracePhysToTraceIDMap_3D(), GetLocTracephysToTraceIDMap(), and SetLocTracePhysToTraceIDMap().
|
private |
A mapping from the local elemental trace points, arranged as all forwards traces followed by backwards traces, to elemental storage.
Definition at line 337 of file LocTraceToTraceMap.h.
Referenced by ReshuffleLocTracesForInterp(), Setup(), and UnshuffleLocTraces().
A mapping from the local elemental trace points, arranged as all forwards traces followed by backwards traces, to elemental storage.
Definition at line 333 of file LocTraceToTraceMap.h.
Referenced by AddLocTracesToField(), FwdLocTracesFromField(), GetLocTraceToFieldMap(), LocTracesFromField(), and Setup().
|
private |
The number of forward trace points. A local trace element is ‘forward’ if it is the side selected for the global trace.
Definition at line 325 of file LocTraceToTraceMap.h.
Referenced by CalcLocTracePhysToTraceIDMap_2D(), CalcLocTracePhysToTraceIDMap_3D(), FwdLocTracesFromField(), GetNFwdLocTracePts(), and Setup().
|
private |
The number of local trace points.
Definition at line 327 of file LocTraceToTraceMap.h.
Referenced by CalcLocTracePhysToTraceIDMap_2D(), CalcLocTracePhysToTraceIDMap_3D(), GetNLocTracePts(), and Setup().
|
private |
Number of forwards/backwards trace coefficients.
Definition at line 371 of file LocTraceToTraceMap.h.
Referenced by AddTraceCoeffsToFieldCoeffs(), Setup(), and TraceLocToElmtLocCoeffMap().
|
private |
The number of global trace points.
Definition at line 329 of file LocTraceToTraceMap.h.
Referenced by CalcLocTracePhysToTraceIDMap_2D(), CalcLocTracePhysToTraceIDMap_3D(), InterpLocEdgesToTrace(), InterpLocEdgesToTraceTranspose(), InterpLocFacesToTrace(), InterpLocFacesToTraceTranspose(), InterpTraceToLocEdges(), InterpTraceToLocFaces(), and Setup().
|
private |
Mapping from forwards/backwards trace coefficients to elemental coefficient storage.
Definition at line 374 of file LocTraceToTraceMap.h.
Referenced by AddTraceCoeffsToFieldCoeffs(), Setup(), and TraceLocToElmtLocCoeffMap().
|
private |
Sign array for mapping from forwards/backwards trace coefficients to local trace storage.
Definition at line 380 of file LocTraceToTraceMap.h.
Referenced by AddTraceCoeffsToFieldCoeffs(), Setup(), and TraceLocToElmtLocCoeffMap().
|
private |
Mapping from forwards/backwards trace coefficients to the position of the trace element in global storage.
Definition at line 377 of file LocTraceToTraceMap.h.
Referenced by AddTraceCoeffsToFieldCoeffs(), Setup(), and TraceLocToElmtLocCoeffMap().
|
private |
The map of every coeff from current trace to the left & right adjacent expasion coeffs.
Definition at line 389 of file LocTraceToTraceMap.h.
Referenced by GetTraceCoeffToLeftRightExpCoeffMap(), and TraceLocToElmtLocCoeffMap().
|
private |
The sign of every coeff from current trace to the left & right adjacent expasion coeffs.
Definition at line 393 of file LocTraceToTraceMap.h.
Referenced by GetTraceCoeffToLeftRightExpCoeffSign(), and TraceLocToElmtLocCoeffMap().
|
private |
The map of every phys from current trace to the left & right adjacent expasion phys. This map is only used when no interpolation is needed in getting GetFwdBwdTracePhys. If interpolation is needed, it should be determined as the InnerProduct of m_locTraceToFieldMap matrix and interpolation matrix.
Definition at line 399 of file LocTraceToTraceMap.h.