-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathvalidation.cpp
More file actions
31 lines (26 loc) · 875 Bytes
/
validation.cpp
File metadata and controls
31 lines (26 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// ***********************************************************************************
// Idefix MHD astrophysical code
// Copyright(C) Geoffroy R. J. Lesur <[email protected]>
// and other code contributors
// Licensed under CeCILL 2.1 License, see COPYING for more information
// ***********************************************************************************
#include "dataBlock.hpp"
#include "fluid.hpp"
int DataBlock::CheckNan() {
idfx::pushRegion("DataBlock::Check");
int nNans = hydro->CheckNan();
if(haveDust) {
for(int n = 0 ; n < dust.size() ; n++) {
nNans += dust[n]->CheckNan();
}
}
idfx::popRegion();
return(nNans);
}
void DataBlock::Validate() {
idfx::pushRegion("DataBlock::Validate");
if(this->CheckNan()) {
IDEFIX_ERROR("Nans were found in your initial conditions.");
}
idfx::popRegion();
}