2024-01-30 04:20:17 -06:00
|
|
|
|
/*
|
|
|
|
|
Copyright 2023 Inria, Bretagne–Atlantique Research Center
|
|
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
#include <config.h>
|
|
|
|
|
#include <opm/simulators/utils/GridDataOutput_impl.hpp>
|
|
|
|
|
|
|
|
|
|
#include <opm/grid/CpGrid.hpp>
|
|
|
|
|
|
|
|
|
|
#include <opm/simulators/utils/DamarisVar.hpp>
|
|
|
|
|
|
|
|
|
|
#if HAVE_DUNE_FEM
|
2024-05-16 03:58:08 -05:00
|
|
|
|
#include <dune/common/version.hh>
|
2024-01-30 04:20:17 -06:00
|
|
|
|
#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
|
2024-05-16 03:58:08 -05:00
|
|
|
|
#if !DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
2024-01-30 04:20:17 -06:00
|
|
|
|
#include <dune/fem/gridpart/common/gridpart2gridview.hh>
|
2024-05-16 03:58:08 -05:00
|
|
|
|
#endif
|
2024-02-05 12:22:15 -06:00
|
|
|
|
#include <opm/simulators/flow/FemCpGridCompat.hpp>
|
2024-01-30 04:20:17 -06:00
|
|
|
|
#endif // HAVE_DUNE_FEM
|
|
|
|
|
|
|
|
|
|
namespace Opm::GridDataOutput {
|
|
|
|
|
|
|
|
|
|
template<class T> using DV = DamarisOutput::DamarisVar<T>;
|
|
|
|
|
|
|
|
|
|
#define INSTANCE(part, ...) \
|
|
|
|
|
template class SimMeshDataAccessor<__VA_ARGS__, part>; \
|
|
|
|
|
template long SimMeshDataAccessor<__VA_ARGS__,part>:: \
|
2024-01-30 04:47:17 -06:00
|
|
|
|
writeGridPoints<DV<double>>(DV<double>&, DV<double>&, DV<double>&) const; \
|
2024-01-30 04:20:17 -06:00
|
|
|
|
template long SimMeshDataAccessor<__VA_ARGS__,part>:: \
|
2024-01-30 04:47:17 -06:00
|
|
|
|
writeConnectivity<DV<int>>(DV<int>&, ConnectivityVertexOrder) const; \
|
2024-01-30 04:20:17 -06:00
|
|
|
|
template long SimMeshDataAccessor<__VA_ARGS__,part>:: \
|
2024-01-30 04:47:17 -06:00
|
|
|
|
writeOffsetsCells<DV<int>>(DV<int>&) const; \
|
2024-01-30 04:20:17 -06:00
|
|
|
|
template long SimMeshDataAccessor<__VA_ARGS__,part>:: \
|
2024-01-30 04:47:17 -06:00
|
|
|
|
writeCellTypes<DV<char>>(DV<char>&) const;
|
2024-01-30 04:20:17 -06:00
|
|
|
|
|
|
|
|
|
INSTANCE(1, Dune::GridView<Dune::DefaultLeafGridViewTraits<Dune::CpGrid>>)
|
|
|
|
|
|
|
|
|
|
#if HAVE_DUNE_FEM
|
2024-05-16 03:58:08 -05:00
|
|
|
|
#if DUNE_VERSION_GTE(DUNE_FEM, 2, 9)
|
|
|
|
|
using GV = Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid,
|
|
|
|
|
(Dune::PartitionIteratorType)4,
|
|
|
|
|
false>;
|
|
|
|
|
INSTANCE(1, GV)
|
|
|
|
|
#else
|
2024-01-30 04:20:17 -06:00
|
|
|
|
INSTANCE(1, Dune::Fem::GridPart2GridViewImpl<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, (Dune::PartitionIteratorType)4, false> >)
|
|
|
|
|
INSTANCE(1, Dune::GridView<Dune::Fem::GridPart2GridViewTraits<Dune::Fem::AdaptiveLeafGridPart<Dune::CpGrid, Dune::PartitionIteratorType(4), false>>>)
|
|
|
|
|
#endif
|
2024-05-16 03:58:08 -05:00
|
|
|
|
#endif
|
2024-01-30 04:20:17 -06:00
|
|
|
|
|
|
|
|
|
} // namespace Opm::GridDataOutput
|