ABLATE Source Documentation  0.12.34
eulerianAccessor.hpp
1 #ifndef ABLATELIBRARY_EULERIANDATA_HPP
2 #define ABLATELIBRARY_EULERIANDATA_HPP
3 
4 #include <petsc.h>
5 #include <map>
6 #include "accessor.hpp"
7 #include "domain/subDomain.hpp"
8 #include "particles/field.hpp"
9 #include "swarmAccessor.hpp"
10 #include "utilities/petscUtilities.hpp"
11 
12 namespace ablate::particles::accessors {
16 class EulerianAccessor : public Accessor<const PetscReal> {
17  private:
18  const std::shared_ptr<ablate::domain::SubDomain> subDomain;
19 
21  const PetscReal currentTime;
22 
24  std::vector<PetscReal> coordinates;
25 
27  const PetscInt np;
28 
29  public:
30  EulerianAccessor(bool cachePointData, std::shared_ptr<ablate::domain::SubDomain> subDomain, SwarmAccessor&, PetscReal currentTime);
31 
37  ConstPointData CreateData(const std::string& fieldName) override;
38 
43 
47  [[nodiscard]] inline PetscInt GetDimensions() const { return subDomain->GetDimensions(); }
48 };
49 } // namespace ablate::particles::accessors
50 #endif // ABLATELIBRARY_EULERIANDATA_HPP
Definition: accessor.hpp:17
Definition: eulerianAccessor.hpp:16
ConstPointData CreateData(const std::string &fieldName) override
Definition: eulerianAccessor.cpp:16
EulerianAccessor(const EulerianAccessor &)=delete
PetscInt GetDimensions() const
Definition: eulerianAccessor.hpp:47
Definition: swarmAccessor.hpp:14
Definition: pointData.hpp:14