/home/runner/work/amr-wind/amr-wind/amr-wind/physics/udfs/UDF.H Source File

AMR-Wind API: /home/runner/work/amr-wind/amr-wind/amr-wind/physics/udfs/UDF.H Source File
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
UDF.H
Go to the documentation of this file.
1#ifndef UDF_H
2#define UDF_H
3
5#include "AMReX_Gpu.H"
6
7namespace amr_wind {
8class Field;
9
10namespace udf {
11
12class UDF : public Factory<UDF, Field&>
13{
14public:
15 static std::string base_identifier() { return "UDF"; };
16
17 virtual void operator()(int level, const amrex::Geometry& geom) = 0;
18};
19
20class ConstValue : public UDF::Register<ConstValue>
21{
22public:
23 static std::string identifier() { return "ConstValue"; }
24
25 explicit ConstValue(Field& /*fld*/);
26
27 void operator()(int level, const amrex::Geometry& geom) override;
28
29private:
31 amrex::Vector<amrex::Real> m_value;
32};
33
34template <typename T>
35class UDFImpl : public UDF::Register<UDFImpl<T>>
36{
37public:
38 static std::string identifier() { return T::identifier(); }
39
40 explicit UDFImpl(Field& /*fld*/);
41
42 void operator()(int level, const amrex::Geometry& geom) override;
43
44private:
47};
48
49} // namespace udf
50} // namespace amr_wind
51
52#endif /* UDF_H */
Definition Field.H:116
Definition UDF.H:21
static std::string identifier()
Definition UDF.H:23
Field & m_field
Definition UDF.H:30
amrex::Vector< amrex::Real > m_value
Definition UDF.H:31
void operator()(int level, const amrex::Geometry &geom) override
Definition UDF.cpp:28
ConstValue(Field &)
Definition UDF.cpp:16
Definition UDF.H:13
static std::string base_identifier()
Definition UDF.H:15
virtual void operator()(int level, const amrex::Geometry &geom)=0
Definition UDF.H:36
UDFImpl(Field &)
Definition UDF.cpp:37
static std::string identifier()
Definition UDF.H:38
Field & m_field
Definition UDF.H:45
T m_op
Definition UDF.H:46
void operator()(int level, const amrex::Geometry &geom) override
Definition UDF.cpp:41
Definition BCInterface.cpp:7
friend T
Definition Factory.H:97
Definition Factory.H:65