ABLATE Source Documentation
0.12.34
range.hpp
1
#ifndef ABLATELIBRARY_RANGE_HPP
2
#define ABLATELIBRARY_RANGE_HPP
3
#include "petsc.h"
4
#include "region.hpp"
5
6
namespace
ablate::domain {
7
11
struct
Range
{
12
IS is =
nullptr
;
13
PetscInt start{};
14
PetscInt end{};
15
const
PetscInt *points =
nullptr
;
16
22
[[nodiscard]]
inline
PetscInt
GetPoint
(PetscInt i)
const
{
return
points ? points[i] : i; }
23
};
24
32
void
GetRange(DM dm,
const
std::shared_ptr<Region> ®ion, PetscInt depth,
Range
&range);
33
40
void
GetCellRange(DM dm,
const
std::shared_ptr<Region> ®ion,
Range
&cellRange);
41
48
void
GetFaceRange(DM dm,
const
std::shared_ptr<Region> ®ion,
Range
&faceRange);
49
54
void
RestoreRange(
Range
&range);
55
56
}
// namespace ablate::domain
57
#endif
// ABLATELIBRARY_RANGE_HPP
ablate::domain::Range
Definition:
range.hpp:11
ablate::domain::Range::GetPoint
PetscInt GetPoint(PetscInt i) const
Definition:
range.hpp:22
src
domain
range.hpp
Generated by
1.9.1