-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSetLSProperties.cpp
66 lines (52 loc) · 2.33 KB
/
SetLSProperties.cpp
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
// ---------------------------------------------------------------------
//
// 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.
//
// ---------------------------------------------------------------------
#include <ibamr/app_namespaces.h>
#include <ibtk/HierarchyMathOps.h>
#include "SetLSProperties.h"
#include <CartesianGridGeometry.h>
/////////////////////////////// STATIC ///////////////////////////////////////
void
callSetGasLSCallbackFunction(int ls_gas_idx,
Pointer<IBTK::HierarchyMathOps> hier_math_ops,
const int integrator_step,
const double current_time,
const bool initial_time,
const bool regrid_time,
void* ctx)
{
// Set the density from the level set information
static SetLSProperties* ptr_SetLSProperties = static_cast<SetLSProperties*>(ctx);
ptr_SetLSProperties->setLSGasPatchData(
ls_gas_idx, hier_math_ops, integrator_step, current_time, initial_time, regrid_time);
return;
} // callSetGasLSCallbackFunction
/////////////////////////////// PUBLIC //////////////////////////////////////
SetLSProperties::SetLSProperties(const std::string& object_name, Pointer<LSInitStrategy> ls_gas_ops)
: d_object_name(object_name), d_ls_gas_ops(ls_gas_ops)
{
// intentionally left blank
return;
} // SetLSProperties
void
SetLSProperties::setLSGasPatchData(int ls_gas_idx,
SAMRAI::tbox::Pointer<HierarchyMathOps> hier_math_ops,
const int integrator_step,
const double current_time,
const bool initial_time,
const bool regrid_time)
{
// If at the regrid time, force reinitialization
d_ls_gas_ops->setReinitializeLSData(regrid_time);
d_ls_gas_ops->initializeLSData(ls_gas_idx, hier_math_ops, integrator_step, current_time, initial_time);
return;
} // setLSSolidPatchData
/////////////////////////////// PRIVATE //////////////////////////////////////