Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 32972f69 authored by Quentin Khan's avatar Quentin Khan

Update the adaptive Chebyshev kernel to use the new data organisation

 - Change FMM operators signature to take advantage of the new
   layout. The operators only take as parameters the data they may need
   instead of the whole cell. For instance (simplified):

   void M2M(CellClass* parent, CellClass** children);

   becomes

   void M2M(multipole_t*  parent_m,    symbolic_data_t* parent_s,
            multipole_t** children_ms, symbolic_data_t* children_ss);
parent 9eec32f8
......@@ -41,37 +41,44 @@ public:
}
}
void P2M(CellClass* const LeafCell,
template<class SymbolicData>
void P2M(typename CellClass::multipole_t* const LeafCell,
const SymbolicData * const LeafSymbData,
const ContainerClass* const SourceParticles)
override
{
FReal leafBoxWidth = FBase::BoxWidth / FReal(1 << LeafCell->getLevel());
FReal leafBoxWidth = FBase::BoxWidth / FReal(1 << LeafSymbData->getLevel());
const FPoint<FReal> LeafCellCenter =
FBase::getCellCenter(LeafCell->getCoordinate(), static_cast<int>(LeafCell->getLevel()));
FBase::getCellCenter(LeafSymbData->getCoordinate(), static_cast<int>(LeafSymbData->getLevel()));
FBase::Interpolator->applyP2M(LeafCellCenter, leafBoxWidth,
LeafCell->getMultipole(0), SourceParticles);
LeafCell->getMultipole(0), SourceParticles);
}
void L2P(const CellClass* const LeafCell,
template<class SymbolicData>
void L2P(const typename CellClass::local_expansion_t* const LeafCell,
const SymbolicData * const LeafSymbData,
ContainerClass* const TargetParticles)
override
{
FReal leafBoxWidth = FBase::BoxWidth / FReal(1 << LeafCell->getLevel());
FReal leafBoxWidth = FBase::BoxWidth / FReal(1 << LeafSymbData->getLevel());
const FPoint<FReal> LeafCellCenter =
FBase::getCellCenter(LeafCell->getCoordinate(), static_cast<int>(LeafCell->getLevel()));
FBase::getCellCenter(LeafSymbData->getCoordinate(), static_cast<int>(LeafSymbData->getLevel()));
// apply Sx and Px (grad Sx)
FBase::Interpolator->applyL2PTotal(LeafCellCenter, leafBoxWidth,
LeafCell->getLocal(0), TargetParticles);
}
void P2L(CellClass* const local, const ContainerClass* const particles) {
template<class SymbolicData>
void P2L(typename CellClass::local_expansion_t* const local,
const SymbolicData * const symb,
const ContainerClass* const particles,
const SymbolicData * const /*source_symb*/)
{
using ComputeClass = typename ComputeClassDescriptor<FReal>::type;
constexpr std::size_t FRealCount = ComputeClassDescriptor<FReal>::count;
// Target cell: local
const FReal localCellWidth(FBase::BoxWidth / FReal(1 << local->getLevel()));
const FReal localCellWidth(FBase::BoxWidth / FReal(1 << symb->getLevel()));
const FPoint<FReal> localCellCenter(
FBase::getCellCenter(local->getCoordinate(),static_cast<int>(local->getLevel())));
FBase::getCellCenter(symb->getCoordinate(),static_cast<int>(symb->getLevel())));
// interpolation points of target (X) cell
FPoint<FReal> X[FBase::nnodes];
......@@ -133,14 +140,19 @@ public:
}// NVALS
}
void M2P(const CellClass* const pole, ContainerClass* const particles) {
template<class SymbolicData>
void M2P(const typename CellClass::multipole_t* const pole,
const SymbolicData * const symb,
ContainerClass* const particles,
const SymbolicData * const /*source_symb*/)
{
using ComputeClass = typename ComputeClassDescriptor<FReal>::type;
constexpr std::size_t FRealCount = ComputeClassDescriptor<FReal>::count;
// Source cell: pole
const FReal poleCellWidth(FBase::BoxWidth / FReal(1 << pole->getLevel()));
const FReal poleCellWidth(FBase::BoxWidth / FReal(1 << symb->getLevel()));
const FPoint<FReal> poleCellCenter(
FBase::getCellCenter(pole->getCoordinate(),static_cast<int>(pole->getLevel())));
FBase::getCellCenter(symb->getCoordinate(),static_cast<int>(symb->getLevel())));
// interpolation points of source (Y) cell
FPoint<FReal> Y[FBase::nnodes];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment