v0.14.0
Classes | Typedefs | Enumerations | Functions | Variables
free_surface.cpp File Reference
#include <MoFEM.hpp>
#include <petsc/private/petscimpl.h>
#include <FreeSurfaceOps.hpp>

Go to the source code of this file.

Classes

struct  TSPrePostProc
 Set of functions called by PETSc solver used to refine and update mesh. More...
 
struct  FreeSurface
 
struct  Monitor
 [Push operators to pipeline] More...
 

Typedefs

template<int DIM>
using ElementsAndOps = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >
 
using DomainEle = ElementsAndOps< SPACE_DIM >::DomainEle
 
using DomianParentEle = ElementsAndOps< SPACE_DIM >::DomianParentEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEle = ElementsAndOps< SPACE_DIM >::BoundaryEle
 
using BoundaryParentEle = ElementsAndOps< SPACE_DIM >::BoundaryParentEle
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using SideEle = ElementsAndOps< SPACE_DIM >::FaceSideEle
 
using SideOp = SideEle::UserDataOperator
 
using PostProcEleDomain = PostProcBrokenMeshInMoab< DomainEle >
 
using PostProcEleDomainCont = PostProcBrokenMeshInMoabBaseCont< DomainEle >
 
using PostProcEleBdyCont = PostProcBrokenMeshInMoabBaseCont< BoundaryEle >
 
using EntData = EntitiesFieldData::EntData
 
using AssemblyDomainEleOp = FormsIntegrators< DomainEleOp >::Assembly< A >::OpBase
 
using AssemblyBoundaryEleOp = FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase
 
using OpDomainMassU = FormsIntegrators< DomainEleOp >::Assembly< A >::BiLinearForm< I >::OpMass< BASE_DIM, U_FIELD_DIM >
 
using OpDomainMassH = FormsIntegrators< DomainEleOp >::Assembly< A >::BiLinearForm< I >::OpMass< BASE_DIM, 1 >
 
using OpDomainMassP = OpDomainMassH
 
using OpDomainMassG = OpDomainMassH
 
using OpBoundaryMassL = FormsIntegrators< BoundaryEleOp >::Assembly< A >::BiLinearForm< I >::OpMass< BASE_DIM, 1 >
 
using OpDomainAssembleVector = FormsIntegrators< DomainEleOp >::Assembly< A >::LinearForm< I >::OpBaseTimesVector< BASE_DIM, SPACE_DIM, 1 >
 
using OpDomainAssembleScalar = FormsIntegrators< DomainEleOp >::Assembly< A >::LinearForm< I >::OpBaseTimesScalar< BASE_DIM >
 
using OpBoundaryAssembleScalar = FormsIntegrators< BoundaryEleOp >::Assembly< A >::LinearForm< I >::OpBaseTimesScalar< BASE_DIM >
 
template<CoordinateTypes COORD_TYPE>
using OpMixScalarTimesDiv = FormsIntegrators< DomainEleOp >::Assembly< A >::BiLinearForm< I >::OpMixScalarTimesDiv< SPACE_DIM, COORD_TYPE >
 
using BoundaryNaturalBC = NaturalBC< BoundaryEleOp >::Assembly< A >::LinearForm< I >
 
using OpFluidFlux = BoundaryNaturalBC::OpFlux< NaturalMeshsetType< BLOCKSET >, 1, 1 >
 

Enumerations

enum  FR { F, R }
 

Functions

int main (int argc, char *argv[])
 

Variables

static char help [] = "...\n\n"
 
int coord_type = EXECUTABLE_COORD_TYPE
 
constexpr int BASE_DIM = 1
 
constexpr int SPACE_DIM = 2
 
constexpr int U_FIELD_DIM = SPACE_DIM
 
constexpr AssemblyType A = AssemblyType::PETSC
 
constexpr IntegrationType I
 
FTensor::Index< 'i', SPACE_DIMi
 
FTensor::Index< 'j', SPACE_DIMj
 
FTensor::Index< 'k', SPACE_DIMk
 
