Skip to content

Commit a33515e

Browse files
committed
vtkhdf
1 parent 675e73b commit a33515e

32 files changed

+1545
-409
lines changed

pyphare/pyphare/pharein/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ def as_paths(rb):
328328
)
329329

330330
if len(simulation.diagnostics) > 0:
331+
if simulation.diag_options is not None and "format" in simulation.diag_options:
332+
add_string(diag_path + "format", simulation.diag_options["format"])
333+
331334
if simulation.diag_options is not None and "options" in simulation.diag_options:
332335
add_string(
333336
diag_path + "filePath", simulation.diag_options["options"]["dir"]

pyphare/pyphare/pharein/simulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def check_directory(directory, key):
481481
# diag_options = {"format":"phareh5", "options": {"dir": "phare_ouputs/"}}
482482
def check_diag_options(**kwargs):
483483
diag_options = kwargs.get("diag_options", None)
484-
formats = ["phareh5"]
484+
formats = ["phareh5", "pharevtkhdf"]
485485
if diag_options is not None and "format" in diag_options:
486486
if diag_options["format"] not in formats:
487487
raise ValueError("Error - diag_options format is invalid")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from . import tovtk
2+
3+
__all__ = ["tovtk"]

src/amr/physical_models/hybrid_model.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class HybridModel : public IPhysicalModel<AMR_Types>
2828
using Interface = IPhysicalModel<AMR_Types>;
2929
using amr_types = AMR_Types;
3030
using electrons_t = Electrons;
31-
using patch_t = typename AMR_Types::patch_t;
32-
using level_t = typename AMR_Types::level_t;
31+
using patch_t = AMR_Types::patch_t;
32+
using level_t = AMR_Types::level_t;
3333
using gridlayout_type = GridLayoutT;
3434
using electromag_type = Electromag;
35-
using vecfield_type = typename Electromag::vecfield_type;
36-
using field_type = typename vecfield_type::field_type;
35+
using vecfield_type = Electromag::vecfield_type;
36+
using field_type = vecfield_type::field_type;
3737
using grid_type = Grid_t;
3838
using ions_type = Ions;
39-
using particle_array_type = typename Ions::particle_array_type;
39+
using particle_array_type = Ions::particle_array_type;
4040
using resources_manager_type = amr::ResourcesManager<gridlayout_type, grid_type>;
4141
using ParticleInitializerFactory
4242
= core::ParticleInitializerFactory<particle_array_type, gridlayout_type>;

src/amr/resources_manager/amr_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ namespace amr
248248
iLevel++)
249249
{
250250
visitLevel<GridLayout>(*hierarchy.getPatchLevel(iLevel), resman,
251-
std::forward<Action>(action), std::forward<Args...>(args...));
251+
std::forward<Action>(action), std::forward<Args>(args)...);
252252
}
253253
}
254254

src/core/data/grid/gridlayout.hpp

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,10 @@ namespace core
879879
return GridLayoutImpl::centering(hybridQuantity);
880880
}
881881

882+
NO_DISCARD constexpr static auto centering(auto const& hasQuantity)
883+
{
884+
return centering(hasQuantity.physicalQuantity());
885+
}
882886

883887
NO_DISCARD constexpr static std::array<std::array<QtyCentering, dimension>, 6>
884888
centering(HybridQuantity::Tensor hybridQuantity)
@@ -1027,6 +1031,29 @@ namespace core
10271031

10281032

10291033

1034+
/**
1035+
* @brief BxToMoments return the indexes and associated coef to compute the linear
1036+
* interpolation necessary to project Bx onto moments.
1037+
*/
1038+
NO_DISCARD auto static constexpr BxToMoments() { return GridLayoutImpl::BxToMoments(); }
1039+
1040+
1041+
/**
1042+
* @brief ByToMoments return the indexes and associated coef to compute the linear
1043+
* interpolation necessary to project By onto moments.
1044+
*/
1045+
NO_DISCARD auto static constexpr ByToMoments() { return GridLayoutImpl::ByToMoments(); }
1046+
1047+
1048+
/**
1049+
* @brief BzToMoments return the indexes and associated coef to compute the linear
1050+
* interpolation necessary to project Bz onto moments.
1051+
*/
1052+
NO_DISCARD auto static constexpr BzToMoments() { return GridLayoutImpl::BzToMoments(); }
1053+
1054+
1055+
1056+
10301057
/**
10311058
* @brief ExToMoments return the indexes and associated coef to compute the linear
10321059
* interpolation necessary to project Ex onto moments.
@@ -1181,6 +1208,8 @@ namespace core
11811208
}));
11821209
}
11831210

1211+
1212+
11841213
template<typename Field, typename Fn>
11851214
void evalOnBox(Field& field, Fn&& fn) const
11861215
{

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
{

0 commit comments

Comments
 (0)