mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
guard against missing opm-grid
This commit is contained in:
parent
1e13cfef37
commit
0e2a8d2dc5
@ -28,8 +28,9 @@
|
|||||||
#include <opm/models/utils/parametersystem.hh>
|
#include <opm/models/utils/parametersystem.hh>
|
||||||
#include <opm/models/utils/propertysystem.hh>
|
#include <opm/models/utils/propertysystem.hh>
|
||||||
|
|
||||||
|
#ifdef HAVE_OPM_GRID
|
||||||
#include "opm/grid/UnstructuredGrid.h"
|
#include "opm/grid/UnstructuredGrid.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
/*!
|
/*!
|
||||||
@ -62,7 +63,7 @@ class UnstructuredGridVanguard : public BaseVanguard<TypeTag> {
|
|||||||
* \brief Load the grid from the file.
|
* \brief Load the grid from the file.
|
||||||
*/
|
*/
|
||||||
UnstructuredGridVanguard(Simulator& simulator) : ParentType(simulator){
|
UnstructuredGridVanguard(Simulator& simulator) : ParentType(simulator){
|
||||||
|
#ifdef HAVE_OPM_GRID
|
||||||
const std::string gridFileName = EWOMS_GET_PARAM(TypeTag, std::string, GridFile);
|
const std::string gridFileName = EWOMS_GET_PARAM(TypeTag, std::string, GridFile);
|
||||||
unsigned numRefinments = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
|
unsigned numRefinments = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
|
||||||
|
|
||||||
@ -82,6 +83,7 @@ class UnstructuredGridVanguard : public BaseVanguard<TypeTag> {
|
|||||||
gridPtr_->globalRefine(static_cast<int>(numRefinments));
|
gridPtr_->globalRefine(static_cast<int>(numRefinments));
|
||||||
}
|
}
|
||||||
this->finalizeInit_();
|
this->finalizeInit_();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
Reference in New Issue
Block a user