FTensor::Index< 'l', SPACE_DIMl
 
constexpr auto t_kd = FTensor::Kronecker_Delta_symmetric<int>()
 
int order = 3
 approximation order More...
 
int nb_levels = 4
 
int refine_overlap = 4
 
constexpr bool debug = true
 
auto get_start_bit
 
auto get_current_bit
 dofs bit used to do calculations More...
 
auto get_skin_parent_bit = []() { return 2 * get_start_bit() + 2; }
 
auto get_skin_child_bit = []() { return 2 * get_start_bit() + 3; }
 
auto get_projection_bit = []() { return 2 * get_start_bit() + 4; }
 
auto get_skin_projection_bit = []() { return 2 * get_start_bit() + 5; }
 
double a0 = 980
 
double rho_m = 0.998
 
double mu_m = 0.010101 * 1e2
 
double rho_p = 0.0012
 
double mu_p = 0.000182 * 1e2
 
double lambda = 73
 surface tension More...
 
double W = 0.25
 
double h = 0.01 / 8
 
double eta = h
 
double eta2 = eta * eta
 
double md = 1e-2
 
double eps = 1e-12
 
double tol = std::numeric_limits<float>::epsilon()
 
double rho_ave = (rho_p + rho_m) / 2
 
double rho_diff = (rho_p - rho_m) / 2
 
double mu_ave = (mu_p + mu_m) / 2
 
double mu_diff = (mu_p - mu_m) / 2
 
double kappa = (3. / (4. * std::sqrt(2. * W))) * (lambda / eta)
 
auto integration_rule = [](int, int, int) { return 2 * order + 1; }
 
auto cylindrical
 
auto wetting_angle_sub_stepping
 
auto my_max = [](const double x) { return (x - 1 + std::abs(x + 1)) / 2; }
 
auto my_min = [](const double x) { return (x + 1 - std::abs(x - 1)) / 2; }
 
auto cut_off = [](const double h) { return my_max(my_min(h)); }
 
auto d_cut_off
 
auto phase_function
 
auto d_phase_function_h
 
auto get_f = [](const double h) { return 4 * W * h * (h * h - 1); }
 
auto get_f_dh = [](const double h) { return 4 * W * (3 * h * h - 1); }
 
auto get_M0 = [](auto h) { return md; }
 
auto get_M0_dh = [](auto h) { return 0; }
 
auto get_M2
 
auto get_M2_dh = [](auto h) { return -md * 2 * h; }
 
auto get_M3
 
auto get_M3_dh
 
auto get_M = [](auto h) { return get_M0(h); }
 
auto get_M_dh = [](auto h) { return get_M0_dh(h); }
 
auto get_D
 
auto kernel_oscillation
 
auto kernel_eye
 
auto capillary_tube
 
auto bubble_device
 
auto init_h
 Initialisation function. More...
 
auto wetting_angle = [](double water_level) { return water_level; }
 
auto bit = [](auto b) { return BitRefLevel().set(b); }
 
auto marker = [](auto b) { return BitRefLevel().set(BITREFLEVEL_SIZE - b); }
 
auto get_fe_bit
 
auto get_global_size
 
auto save_range
 
auto get_dofs_ents_by_field_name
 get entities of dofs in the problem - used for debugging More...
 
auto get_dofs_ents_all
 get entities of dofs in the problem - used for debugging More...
 
static boost::weak_ptr< TSPrePostProctsPrePostProc
 

Typedef Documentation

◆ AssemblyBoundaryEleOp

Definition at line 105 of file free_surface.cpp.

◆ AssemblyDomainEleOp

Definition at line 103 of file free_surface.cpp.

◆ BoundaryEle

Definition at line 91 of file free_surface.cpp.

◆ BoundaryEleOp

Examples
free_surface.cpp.

Definition at line 93 of file free_surface.cpp.

◆ BoundaryNaturalBC

using BoundaryNaturalBC = NaturalBC<BoundaryEleOp>::Assembly<A>::LinearForm<I>

Definition at line 128 of file free_surface.cpp.

