-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathLevelSetInitialCondition.h
93 lines (75 loc) · 2.46 KB
/
LevelSetInitialCondition.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
93
// ---------------------------------------------------------------------
//
// 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_LevelSetInitialCondition
#define included_LevelSetInitialCondition
/////////////////////////////// INCLUDES /////////////////////////////////////
// IBAMR INCLUDES
#include <ibamr/AdvDiffHierarchyIntegrator.h>
#include <ibamr/app_namespaces.h>
/////////////////////////////// CLASS DEFINITION /////////////////////////////
// Struct to maintain the properties of the cylinder interface
struct CylinderInterface
{
Eigen::Vector3d X0;
double R, L, mass;
double rho_solid;
double g_z;
};
/*!
* \brief Class LevelSetInitialCondition provides an initial condition for
* the level set function.
*/
class LevelSetInitialCondition : public CartGridFunction
{
public:
/*!
* \brief Class constructor.
*/
LevelSetInitialCondition(const std::string& object_name, CylinderInterface init_cylinder);
/*!
* \brief Empty destructor.
*/
~LevelSetInitialCondition();
/*!
* \name Methods to set patch data.
*/
//\{
/*!
* \brief Indicates whether the concrete LevelSetInitialCondition object is
* time-dependent.
*/
bool isTimeDependent() const;
/*!
* \brief Evaluate the function on the patch interior.
*/
void setDataOnPatch(const int data_idx,
Pointer<SAMRAI::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:
LevelSetInitialCondition();
LevelSetInitialCondition(const LevelSetInitialCondition& from);
LevelSetInitialCondition& operator=(const LevelSetInitialCondition& that);
/*!
* Name of this object.
*/
std::string d_object_name;
/*!
* Initial level set information.
*/
CylinderInterface d_init_cylinder;
};
//////////////////////////////////////////////////////////////////////////////
#endif //#ifndef included_LevelSetInitialCondition