Skip to content

Commit

Permalink
fix merge with master
Browse files Browse the repository at this point in the history
add changelog
fix test suite for -noplot
  • Loading branch information
glesur committed Oct 18, 2023
1 parent 82b59ef commit 13c251b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 50 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- fixed a bug that led to race condition when using GPU offloading, axis boundary condition and domain decomposition along X3 (!309)
- fixed a bug that led to inconsistent results with MPI and UCT_HLLx EMF reconstruction schemes (!310)
- fixed a bug that could result in .dmp file duplication on restart (!354)
- Moving developement onto github.com. Some references to merge requests will likely be lost.
- fixed a bug in v2.0 developement branch that resulted in broekn dump files when MHD was enabled with DIMENSIONS<3 (#174)
- IDEFIX_Debug now automatically introduce Kokkos::fence at the end of each idefix_for, enforcing synchronisation between host and device when debugging (#188)
- Moving developement onto github.com. Some references to merge requests will likely be lost.
- Do not use git lfs anymore due to bandwidth restrictions imposed by github (#183)
- use proper cell centroid PLM reconstruction when using non-cartesian coordinates (#196)
- fixed a bug that could lead to low (O(1e-10)) leakage of conserved quantities along the axis (#196)
- changed radial pressure curvature term so that machine precision balance is achieved for constant pressure flows in every geometry (#196)

### Added
- Self-gravity (!186)
Expand Down
2 changes: 1 addition & 1 deletion pytools/idfx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__ (self):
idefix_dir_env = os.getenv("IDEFIX_DIR")

parser.add_argument("-noplot",
dest="plot",
dest="noplot",
help="disable plotting in standard tests",
action="store_false")

Expand Down
5 changes: 4 additions & 1 deletion src/fluid/fluid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
#include "idefix.hpp"
#include "grid.hpp"
#include "fluid_defs.hpp"
#include "eos.hpp"
#include "thermalDiffusion.hpp"
#include "bragThermalDiffusion.hpp"
#include "selfGravity.hpp"
#include "vtk.hpp"
#include "dump.hpp"
#include "eos.hpp"
#ifdef WITH_HDF5
#include "xdmf.hpp"
#endif

// forward class declaration
class DataBlock;
Expand Down
45 changes: 3 additions & 42 deletions src/output/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "fluid.hpp"
#include "slice.hpp"


Output::Output(Input &input, DataBlock &data) {
idfx::pushRegion("Output::Output");
// initialise the output objects for each format
Expand Down Expand Up @@ -66,24 +65,6 @@ Output::Output(Input &input, DataBlock &data) {
}
}


// Initialise xdmf outputs
if(input.CheckEntry("Output","xdmf")>0) {
xdmfPeriod = input.Get<real>("Output","xdmf",0);
if(xdmfPeriod>=0.0) { // backward compatibility (negative value means no file)
xdmfLast = data.t - xdmfPeriod; // write something in the next CheckForWrite()
#ifdef WITH_HDF5
xdmfEnabled = true;
#else
xdmfEnabled = false;
IDEFIX_ERROR("Attention: HDF5 library not linked when building Idefix!");
#endif
}
}
#ifdef WITH_HDF5
xdmf.Init(input,data); // Always initialised in case of emergency xdmf output
#endif

// intialise dump outputs
if(input.CheckEntry("Output","dmp")>0) {
dumpPeriod = input.Get<real>("Output","dmp",0);
Expand Down Expand Up @@ -120,6 +101,9 @@ Output::Output(Input &input, DataBlock &data) {
data.dump->RegisterVariable(&dumpLast, "dumpLast");
data.dump->RegisterVariable(&analysisLast, "analysisLast");
data.dump->RegisterVariable(&vtkLast, "vtkLast");
#ifdef WITH_HDF5
data.dump->RegisterVariable(&xdmfLast, "xdmfLast");
#endif

idfx::popRegion();
}
Expand Down Expand Up @@ -312,29 +296,6 @@ void Output::ForceWriteXdmf(DataBlock &data) {
}
#endif

#ifdef WITH_HDF5
void Output::ForceWriteXdmf(DataBlock &data) {
idfx::pushRegion("Output::ForceWriteXdmf");

if(!forceNoWrite) {
if(userDefVariablesEnabled) {
if(haveUserDefVariablesFunc) {
// Call user-def function to fill the userdefined variable arrays
idfx::pushRegion("UserDef::User-defined variables function");
userDefVariablesFunc(data, userDefVariables);
idfx::popRegion();
} else {
IDEFIX_ERROR("Cannot output user-defined variables without "
"enrollment of your user-defined variables function");
}
}
xdmfLast += xdmfPeriod;
xdmf.Write(data, *this);
}
idfx::popRegion();
}
#endif

void Output::EnrollAnalysis(AnalysisFunc myFunc) {
idfx::pushRegion("Output::EnrollAnalysis");
if(!analysisEnabled) {
Expand Down
2 changes: 0 additions & 2 deletions src/output/xdmf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ Xdmf::Xdmf(Input &input, DataBlock *datain) {
D_EXPAND( x1_cell = grid.x[IDIR](i + data->gbeg[IDIR]); ,
x2_cell = grid.x[JDIR](j + data->gbeg[JDIR]); ,
x3_cell = grid.x[KDIR](k + data->gbeg[KDIR]); )

}
#if (GEOMETRY == CARTESIAN) || (GEOMETRY == CYLINDRICAL)
node_coord(0,k,j,i) = x1;
Expand Down Expand Up @@ -251,7 +250,6 @@ Xdmf::Xdmf(Input &input, DataBlock *datain) {
this->mpi_data_start[dir] = data->gbeg[2-dir]-grid.nghost[2-dir];
this->mpi_data_size[dir] = grid.np_int[2-dir];
this->mpi_data_subsize[dir] = data->np_int[2-dir];

}
#elif (DIMENSIONS == 2)
for(int dir = 0; dir < DIMENSIONS ; dir++) {
Expand Down
3 changes: 0 additions & 3 deletions src/output/xdmf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#ifndef OUTPUT_XDMF_HPP_
#define OUTPUT_XDMF_HPP_
#include <string>

#include <filesystem>
#include <map>
#include "idefix.hpp"
Expand All @@ -30,7 +29,6 @@
class Output;
class DataBlock;


class Xdmf {
friend class Dump;

Expand Down Expand Up @@ -123,5 +121,4 @@ void Xdmf::RegisterVariable(T& in, std::string name, int var) {
xdmfScalarMap.emplace(name, ScalarField(in, var));
}
}

#endif // OUTPUT_XDMF_HPP_

0 comments on commit 13c251b

Please sign in to comment.