◆ BoundaryParentEle

Examples
free_surface.cpp.

Definition at line 92 of file free_surface.cpp.

◆ DomainEle

Definition at line 88 of file free_surface.cpp.

◆ DomainEleOp

Definition at line 90 of file free_surface.cpp.

◆ DomianParentEle

Examples
free_surface.cpp.

Definition at line 89 of file free_surface.cpp.

◆ ElementsAndOps

Definition at line 86 of file free_surface.cpp.

◆ EntData

Examples
free_surface.cpp.

Definition at line 101 of file free_surface.cpp.

◆ OpBoundaryAssembleScalar

using OpBoundaryAssembleScalar = FormsIntegrators<BoundaryEleOp>::Assembly< A>::LinearForm<I>::OpBaseTimesScalar<BASE_DIM>
Examples
free_surface.cpp.

Definition at line 121 of file free_surface.cpp.

◆ OpBoundaryMassL

Examples
free_surface.cpp.

Definition at line 114 of file free_surface.cpp.

◆ OpDomainAssembleScalar

using OpDomainAssembleScalar = FormsIntegrators<DomainEleOp>::Assembly< A>::LinearForm<I>::OpBaseTimesScalar<BASE_DIM>
Examples
free_surface.cpp.

Definition at line 119 of file free_surface.cpp.

◆ OpDomainAssembleVector

using OpDomainAssembleVector = FormsIntegrators<DomainEleOp>::Assembly< A>::LinearForm<I>::OpBaseTimesVector<BASE_DIM, SPACE_DIM, 1>
Examples
free_surface.cpp.

Definition at line 117 of file free_surface.cpp.

◆ OpDomainMassG

Examples
free_surface.cpp.

Definition at line 112 of file free_surface.cpp.

◆ OpDomainMassH

Examples
free_surface.cpp.

Definition at line 110 of file free_surface.cpp.

◆ OpDomainMassP

Examples
free_surface.cpp.

Definition at line 111 of file free_surface.cpp.

◆ OpDomainMassU

Examples
free_surface.cpp.

Definition at line 108 of file free_surface.cpp.

◆ OpFluidFlux

Definition at line 130 of file free_surface.cpp.

◆ OpMixScalarTimesDiv

template<CoordinateTypes COORD_TYPE>
using OpMixScalarTimesDiv = FormsIntegrators<DomainEleOp>::Assembly< A>::BiLinearForm<I>::OpMixScalarTimesDiv<SPACE_DIM, COORD_TYPE>

Definition at line 125 of file free_surface.cpp.

◆ PostProcEleBdyCont

Definition at line 99 of file free_surface.cpp.

◆ PostProcEleDomain

Definition at line 97 of file free_surface.cpp.

◆ PostProcEleDomainCont

Definition at line 98 of file free_surface.cpp.

◆ SideEle

Definition at line 94 of file free_surface.cpp.

◆ SideOp

Definition at line 95 of file free_surface.cpp.

Enumeration Type Documentation

◆ FR

enum FR
Enumerator

Definition at line 394 of file free_surface.cpp.

394 { F, R }; // F - forward, and reverse

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

[Register MoFEM discrete manager in PETSc]

