30#include "../option_structure.hpp"
47 unsigned long nSpanDonor) {
48 unsigned short tSpan = 0;
49 auto minDist = std::numeric_limits<su2double>::max();
51 for (
auto iSpanDonor = 0u; iSpanDonor < nSpanDonor - 1; iSpanDonor++) {
52 const auto dist =
abs(iSpanTargetValue - spanValuesDonor[iSpanDonor]);
62 unsigned long nSpanDonor,
int rank) {
63 unsigned short kSpan = 0;
64 auto minDist = std::numeric_limits<su2double>::max();
67 if (iSpanTargetValue <= spanValuesDonor[0]) {
72 if (iSpanTargetValue >= spanValuesDonor[nSpanDonor - 1]) {
74 return {nSpanDonor - 1, 0.0};
77 for (
auto iSpanDonor = 0u; iSpanDonor < nSpanDonor - 1; iSpanDonor++) {
78 const auto dist =
abs(iSpanTargetValue - spanValuesDonor[iSpanDonor]);
79 if (dist < minDist && iSpanTargetValue >= spanValuesDonor[iSpanDonor]) {
84 coeff = (iSpanTargetValue - spanValuesDonor[kSpan]) / (spanValuesDonor[kSpan + 1] - spanValuesDonor[kSpan]);
85 return {kSpan, coeff};
90 cout <<
"Warning! Target spans exist outside the bounds of donor spans! Clamping interpolator..." << endl;
91 cout << (atHub ?
"This is an issue at the hub." :
"This is an issue at the shroud.") << endl;
92 cout <<
"Setting coeff = 0.0 and transferring endwall value!" << endl;
Base class for multiphysics interpolation.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
Definition CGeometry.hpp:75
Main class for defining the interpolator, it requires a child class for each particular interpolation...
Definition CInterpolator.hpp:47
const int rank
MPI Rank.
Definition CInterpolator.hpp:49
Mixing plane interpolation.
Definition CMixingPlane.hpp:38
void WriteInterpolationDetails(const string &filename, const CConfig *const *config) override
Write interpolation details to file.
Definition CMixingPlane.cpp:154
void PrintClampingWarning(int rank, bool atHub)
Definition CMixingPlane.hpp:88
CSpanDonorInfo MapMatchingSpan(unsigned short iSpanTarget)
Definition CMixingPlane.hpp:44
void SetTransferCoeff(CGeometry ****geometry, const CConfig *const *config) override
Set up transfer matrix defining relation between two meshes.
Definition CMixingPlane.cpp:39
CSpanDonorInfo MapLinearInterpolationSpan(const su2double iSpanTargetValue, const su2double *spanValuesDonor, unsigned long nSpanDonor, int rank)
Definition CMixingPlane.hpp:61
CSpanDonorInfo MapNearestSpan(const su2double iSpanTargetValue, const su2double *spanValuesDonor, unsigned long nSpanDonor)
Definition CMixingPlane.hpp:46
passivedouble su2double
Definition code_config.hpp:181
FORCEINLINE ARRAY_T abs(const ARRAY_T &x)
Definition special_vectorization.hpp:117
const int MASTER_NODE
Master node for MPI parallelization.
Definition option_structure.hpp:112
Donor information per marker per vertex of the target.
Definition CInterpolator.hpp:104