Skip to content

Commit

Permalink
Rename Blatter::neumann_bc_face() to vertical_cliff_face()
Browse files Browse the repository at this point in the history
The old name dates back the time when this code supported more generic Neumann BC.
  • Loading branch information
ckhroulev committed Oct 30, 2020
1 parent cee4149 commit 154bf21
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
11 changes: 6 additions & 5 deletions src/stressbalance/blatter/Blatter.cc
Expand Up @@ -217,13 +217,14 @@ bool Blatter::partially_submerged_face(int face, const double *z, const double *
}

/*!
* Return true if the current face is a part of the Neumann boundary, false otherwise.
* Return true if the current face is a part of the lateral ice boundary (i.e. at a
* vertical cliff), false otherwise.
*
* A face is a part of the Neumann boundary if all four nodes are Neumann nodes. If a node
* is *both* a Neumann and a Dirichlet node (this may happen), then we treat it as a
* Neumann node here: element.add_contribution() will do the right thing in this case.
* A face is a part of the lateral boundary if all four nodes are boundary nodes. If a node
* is *both* a boundary and a Dirichlet node (this may happen), then we treat it as a
* boundary node here: element.add_contribution() will do the right thing in this case.
*/
bool Blatter::neumann_bc_face(int face, const int *node_type) {
bool Blatter::vertical_cliff_face(int face, const int *node_type) {
auto nodes = fem::q13d::incident_nodes[face];

// number of nodes per face
Expand Down
2 changes: 1 addition & 1 deletion src/stressbalance/blatter/Blatter.hh
Expand Up @@ -115,7 +115,7 @@ protected:
double *surface,
double *sea_level) const;

virtual bool neumann_bc_face(int face, const int *node_type);
virtual bool vertical_cliff_face(int face, const int *node_type);

virtual bool dirichlet_node(const DMDALocalInfo &info, const fem::Element3::GlobalIndex& I);

Expand Down
2 changes: 1 addition & 1 deletion src/stressbalance/blatter/residual.cc
Expand Up @@ -385,7 +385,7 @@ void Blatter::compute_residual(DMDALocalInfo *petsc_info,
// lateral boundary
// loop over all vertical faces (see fem::q13d::incident_nodes for the order)
for (int f = 0; f < 4; ++f) {
if (neumann_bc_face(f, node_type)) {
if (vertical_cliff_face(f, node_type)) {
// use an N*N-point equally-spaced quadrature for partially-submerged faces
fem::Q1Element3Face *face = (partially_submerged_face(f, z, sea_level) ?
&m_face100 : &m_face4);
Expand Down
2 changes: 1 addition & 1 deletion src/stressbalance/blatter/verification/BlatterTestXY.cc
Expand Up @@ -39,7 +39,7 @@ BlatterTestXY::BlatterTestXY(IceGrid::ConstPtr grid, int Mz, int n_levels, int c
m_B = m_flow_law->hardness(1e5, 0);
}

bool BlatterTestXY::neumann_bc_face(int face, const int *node_type) {
bool BlatterTestXY::vertical_cliff_face(int face, const int *node_type) {
(void) face;
(void) node_type;

Expand Down
2 changes: 1 addition & 1 deletion src/stressbalance/blatter/verification/BlatterTestXY.hh
Expand Up @@ -48,7 +48,7 @@ public:
BlatterTestXY(IceGrid::ConstPtr grid, int Mz, int n_levels, int coarsening_factor);

protected:
bool neumann_bc_face(int face, const int *node_type);
bool vertical_cliff_face(int face, const int *node_type);

bool dirichlet_node(const DMDALocalInfo &info, const fem::Element3::GlobalIndex& I);

Expand Down
2 changes: 1 addition & 1 deletion src/stressbalance/blatter/verification/BlatterTestXZ.cc
Expand Up @@ -57,7 +57,7 @@ BlatterTestXZ::BlatterTestXZ(IceGrid::ConstPtr grid, int Mz, int n_levels, int c
m_g = m_config->get_number("constants.standard_gravity");
}

bool BlatterTestXZ::neumann_bc_face(int face, const int *node_type) {
bool BlatterTestXZ::vertical_cliff_face(int face, const int *node_type) {
(void) face;
(void) node_type;

Expand Down
2 changes: 1 addition & 1 deletion src/stressbalance/blatter/verification/BlatterTestXZ.hh
Expand Up @@ -48,7 +48,7 @@ public:
BlatterTestXZ(IceGrid::ConstPtr grid, int Mz, int n_levels, int coarsening_factor);

private:
bool neumann_bc_face(int face, const int *node_type);
bool vertical_cliff_face(int face, const int *node_type);

bool dirichlet_node(const DMDALocalInfo &info, const fem::Element3::GlobalIndex& I);

Expand Down
2 changes: 1 addition & 1 deletion src/stressbalance/blatter/verification/test_template.cc
Expand Up @@ -25,7 +25,7 @@ TestTemplate::TestTemplate(IceGrid::ConstPtr grid, int Mz, int n_levels, int coa
// empty
}

bool TestTemplate::neumann_bc_face(int face, const int *node_type) {
bool TestTemplate::vertical_cliff_face(int face, const int *node_type) {
(void) face;
(void) node_type;

Expand Down

0 comments on commit 154bf21

Please sign in to comment.