[Register MoFEM discrete manager in PETSc

[Create MoAB]

< mesh database

< mesh database interface

[Create MoAB]

[Create MoFEM]

< finite element database

< finite element database interface

[Create MoFEM]

[FreeSurface]

[FreeSurface]

Examples
free_surface.cpp.

Definition at line 2406 of file free_surface.cpp.

2406  {
2407 
2408 #ifdef PYTHON_INIT_SURFACE
2409  Py_Initialize();
2410 #endif
2411 
2412  // Initialisation of MoFEM/PETSc and MOAB data structures
2413  const char param_file[] = "param_file.petsc";
2414  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
2415 
2416  // Add logging channel for example
2417  auto core_log = logging::core::get();
2418  core_log->add_sink(LogManager::createSink(LogManager::getStrmWorld(), "FS"));
2419  LogManager::setLog("FS");
2420  MOFEM_LOG_TAG("FS", "free surface");
2421 
2422  try {
2423 
2424  //! [Register MoFEM discrete manager in PETSc]
2425  DMType dm_name = "DMMOFEM";
2426  CHKERR DMRegister_MoFEM(dm_name);
2427  //! [Register MoFEM discrete manager in PETSc
2428 
2429  //! [Create MoAB]
2430  moab::Core mb_instance; ///< mesh database
2431  moab::Interface &moab = mb_instance; ///< mesh database interface
2432  //! [Create MoAB]
2433 
2434  //! [Create MoFEM]
2435  MoFEM::Core core(moab); ///< finite element database
2436  MoFEM::Interface &m_field = core; ///< finite element database interface
2437  //! [Create MoFEM]
2438 
2439  //! [FreeSurface]
2440  FreeSurface ex(m_field);
2441  CHKERR ex.runProblem();
2442  //! [FreeSurface]
2443  }
2444  CATCH_ERRORS;
2445 
2447 
2448 #ifdef PYTHON_INIT_SURFACE
2449  if (Py_FinalizeEx() < 0) {
2450  exit(120);
2451  }
2452 #endif
2453 }

Variable Documentation

◆ A

constexpr AssemblyType A = AssemblyType::PETSC
constexpr
Examples
free_surface.cpp.

Definition at line 81 of file free_surface.cpp.

◆ a0

double a0 = 980
Examples
free_surface.cpp.

Definition at line 160 of file free_surface.cpp.

◆ BASE_DIM

constexpr int BASE_DIM = 1
constexpr
Examples
free_surface.cpp.

Definition at line 77 of file free_surface.cpp.

◆ bit

auto bit = [](auto b) { return BitRefLevel().set(b); }
Examples
free_surface.cpp.

Definition at line 312 of file free_surface.cpp.

◆ bubble_device

auto bubble_device
Initial value:
= [](double x, double y, double z) {
return -tanh((-0.039 - x) / (eta * std::sqrt(2)));
}
Examples
free_surface.cpp.

Definition at line 284 of file free_surface.cpp.

◆ capillary_tube

auto capillary_tube
Initial value:
= [](double x, double y, double z) {
constexpr double water_height = 0.;
return tanh((water_height - y) / (eta * std::sqrt(2)));
;
}
Examples
free_surface.cpp.

Definition at line 278 of file free_surface.cpp.

◆ coord_type

int coord_type = EXECUTABLE_COORD_TYPE
Examples
free_surface.cpp.

Definition at line 75 of file free_surface.cpp.

◆ cut_off

auto cut_off = [](const double h) { return my_max(my_min(h)); }
Examples
free_surface.cpp.

Definition at line 203 of file free_surface.cpp.

◆ cylindrical

auto cylindrical
Initial value:
= [](const double r) {
return 2 * M_PI * r;
else
return 1.;
}
Examples
free_surface.cpp.

Definition at line 187 of file free_surface.cpp.

◆ d_cut_off

auto d_cut_off
Initial value:
= [](const double h) {
if (h >= -1 && h < 1)
return 1.;
else
return 0.;
}
Examples
free_surface.cpp.

Definition at line 204 of file free_surface.cpp.

◆ d_phase_function_h

auto d_phase_function_h
Initial value:
= [](const double h, const double diff) {
return diff;
}
Examples
free_surface.cpp.

Definition at line 215 of file free_surface.cpp.

◆ debug

constexpr bool debug = true
constexpr
Examples
free_surface.cpp.

Definition at line 144 of file free_surface.cpp.

◆ eps

double eps = 1e-12
Examples
free_surface.cpp.

Definition at line 175 of file free_surface.cpp.

◆ eta

double eta = h
Examples
free_surface.cpp, and plot_base.cpp.

Definition at line 170 of file free_surface.cpp.

◆ eta2

double eta2 = eta * eta
Examples
free_surface.cpp.

Definition at line 171 of file free_surface.cpp.

◆ get_current_bit

auto get_current_bit
Initial value:
= []() {
return 2 * get_start_bit() + 1;
}

dofs bit used to do calculations

Examples
free_surface.cpp.

Definition at line 149 of file free_surface.cpp.

◆ get_D

auto get_D
Initial value:
= [](const double A) {
t_D(i, j, k, l) = A * ((t_kd(i, k) ^ t_kd(j, l)) / 4.);
return t_D;
}
Examples
free_surface.cpp.

Definition at line 252 of file free_surface.cpp.

◆ get_dofs_ents_all

auto get_dofs_ents_all
Initial value:
= [](auto dm) {
auto prb_ptr = getProblemPtr(dm);
std::vector<EntityHandle> ents_vec;
MoFEM::Interface *m_field_ptr;
CHKERR DMoFEMGetInterfacePtr(dm, &m_field_ptr);
auto dofs = prb_ptr->numeredRowDofsPtr;
ents_vec.reserve(dofs->size());
for (auto d : *dofs) {
ents_vec.push_back(d->getEnt());
}
std::sort(ents_vec.begin(), ents_vec.end());
auto it = std::unique(ents_vec.begin(), ents_vec.end());
r.insert_list(ents_vec.begin(), it);
return r;
}

get entities of dofs in the problem - used for debugging

Examples
free_surface.cpp.

Definition at line 368 of file free_surface.cpp.

◆ get_dofs_ents_by_field_name

auto get_dofs_ents_by_field_name
Initial value:
= [](auto dm, auto field_name) {
auto prb_ptr = getProblemPtr(dm);
std::vector<EntityHandle> ents_vec;
MoFEM::Interface *m_field_ptr;
CHKERR DMoFEMGetInterfacePtr(dm, &m_field_ptr);
auto bit_number = m_field_ptr->get_field_bit_number(field_name);
auto dofs = prb_ptr->numeredRowDofsPtr;
auto lo_it = dofs->lower_bound(FieldEntity::getLoBitNumberUId(bit_number));
auto hi_it = dofs->upper_bound(FieldEntity::getHiBitNumberUId(bit_number));
ents_vec.reserve(std::distance(lo_it, hi_it));
for (; lo_it != hi_it; ++lo_it) {
ents_vec.push_back((*lo_it)->getEnt());
}
std::sort(ents_vec.begin(), ents_vec.end());
auto it = std::unique(ents_vec.begin(), ents_vec.end());
r.insert_list(ents_vec.begin(), it);
return r;
}

get entities of dofs in the problem - used for debugging

Examples
free_surface.cpp.

Definition at line 340 of file free_surface.cpp.

◆ get_f

auto get_f = [](const double h) { return 4 * W * h * (h * h - 1); }
Examples
free_surface.cpp.

Definition at line 221 of file free_surface.cpp.

◆ get_f_dh

auto get_f_dh = [](const double h) { return 4 * W * (3 * h * h - 1); }
Examples
free_surface.cpp.

Definition at line 222 of file free_surface.cpp.

◆ get_fe_bit

auto get_fe_bit
Initial value:
= [](FEMethod *fe_ptr) {
return fe_ptr->numeredEntFiniteElementPtr->getBitRefLevel();
}
Examples
free_surface.cpp.

Definition at line 314 of file free_surface.cpp.

◆ get_global_size

auto get_global_size
Initial value:
= [](int l_size) {
int g_size;
MPI_Allreduce(&l_size, &g_size, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
return g_size;
}
Examples
free_surface.cpp.

Definition at line 318 of file free_surface.cpp.

◆ get_M

auto get_M = [](auto h) { return get_M0(h); }
Examples
free_surface.cpp.

Definition at line 249 of file free_surface.cpp.

◆ get_M0

auto get_M0 = [](auto h) { return md; }
Examples
free_surface.cpp.

Definition at line 224 of file free_surface.cpp.

◆ get_M0_dh

auto get_M0_dh = [](auto h) { return 0; }
Examples
free_surface.cpp.

Definition at line 225 of file free_surface.cpp.

◆ get_M2

auto get_M2
Initial value:
= [](auto h) {
return md * (1 - h * h);
}
Examples
free_surface.cpp.

Definition at line 227 of file free_surface.cpp.

◆ get_M2_dh

auto get_M2_dh = [](auto h) { return -md * 2 * h; }
Examples
free_surface.cpp.

Definition at line 231 of file free_surface.cpp.

◆ get_M3

auto get_M3
Initial value:
= [](auto h) {
const double h2 = h * h;
const double h3 = h2 * h;
if (h >= 0)
return md * (2 * h3 - 3 * h2 + 1);
else
return md * (-2 * h3 - 3 * h2 + 1);
}
Examples
free_surface.cpp.

Definition at line 233 of file free_surface.cpp.

◆ get_M3_dh

auto get_M3_dh
Initial value:
= [](auto h) {
if (h >= 0)
return md * (6 * h * (h - 1));
else
return md * (-6 * h * (h + 1));
}
Examples
free_surface.cpp.

Definition at line 242 of file free_surface.cpp.

◆ get_M_dh

auto get_M_dh = [](auto h) { return get_M0_dh(h); }
Examples
free_surface.cpp.

Definition at line 250 of file free_surface.cpp.

◆ get_projection_bit

auto get_projection_bit = []() { return 2 * get_start_bit() + 4; }
Examples
free_surface.cpp.

Definition at line 154 of file free_surface.cpp.

◆ get_skin_child_bit

auto get_skin_child_bit = []() { return 2 * get_start_bit() + 3; }
Examples
free_surface.cpp.

Definition at line 153 of file free_surface.cpp.

◆ get_skin_parent_bit

auto get_skin_parent_bit = []() { return 2 * get_start_bit() + 2; }
Examples
free_surface.cpp.

Definition at line 152 of file free_surface.cpp.

◆ get_skin_projection_bit

auto get_skin_projection_bit = []() { return 2 * get_start_bit() + 5; }
Examples
free_surface.cpp.

Definition at line 155 of file free_surface.cpp.

◆ get_start_bit

auto get_start_bit
Initial value:
= []() {
return nb_levels + 1;
}
Examples
free_surface.cpp.

Definition at line 146 of file free_surface.cpp.

◆ h

double h = 0.01 / 8
Examples
free_surface.cpp.

Definition at line 169 of file free_surface.cpp.

◆ help

char help[] = "...\n\n"
static
Examples
free_surface.cpp.

Definition at line 17 of file free_surface.cpp.

◆ I

constexpr IntegrationType I
constexpr
Initial value:
Examples
free_surface.cpp.

Definition at line 82 of file free_surface.cpp.

◆ i

Examples
free_surface.cpp.

Definition at line 132 of file free_surface.cpp.

◆ init_h

auto init_h
Initial value:
= [](double r, double y, double theta) {
return bubble_device(r, y, theta);
}

Initialisation function.

Note
If UMs are compiled with Python to initialise phase field "H" surface.py function is used, which has to be present in execution folder.
Examples
free_surface.cpp, and shallow_wave.cpp.

Definition at line 295 of file free_surface.cpp.

◆ integration_rule

auto integration_rule = [](int, int, int) { return 2 * order + 1; }

◆ j

Examples
free_surface.cpp.

Definition at line 133 of file free_surface.cpp.

◆ k

Examples
free_surface.cpp.

Definition at line 134 of file free_surface.cpp.

◆ kappa

double kappa = (3. / (4. * std::sqrt(2. * W))) * (lambda / eta)
Examples
free_surface.cpp.

Definition at line 183 of file free_surface.cpp.

◆ kernel_eye

auto kernel_eye
Initial value:
= [](double r, double y, double) {
constexpr double y0 = 0.5;
constexpr double R = 0.4;
y -= y0;
const double d = std::sqrt(r * r + y * y);
return tanh((R - d) / (eta * std::sqrt(2)));
}
Examples
free_surface.cpp.

Definition at line 270 of file free_surface.cpp.

◆ kernel_oscillation

auto kernel_oscillation
Initial value:
= [](double r, double y, double) {
constexpr int n = 3;
constexpr double R = 0.0125;
constexpr double A = R * 0.2;
const double theta = atan2(r, y);
const double w = R + A * cos(n * theta);
const double d = std::sqrt(r * r + y * y);
return tanh((w - d) / (eta * std::sqrt(2)));
}
Examples
free_surface.cpp.

Definition at line 260 of file free_surface.cpp.

◆ l

Examples
free_surface.cpp.

Definition at line 135 of file free_surface.cpp.

◆ lambda

double lambda = 73

surface tension

Examples
free_surface.cpp.

Definition at line 165 of file free_surface.cpp.

◆ marker

auto marker = [](auto b) { return BitRefLevel().set(BITREFLEVEL_SIZE - b); }
Examples
free_surface.cpp.

Definition at line 313 of file free_surface.cpp.

◆ md

double md = 1e-2
Examples
free_surface.cpp.

Definition at line 174 of file free_surface.cpp.

◆ mu_ave

double mu_ave = (mu_p + mu_m) / 2
Examples
free_surface.cpp.

Definition at line 180 of file free_surface.cpp.

◆ mu_diff

double mu_diff = (mu_p - mu_m) / 2
Examples
free_surface.cpp.

Definition at line 181 of file free_surface.cpp.

◆ mu_m

double mu_m = 0.010101 * 1e2
Examples
free_surface.cpp.

Definition at line 162 of file free_surface.cpp.

◆ mu_p

double mu_p = 0.000182 * 1e2
Examples
free_surface.cpp.

Definition at line 164 of file free_surface.cpp.

◆ my_max

auto my_max = [](const double x) { return (x - 1 + std::abs(x + 1)) / 2; }
Examples
free_surface.cpp.

Definition at line 201 of file free_surface.cpp.

◆ my_min

auto my_min = [](const double x) { return (x + 1 - std::abs(x - 1)) / 2; }
Examples
free_surface.cpp.

Definition at line 202 of file free_surface.cpp.

◆ nb_levels

int nb_levels = 4
Examples
free_surface.cpp.

Definition at line 141 of file free_surface.cpp.

◆ order

int order = 3

approximation order

Examples
free_surface.cpp.

Definition at line 140 of file free_surface.cpp.

◆ phase_function

auto phase_function
Initial value:
= [](const double h, const double diff, const double ave) {
return diff * h + ave;
}
Examples
free_surface.cpp.

Definition at line 211 of file free_surface.cpp.

◆ refine_overlap

int refine_overlap = 4
Examples
free_surface.cpp.

Definition at line 142 of file free_surface.cpp.

◆ rho_ave

double rho_ave = (rho_p + rho_m) / 2
Examples
free_surface.cpp.

Definition at line 178 of file free_surface.cpp.

◆ rho_diff

double rho_diff = (rho_p - rho_m) / 2
Examples
free_surface.cpp.

Definition at line 179 of file free_surface.cpp.

◆ rho_m

double rho_m = 0.998
Examples
free_surface.cpp.

Definition at line 161 of file free_surface.cpp.

◆ rho_p

double rho_p = 0.0012
Examples
free_surface.cpp.

Definition at line 163 of file free_surface.cpp.

◆ save_range

auto save_range
Initial value:
= [](moab::Interface &moab, const std::string name,
const Range r) {
if (get_global_size(r.size())) {
auto out_meshset = get_temp_meshset_ptr(moab);
CHKERR moab.add_entities(*out_meshset, r);
CHKERR moab.write_file(name.c_str(), "MOAB", "PARALLEL=WRITE_PART",
out_meshset->get_ptr(), 1);
}
}
Examples
free_surface.cpp.

Definition at line 324 of file free_surface.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM = 2
constexpr
Examples
free_surface.cpp.

Definition at line 78 of file free_surface.cpp.

◆ t_kd

constexpr auto t_kd = FTensor::Kronecker_Delta_symmetric<int>()
constexpr

◆ tol

double tol = std::numeric_limits<float>::epsilon()
Examples
free_surface.cpp.

Definition at line 176 of file free_surface.cpp.

◆ tsPrePostProc

boost::weak_ptr<TSPrePostProc> tsPrePostProc
static
Examples
free_surface.cpp.

Definition at line 467 of file free_surface.cpp.

◆ U_FIELD_DIM

constexpr int U_FIELD_DIM = SPACE_DIM
constexpr
Examples
free_surface.cpp.

Definition at line 79 of file free_surface.cpp.

◆ W

double W = 0.25
Examples
ADOLCPlasticityMaterialModels.hpp, and free_surface.cpp.

Definition at line 166 of file free_surface.cpp.

◆ wetting_angle

auto wetting_angle = [](double water_level) { return water_level; }
Examples
free_surface.cpp.

Definition at line 310 of file free_surface.cpp.

◆ wetting_angle_sub_stepping

auto wetting_angle_sub_stepping
Initial value:
= [](auto ts_step) {
constexpr int sub_stepping = 16;
return std::min(1., static_cast<double>(ts_step) / sub_stepping);
}
Examples
free_surface.cpp.

Definition at line 194 of file free_surface.cpp.

i
FTensor::Index< 'i', SPACE_DIM > i
Definition: free_surface.cpp:132
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
PlasticOps::w
double w(double eqiv, double dot_tau, double f, double sigma_y, double sigma_Y)
Definition: PlasticOpsGeneric.hpp:276
sdf_hertz.d
float d
Definition: sdf_hertz.py:5
MoFEM::FEMethod
structure for User Loop Methods on finite elements
Definition: LoopMethods.hpp:369
k
FTensor::Index< 'k', SPACE_DIM > k
Definition: free_surface.cpp:134
MoFEM::CoreInterface::get_field_bit_number
virtual FieldBitNumber get_field_bit_number(const std::string name) const =0
get field bit number
md
double md
Definition: free_surface.cpp:174
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
l
FTensor::Index< 'l', SPACE_DIM > l
Definition: free_surface.cpp:135
sdf.r
int r
Definition: sdf.py:8
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
h
double h
Definition: free_surface.cpp:169
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1975
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
coord_type
int coord_type
Definition: free_surface.cpp:75
R
@ R
Definition: free_surface.cpp:394
MoFEM::get_temp_meshset_ptr
auto get_temp_meshset_ptr(moab::Interface &moab)
Create smart pointer to temporary meshset.
Definition: Templates.hpp:1857
j
FTensor::Index< 'j', SPACE_DIM > j
Definition: free_surface.cpp:133
double
get_global_size
auto get_global_size
Definition: free_surface.cpp:318
nb_levels
int nb_levels
Definition: free_surface.cpp:141
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:47
help
static char help[]
Definition: free_surface.cpp:17
eta
double eta
Definition: free_surface.cpp:170
MoFEM::GAUSS
@ GAUSS
Definition: FormsIntegrators.hpp:128
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
t_kd
constexpr auto t_kd
Definition: free_surface.cpp:137
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
convert.n
n
Definition: convert.py:82
FreeSurface
Definition: free_surface.cpp:469
Range
MoFEM::CoreTmp< 0 >::Initialize
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:72
CYLINDRICAL
@ CYLINDRICAL
Definition: definitions.h:117
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:372
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1094
MoFEM::DMoFEMGetInterfacePtr
PetscErrorCode DMoFEMGetInterfacePtr(DM dm, MoFEM::Interface **m_field_ptr)
Get pointer to MoFEM::Interface.
Definition: DMMoFEM.cpp:418
FTensor::Ddg
Definition: Ddg_value.hpp:7
MoFEM::getProblemPtr
auto getProblemPtr(DM dm)
get problem pointer from DM
Definition: DMMoFEM.hpp:991
get_start_bit
auto get_start_bit
Definition: free_surface.cpp:146
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
bubble_device
auto bubble_device
Definition: free_surface.cpp:284
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
A
constexpr AssemblyType A
Definition: free_surface.cpp:81
F
@ F
Definition: free_surface.cpp:394