Skip to content
Permalink
Browse files

Merge pull request #13392 from lindsayad/dmgc-fix

Mortar deuce fixups
  • Loading branch information...
permcody committed May 9, 2019
2 parents e2375fd + 08a52b6 commit 86789e56699357b821fec8b4f517cd7fee1784ea
@@ -606,7 +606,7 @@ AutomaticMortarGeneration::projectSlaveNodesSinglePair(
Point nodal_normal = this->slave_node_to_nodal_normal.at(slave_node);

// Data structure for performing Nanoflann searches.
std::array<Real, 3> query_pt = {(*slave_node)(0), (*slave_node)(1), (*slave_node)(2)};
std::array<Real, 3> query_pt = {{(*slave_node)(0), (*slave_node)(1), (*slave_node)(2)}};

// The number of results we want to get. We'll look for a
// "few" nearest nodes, hopefully that is enough to let us
@@ -75,17 +75,17 @@ MortarConstraint::computeJacobian(Moose::MortarType mortar_type)
{
case MType::Slave:
test_space_size = _slave_var.dofIndices().size();
jacobian_types = {JType::SlaveSlave, JType::SlaveMaster, JType::SlaveLower};
jacobian_types = {{JType::SlaveSlave, JType::SlaveMaster, JType::SlaveLower}};
break;

case MType::Master:
test_space_size = _master_var.dofIndicesNeighbor().size();
jacobian_types = {JType::MasterSlave, JType::MasterMaster, JType::MasterLower};
jacobian_types = {{JType::MasterSlave, JType::MasterMaster, JType::MasterLower}};
break;

case MType::Lower:
test_space_size = _var ? _var->dofIndicesLower().size() : 0;
jacobian_types = {JType::LowerSlave, JType::LowerMaster, JType::LowerLower};
jacobian_types = {{JType::LowerSlave, JType::LowerMaster, JType::LowerLower}};
break;
}

@@ -117,26 +117,26 @@ MortarConstraint::computeJacobian(Moose::MortarType mortar_type)
break;
}

std::array<size_t, 3> shape_space_sizes{jvariable.dofIndices().size(),
jvariable.dofIndicesNeighbor().size(),
jvariable.dofIndicesLower().size()};
std::array<size_t, 3> shape_space_sizes{{jvariable.dofIndices().size(),
jvariable.dofIndicesNeighbor().size(),
jvariable.dofIndicesLower().size()}};
std::array<const VariablePhiValue *, 3> phis;
std::array<const VariablePhiGradient *, 3> grad_phis;
std::array<const VectorVariablePhiValue *, 3> vector_phis;
std::array<const VectorVariablePhiGradient *, 3> vector_grad_phis;
if (jvariable.isVector())
{
const auto & temp_var = static_cast<MooseVariableFE<RealVectorValue> &>(jvariable);
vector_phis = {&temp_var.phiFace(), &temp_var.phiFaceNeighbor(), &temp_var.phiLower()};
vector_phis = {{&temp_var.phiFace(), &temp_var.phiFaceNeighbor(), &temp_var.phiLower()}};
vector_grad_phis = {
&temp_var.gradPhiFace(), &temp_var.gradPhiFaceNeighbor(), &temp_var.gradPhiLower()};
{&temp_var.gradPhiFace(), &temp_var.gradPhiFaceNeighbor(), &temp_var.gradPhiLower()}};
}
else
{
const auto & temp_var = static_cast<MooseVariableFE<Real> &>(jvariable);
phis = {&temp_var.phiFace(), &temp_var.phiFaceNeighbor(), &temp_var.phiLower()};
phis = {{&temp_var.phiFace(), &temp_var.phiFaceNeighbor(), &temp_var.phiLower()}};
grad_phis = {
&temp_var.gradPhiFace(), &temp_var.gradPhiFaceNeighbor(), &temp_var.gradPhiLower()};
{&temp_var.gradPhiFace(), &temp_var.gradPhiFaceNeighbor(), &temp_var.gradPhiLower()}};
}

for (MooseIndex(3) type_index = 0; type_index < 3; ++type_index)
@@ -176,7 +176,7 @@
nl_max_its = 1000
dt = 0.1
end_time = 15
num_steps = 30
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
@@ -190,6 +190,15 @@

[Outputs]
file_base = frictionless_penalty_out
interval = 10
[./exodus]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]

[Contact]
@@ -52,6 +52,7 @@
requirement = "The mechanics system shall correctly predict the natural frequencies"
" of a massless Euler-Bernoulli beam modeled using beam elements"
" with a nodal masses placed at the ends."
petsc_version = '>=3.8'
[../]
[./dyn_euler_added_mass_file]
type = 'Exodiff'
@@ -106,6 +107,7 @@
requirement = "The mechanics system shall correctly model the response of a beam"
" modeled using beam elements in the presence of nodal mass,"
" nodal inertia and Rayleigh damping."
petsc_version = '>=3.8'
[../]
[./dyn_euler_added_mass_inertia_damping_ti]
type = 'Exodiff'
@@ -7,6 +7,7 @@
exodiff = 'gap-conductance_out.e'
mesh_mode = 'REPLICATED'
requirement = 'We shall be able to do gap conductance on a dynamic mesh using auxiliary displacements'
max_parallel = 2 # Restrict this test to 2 cores until I can take the time to understand the failure
[../]
[dynamic_gap_jacobian]
type = PetscJacobianTester

0 comments on commit 86789e5

Please sign in to comment.
You can’t perform that action at this time.