-
Notifications
You must be signed in to change notification settings - Fork 3
/
GravityForcing.h
92 lines (75 loc) · 2.88 KB
/
GravityForcing.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// ---------------------------------------------------------------------
//
// Copyright (c) 2019 - 2022 by the IBAMR developers
// All rights reserved.
//
//
// IBAMR is free software and is distributed under the 3-clause BSD
// license. The full text of the license can be found in the file
// COPYRIGHT at the top level directory of IBAMR.
//
// ---------------------------------------------------------------------
#ifndef included_GravityForcing
#define included_GravityForcing
/////////////////////////////// INCLUDES /////////////////////////////////////
// IBAMR INCLUDES
#include <ibamr/INSVCStaggeredHierarchyIntegrator.h>
#include <ibamr/app_namespaces.h>
/////////////////////////////// CLASS DEFINITION /////////////////////////////
/*!
* \brief Class GravityForcing provides forcing for the momentum equations
* due to gravity in the variable density Navier-Stokes equations
*/
class GravityForcing : public CartGridFunction
{
public:
/*!
* \brief Class constructor.
*/
GravityForcing(const std::string& object_name,
Pointer<INSVCStaggeredHierarchyIntegrator> ins_hierarchy_integrator,
std::vector<double> grav_const);
/*!
* \brief Empty destructor.
*/
~GravityForcing() = default;
/*!
* \name Methods to set patch data.
*/
//\{
/*!
* \brief Indicates whether the concrete GravityForcing object is
* time-dependent.
*/
bool isTimeDependent() const;
/*!
* \brief Evaluate the function on the patch interiors on the specified
* levels of the patch hierarchy.
*/
void setDataOnPatchHierarchy(const int data_idx,
Pointer<hier::Variable<NDIM> > var,
Pointer<PatchHierarchy<NDIM> > hierarchy,
const double data_time,
const bool initial_time = false,
const int coarsest_ln = -1,
const int finest_ln = -1);
/*!
* \brief Evaluate the function on the patch interior.
*/
void setDataOnPatch(const int data_idx,
Pointer<hier::Variable<NDIM> > var,
Pointer<Patch<NDIM> > patch,
const double data_time,
const bool initial_time = false,
Pointer<PatchLevel<NDIM> > patch_level = Pointer<PatchLevel<NDIM> >(NULL));
//\}
private:
GravityForcing() = delete;
GravityForcing(const GravityForcing& from) = delete;
GravityForcing& operator=(const GravityForcing& that) = delete;
std::string d_object_name;
Pointer<INSVCStaggeredHierarchyIntegrator> d_ins_hierarchy_integrator;
std::vector<double> d_grav_const;
};
//////////////////////////////////////////////////////////////////////////////
#endif //#ifndef included_GravityForcing