Skip to content

Commit 57f601d

Browse files
committed
B to primal
1 parent e949ffe commit 57f601d

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

src/core/data/grid/gridlayoutdefs.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#ifndef PHARE_CORE_GRID_GRIDLAYOUTDEFS_HPP
22
#define PHARE_CORE_GRID_GRIDLAYOUTDEFS_HPP
33

4-
#include <cstddef>
54

6-
#include "core/hybrid/hybrid_quantities.hpp"
7-
#include "core/utilities/types.hpp"
85
#include "core/utilities/point/point.hpp"
6+
#include "core/hybrid/hybrid_quantities.hpp"
7+
8+
#include <cstddef>
99

1010
namespace PHARE
1111
{

src/core/data/grid/gridlayoutimplyee.hpp

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -528,15 +528,16 @@ namespace core
528528
}
529529
else if constexpr (dimension == 3)
530530
{
531-
constexpr WeightPoint<dimension> P1{Point<int, dimension>{0, 0, 0}, 0.5};
532-
constexpr WeightPoint<dimension> P2{Point<int, dimension>{0, iShift, iShift}, 0.5};
533-
return std::array<WeightPoint<dimension>, 2>{P1, P2};
531+
constexpr WeightPoint<dimension> P1{Point<int, dimension>{0, 0, 0}, 0.25};
532+
constexpr WeightPoint<dimension> P2{Point<int, dimension>{0, iShift, 0}, 0.25};
533+
constexpr WeightPoint<dimension> P3{Point<int, dimension>{0, 0, iShift}, 0.25};
534+
constexpr WeightPoint<dimension> P4{Point<int, dimension>{iShift, iShift, 0}, 0.25};
535+
return std::array<WeightPoint<dimension>, 2>{P1, P2, P3, P4};
534536
}
535537
}
536538

537539

538540

539-
540541
NO_DISCARD auto static constexpr ByToMoments()
541542
{
542543
// By is dual primal dual
@@ -559,9 +560,11 @@ namespace core
559560
}
560561
else if constexpr (dimension == 3)
561562
{
562-
constexpr WeightPoint<dimension> P1{Point<int, dimension>{0, 0, 0}, 0.5};
563-
constexpr WeightPoint<dimension> P2{Point<int, dimension>{iShift, 0, iShift}, 0.5};
564-
return std::array<WeightPoint<dimension>, 2>{P1, P2};
563+
constexpr WeightPoint<dimension> P1{Point<int, dimension>{0, 0, 0}, 0.25};
564+
constexpr WeightPoint<dimension> P2{Point<int, dimension>{iShift, 0, 0}, 0.25};
565+
constexpr WeightPoint<dimension> P3{Point<int, dimension>{0, 0, iShift}, 0.25};
566+
constexpr WeightPoint<dimension> P4{Point<int, dimension>{iShift, 0, iShift}, 0.25};
567+
return std::array<WeightPoint<dimension>, 2>{P1, P2, P3, P4};
565568
}
566569
}
567570

@@ -584,15 +587,19 @@ namespace core
584587
}
585588
if constexpr (dimension == 2)
586589
{
587-
constexpr WeightPoint<dimension> P1{Point<int, dimension>{0, 0}, 0.5};
588-
constexpr WeightPoint<dimension> P2{Point<int, dimension>{iShift, iShift}, 0.5};
589-
return std::array<WeightPoint<dimension>, 2>{P1, P2};
590+
constexpr WeightPoint<dimension> P1{Point<int, dimension>{0, 0}, 0.25};
591+
constexpr WeightPoint<dimension> P2{Point<int, dimension>{iShift, 0}, 0.25};
592+
constexpr WeightPoint<dimension> P3{Point<int, dimension>{0, iShift}, 0.25};
593+
constexpr WeightPoint<dimension> P4{Point<int, dimension>{iShift, iShift}, 0.25};
594+
return std::array<WeightPoint<dimension>, 2>{P1, P2, P3, P4};
590595
}
591596
else if constexpr (dimension == 3)
592597
{
593-
constexpr WeightPoint<dimension> P1{Point<int, dimension>{0, 0, 0}, 0.5};
594-
constexpr WeightPoint<dimension> P2{Point<int, dimension>{iShift, iShift, 0}, 0.5};
595-
return std::array<WeightPoint<dimension>, 2>{P1, P2};
598+
constexpr WeightPoint<dimension> P1{Point<int, dimension>{0, 0, 0}, 0.25};
599+
constexpr WeightPoint<dimension> P2{Point<int, dimension>{iShift, 0, 0}, 0.25};
600+
constexpr WeightPoint<dimension> P3{Point<int, dimension>{0, iShift, 0}, 0.25};
601+
constexpr WeightPoint<dimension> P4{Point<int, dimension>{iShift, iShift, 0}, 0.25};
602+
return std::array<WeightPoint<dimension>, 2>{P1, P2, P3, P4};
596603
}
597604
}
598605

@@ -818,7 +825,8 @@ namespace core
818825

819826

820827
NO_DISCARD auto static constexpr ByToEx()
821-
{ // By is dual primal dual
828+
{
829+
// By is dual primal dual
822830
// Ex is dual primal primal
823831
// operation is thus dpD to dpP
824832
// shift only in the Z direction

0 commit comments

Comments
 (0)