diff --git a/src/mechanics_driver.cpp b/src/mechanics_driver.cpp index 04735b8..47e06f8 100644 --- a/src/mechanics_driver.cpp +++ b/src/mechanics_driver.cpp @@ -296,7 +296,7 @@ int main(int argc, char *argv[]) if (mesh_order > toml_opt.order) { toml_opt.order = mesh_order; } - if (mesh_order < toml_opt.order) { + if (mesh_order <= toml_opt.order) { if (myid == 0) { printf("Increasing the order of the mesh to %d\n", toml_opt.order); } @@ -601,6 +601,14 @@ int main(int argc, char *argv[]) q_vonMises.UseDevice(true); matProps.UseDevice(true); + { + // fix me: should the mesh nodes be on the device? + GridFunction *nodes = &x_cur; // set a nodes grid function to global current configuration + int owns_nodes = 0; + pmesh->SwapNodes(nodes, owns_nodes); // pmesh has current configuration nodes + nodes = NULL; + } + SystemDriver oper(fe_space, toml_opt, matVars0, matVars1, sigma0, sigma1, matGrd, @@ -824,13 +832,6 @@ int main(int argc, char *argv[]) oper.SetTime(t); bool last_step = false; - { - // fix me: should the mesh nodes be on the device? - GridFunction *nodes = &x_cur; // set a nodes grid function to global current configuration - int owns_nodes = 0; - pmesh->SwapNodes(nodes, owns_nodes); // pmesh has current configuration nodes - nodes = NULL; - } double dt_real; diff --git a/src/mechanics_operator.cpp b/src/mechanics_operator.cpp index fa0a3a3..46ea230 100644 --- a/src/mechanics_operator.cpp +++ b/src/mechanics_operator.cpp @@ -214,14 +214,14 @@ NonlinearMechOperator::NonlinearMechOperator(ParFiniteElementSpace &fes, diag.SetSize(fe_space.GetTrueVSize(), Device::GetMemoryType()); diag.UseDevice(true); diag = 1.0; - prec_oper = new MechOperatorJacobiSmoother(diag, Hform->GetEssentialTrueDofs()); + prec_oper = new MechOperatorJacobiSmoother(diag, this->GetEssentialTrueDofs()); } else if (assembly == Assembly::EA) { Hform->SetAssemblyLevel(mfem::AssemblyLevel::ELEMENT, ElementDofOrdering::NATIVE); diag.SetSize(fe_space.GetTrueVSize(), Device::GetMemoryType()); diag.UseDevice(true); diag = 1.0; - prec_oper = new MechOperatorJacobiSmoother(diag, Hform->GetEssentialTrueDofs()); + prec_oper = new MechOperatorJacobiSmoother(diag, this->GetEssentialTrueDofs()); } // So, we're going to originally support non tensor-product type elements originally.