diff --git a/src/M2ulPhyS2Boltzmann.cpp b/src/M2ulPhyS2Boltzmann.cpp index a8aba27b6..8bdf6a5cc 100644 --- a/src/M2ulPhyS2Boltzmann.cpp +++ b/src/M2ulPhyS2Boltzmann.cpp @@ -90,12 +90,12 @@ void M2ulPhyS::fetch(TPS::Tps2Boltzmann &interface) { mfem::ParFiniteElementSpace *reaction_rates_fes(&(interface.NativeFes(TPS::Tps2Boltzmann::Index::ReactionRates))); externalReactionRates.reset(new mfem::ParGridFunction(reaction_rates_fes)); interface.interpolateToNativeFES(*externalReactionRates, TPS::Tps2Boltzmann::Index::ReactionRates); - #if defined(_CUDA_) || defined(_HIP_) - const double * data(externalReactionRates->Read() ); - int size(externalReactionRates->FESpace()->GetNDofs() ); - assert(externalReactionRates->FESpace()->GetOrdering() == mfem::Ordering::byNODES); - gpu::deviceSetChemistryReactionData<<<1, 1>>>(data, size, chemistry_); - #else - chemistry_->setGridFunctionRates(*externalReactionRates); - #endif +#if defined(_CUDA_) || defined(_HIP_) + const double *data(externalReactionRates->Read()); + int size(externalReactionRates->FESpace()->GetNDofs()); + assert(externalReactionRates->FESpace()->GetOrdering() == mfem::Ordering::byNODES); + gpu::deviceSetChemistryReactionData<<<1, 1>>>(data, size, chemistry_); +#else + chemistry_->setGridFunctionRates(*externalReactionRates); +#endif } diff --git a/src/calorically_perfect.cpp b/src/calorically_perfect.cpp index 539a52a4a..c182c14e6 100644 --- a/src/calorically_perfect.cpp +++ b/src/calorically_perfect.cpp @@ -115,10 +115,23 @@ CaloricallyPerfectThermoChem::CaloricallyPerfectThermoChem(mfem::ParMesh *pmesh, tpsP_->getInput("loMach/openSystem", domain_is_open_, false); - tpsP_->getInput("loMach/calperfect/linear-solver-rtol", rtol_, 1e-12); - tpsP_->getInput("loMach/calperfect/linear-solver-max-iter", max_iter_, 1000); - tpsP_->getInput("loMach/calperfect/linear-solver-verbosity", pl_solve_, 0); + // NOTE: this should default to FALSE (but would break all related test cases...) tpsP_->getInput("loMach/calperfect/numerical-integ", numerical_integ_, true); + + tpsP_->getInput("loMach/calperfect/linear-solver-rtol", rtol_, default_rtol_); + tpsP_->getInput("loMach/calperfect/linear-solver-max-iter", max_iter_, default_max_iter_); + tpsP_->getInput("loMach/calperfect/linear-solver-verbosity", pl_solve_, 0); + + // not deleting above block to maintain backwards-compatability + tpsP_->getInput("loMach/calperfect/hsolve-rtol", hsolve_rtol_, rtol_); + tpsP_->getInput("loMach/calperfect/hsolve-atol", hsolve_atol_, default_atol_); + tpsP_->getInput("loMach/calperfect/hsolve-max-iter", hsolve_max_iter_, max_iter_); + tpsP_->getInput("loMach/calperfect/hsolve-verbosity", hsolve_pl_, pl_solve_); + + tpsP_->getInput("loMach/calperfect/msolve-rtol", mass_inverse_rtol_, rtol_); + tpsP_->getInput("loMach/calperfect/msolve-atol", mass_inverse_atol_, default_atol_); + tpsP_->getInput("loMach/calperfect/msolve-max-iter", mass_inverse_max_iter_, max_iter_); + tpsP_->getInput("loMach/calperfect/msolve-verbosity", mass_inverse_pl_, pl_solve_); } CaloricallyPerfectThermoChem::~CaloricallyPerfectThermoChem() { @@ -400,6 +413,9 @@ void CaloricallyPerfectThermoChem::initializeSelf() { void CaloricallyPerfectThermoChem::initializeOperators() { dt_ = time_coeff_.dt; + // polynomial order for smoother of precons + smoother_poly_order_ = order_ + 1; + Array empty; // GLL integration rule (Numerical Integration) @@ -438,9 +454,6 @@ void CaloricallyPerfectThermoChem::initializeOperators() { at_blfi->SetIntRule(&ir_nli); } At_form_->AddDomainIntegrator(at_blfi); - if (partial_assembly_) { - At_form_->SetAssemblyLevel(AssemblyLevel::PARTIAL); - } At_form_->Assemble(); At_form_->FormSystemMatrix(empty, At_); if (rank0_) std::cout << "CaloricallyPerfectThermoChem At operator set" << endl; @@ -466,9 +479,6 @@ void CaloricallyPerfectThermoChem::initializeOperators() { // msrho_blfi->SetIntRule(&ir_di); } MsRho_form_->AddDomainIntegrator(msrho_blfi); - if (partial_assembly_) { - MsRho_form_->SetAssemblyLevel(AssemblyLevel::PARTIAL); - } MsRho_form_->Assemble(); MsRho_form_->FormSystemMatrix(empty, MsRho_); if (rank0_) std::cout << "CaloricallyPerfectThermoChem MsRho operator set" << endl; @@ -483,9 +493,6 @@ void CaloricallyPerfectThermoChem::initializeOperators() { } Ht_form_->AddDomainIntegrator(hmt_blfi); Ht_form_->AddDomainIntegrator(hdt_blfi); - if (partial_assembly_) { - Ht_form_->SetAssemblyLevel(AssemblyLevel::PARTIAL); - } Ht_form_->Assemble(); Ht_form_->FormSystemMatrix(temp_ess_tdof_, Ht_); if (rank0_) std::cout << "CaloricallyPerfectThermoChem Ht operator set" << endl; @@ -496,33 +503,34 @@ void CaloricallyPerfectThermoChem::initializeOperators() { MsInvPC_ = new OperatorJacobiSmoother(diag_pa, empty); } else { MsInvPC_ = new HypreSmoother(*Ms_.As()); - dynamic_cast(MsInvPC_)->SetType(HypreSmoother::Jacobi, 1); + dynamic_cast(MsInvPC_)->SetType(HypreSmoother::Jacobi, smoother_passes_); + dynamic_cast(MsInvPC_)->SetSOROptions(smoother_relax_weight_, smoother_relax_omega_); + dynamic_cast(MsInvPC_)->SetPolyOptions(smoother_poly_order_, smoother_poly_fraction_, + smoother_eig_est_); } MsInv_ = new CGSolver(sfes_->GetComm()); MsInv_->iterative_mode = false; MsInv_->SetOperator(*Ms_); MsInv_->SetPreconditioner(*MsInvPC_); - MsInv_->SetPrintLevel(pl_solve_); - MsInv_->SetRelTol(rtol_); - MsInv_->SetMaxIter(max_iter_); + MsInv_->SetPrintLevel(mass_inverse_pl_); + MsInv_->SetRelTol(mass_inverse_rtol_); + MsInv_->SetAbsTol(mass_inverse_atol_); + MsInv_->SetMaxIter(mass_inverse_max_iter_); - if (partial_assembly_) { - Vector diag_pa(sfes_->GetTrueVSize()); - Ht_form_->AssembleDiagonal(diag_pa); - HtInvPC_ = new OperatorJacobiSmoother(diag_pa, temp_ess_tdof_); - } else { - HtInvPC_ = new HypreSmoother(*Ht_.As()); - dynamic_cast(HtInvPC_)->SetType(HypreSmoother::Jacobi, 1); - } + HtInvPC_ = new HypreSmoother(*Ht_.As()); + dynamic_cast(HtInvPC_)->SetType(HypreSmoother::Jacobi, smoother_passes_); + dynamic_cast(HtInvPC_)->SetSOROptions(hsmoother_relax_weight_, hsmoother_relax_omega_); + dynamic_cast(HtInvPC_)->SetPolyOptions(smoother_poly_order_, smoother_poly_fraction_, + smoother_eig_est_); HtInv_ = new CGSolver(sfes_->GetComm()); - HtInv_->iterative_mode = true; HtInv_->SetOperator(*Ht_); HtInv_->SetPreconditioner(*HtInvPC_); - HtInv_->SetPrintLevel(pl_solve_); - HtInv_->SetRelTol(rtol_); - HtInv_->SetMaxIter(max_iter_); + HtInv_->SetPrintLevel(hsolve_pl_); + HtInv_->SetRelTol(hsolve_rtol_); + HtInv_->SetAbsTol(hsolve_atol_); + HtInv_->SetMaxIter(hsolve_max_iter_); if (rank0_) std::cout << "Temperature operators set" << endl; // Qt ..................................... @@ -546,15 +554,19 @@ void CaloricallyPerfectThermoChem::initializeOperators() { MqInvPC_ = new OperatorJacobiSmoother(diag_pa, empty); } else { MqInvPC_ = new HypreSmoother(*Mq_.As()); - dynamic_cast(MqInvPC_)->SetType(HypreSmoother::Jacobi, 1); + dynamic_cast(MqInvPC_)->SetType(HypreSmoother::Jacobi, smoother_passes_); + dynamic_cast(MqInvPC_)->SetSOROptions(smoother_relax_weight_, smoother_relax_omega_); + dynamic_cast(MqInvPC_)->SetPolyOptions(smoother_poly_order_, smoother_poly_fraction_, + smoother_eig_est_); } MqInv_ = new CGSolver(sfes_->GetComm()); MqInv_->iterative_mode = false; MqInv_->SetOperator(*Mq_); MqInv_->SetPreconditioner(*MqInvPC_); - MqInv_->SetPrintLevel(pl_solve_); - MqInv_->SetRelTol(rtol_); - MqInv_->SetMaxIter(max_iter_); + MqInv_->SetPrintLevel(mass_inverse_pl_); + MqInv_->SetRelTol(mass_inverse_rtol_); + MqInv_->SetAbsTol(mass_inverse_atol_); + MqInv_->SetMaxIter(mass_inverse_max_iter_); LQ_form_ = new ParBilinearForm(sfes_); auto *lqd_blfi = new DiffusionIntegrator(*thermal_diff_total_coeff_); @@ -664,15 +676,7 @@ void CaloricallyPerfectThermoChem::step() { Ht_form_->Update(); Ht_form_->Assemble(); Ht_form_->FormSystemMatrix(temp_ess_tdof_, Ht_); - HtInv_->SetOperator(*Ht_); - if (partial_assembly_) { - delete HtInvPC_; - Vector diag_pa(sfes_->GetTrueVSize()); - Ht_form_->AssembleDiagonal(diag_pa); - HtInvPC_ = new OperatorJacobiSmoother(diag_pa, temp_ess_tdof_); - HtInv_->SetPreconditioner(*HtInvPC_); - } // Prepare for the solve for (auto &temp_dbc : temp_dbcs_) { @@ -681,12 +685,7 @@ void CaloricallyPerfectThermoChem::step() { sfes_->GetRestrictionMatrix()->MultTranspose(resT_, resT_gf_); Vector Xt2, Bt2; - if (partial_assembly_) { - auto *HC = Ht_.As(); - EliminateRHS(*Ht_form_, *HC, temp_ess_tdof_, Tn_next_gf_, resT_gf_, Xt2, Bt2, 1); - } else { - Ht_form_->FormLinearSystem(temp_ess_tdof_, Tn_next_gf_, resT_gf_, Ht_, Xt2, Bt2, 1); - } + Ht_form_->FormLinearSystem(temp_ess_tdof_, Tn_next_gf_, resT_gf_, Ht_, Xt2, Bt2, 1); // solve helmholtz eq for temp HtInv_->Mult(Bt2, Xt2); diff --git a/src/calorically_perfect.hpp b/src/calorically_perfect.hpp index 570124e02..118cd3dd5 100644 --- a/src/calorically_perfect.hpp +++ b/src/calorically_perfect.hpp @@ -76,15 +76,39 @@ class CaloricallyPerfectThermoChem : public ThermoChemModelBase { // Flags bool rank0_; /**< true if this is rank 0 */ bool partial_assembly_ = false; /**< Enable/disable partial assembly of forms. */ - bool numerical_integ_ = true; /**< Enable/disable numerical integration rules of forms. */ + bool numerical_integ_ = false; /**< Enable/disable numerical integration rules of forms. */ bool constant_viscosity_ = false; /**< Enable/disable constant viscosity */ bool constant_density_ = false; /**< Enable/disable constant density */ bool domain_is_open_ = false; /**< true if domain is open */ // Linear-solver-related options - int pl_solve_ = 0; /**< Verbosity level passed to mfem solvers */ - int max_iter_; /**< Maximum number of linear solver iterations */ - double rtol_ = 1e-12; /**< Linear solver relative tolerance */ + int smoother_poly_order_; + double smoother_poly_fraction_ = 0.75; + int smoother_eig_est_ = 10; + int smoother_passes_ = 1; + double smoother_relax_weight_ = 0.4; + double smoother_relax_omega_ = 1.0; + double hsmoother_relax_weight_ = 0.8; + double hsmoother_relax_omega_ = 0.1; + + // solver tolerance options + int pl_solve_; /**< Verbosity level passed to mfem solvers */ + int max_iter_; /**< Maximum number of linear solver iterations */ + double rtol_; /**< Linear solver relative tolerance */ + + int default_max_iter_ = 1000; + double default_rtol_ = 1.0e-10; + double default_atol_ = 1.0e-12; + + int mass_inverse_pl_ = 0; + int mass_inverse_max_iter_; + double mass_inverse_rtol_; + double mass_inverse_atol_; + + int hsolve_pl_ = 0; + int hsolve_max_iter_; + double hsolve_rtol_; + double hsolve_atol_; // Boundary condition info Array temp_ess_attr_; /**< List of patches with Dirichlet BC on temperature */ diff --git a/src/chemistry.cpp b/src/chemistry.cpp index fed7512d3..5960b463e 100644 --- a/src/chemistry.cpp +++ b/src/chemistry.cpp @@ -109,7 +109,7 @@ MFEM_HOST_DEVICE Chemistry::~Chemistry() { } } -MFEM_HOST_DEVICE void Chemistry::setRates(const double * data, int size) { +MFEM_HOST_DEVICE void Chemistry::setRates(const double *data, int size) { for (int r = 0; r < numReactions_; r++) { if (reactions_[r]->reactionModel == GRIDFUNCTION_RXN) { GridFunctionReaction *rx = (GridFunctionReaction *)(reactions_[r]); diff --git a/src/chemistry.hpp b/src/chemistry.hpp index 906d249af..79af5a885 100644 --- a/src/chemistry.hpp +++ b/src/chemistry.hpp @@ -97,7 +97,7 @@ class Chemistry { // Set the grid function rates for GRIDFUNCTION_RXN reaction types void setGridFunctionRates(mfem::GridFunction &f); - MFEM_HOST_DEVICE void setRates(const double * data, int size); + MFEM_HOST_DEVICE void setRates(const double *data, int size); // return Vector of reaction rate coefficients, with the size of numReaction_. // WARNING(marc) I have removed "virtual" qualifier here assuming these functions will not diff --git a/src/gpu_constructor.cpp b/src/gpu_constructor.cpp index bf58b88a4..62c5d6f1b 100644 --- a/src/gpu_constructor.cpp +++ b/src/gpu_constructor.cpp @@ -124,11 +124,11 @@ __global__ void freeDeviceRadiation(Radiation *radiation) { //--------------------------------------------------- // And finally device setters //--------------------------------------------------- -__global__ void deviceSetGridFunctionReactionData(const double * data, int size, GridFunctionReaction * reaction) { +__global__ void deviceSetGridFunctionReactionData(const double *data, int size, GridFunctionReaction *reaction) { reaction->setData(data, size); } -__global__ void deviceSetChemistryReactionData(const double * data, int size, Chemistry * chem) { +__global__ void deviceSetChemistryReactionData(const double *data, int size, Chemistry *chem) { chem->setRates(data, size); } diff --git a/src/gpu_constructor.hpp b/src/gpu_constructor.hpp index 64e98d34d..18d516dd2 100644 --- a/src/gpu_constructor.hpp +++ b/src/gpu_constructor.hpp @@ -161,8 +161,8 @@ __global__ void freeDeviceChemistry(Chemistry *chem); __global__ void freeDeviceRadiation(Radiation *radiation); //! Set the data to a GridFunctionReaction -__global__ void deviceSetGridFunctionReactionData(const double * data, int size, GridFunctionReaction * reaction); -__global__ void deviceSetChemistryReactionData(const double * data, int size, Chemistry * chem); +__global__ void deviceSetGridFunctionReactionData(const double *data, int size, GridFunctionReaction *reaction); +__global__ void deviceSetChemistryReactionData(const double *data, int size, Chemistry *chem); #endif // cuda or hip } // namespace gpu diff --git a/src/reaction.cpp b/src/reaction.cpp index 18efb6072..54a02e478 100644 --- a/src/reaction.cpp +++ b/src/reaction.cpp @@ -84,12 +84,12 @@ MFEM_HOST_DEVICE GridFunctionReaction::GridFunctionReaction(int comp) MFEM_HOST_DEVICE GridFunctionReaction::~GridFunctionReaction() {} -MFEM_HOST_DEVICE void GridFunctionReaction::setData(const double * data, int size) { +MFEM_HOST_DEVICE void GridFunctionReaction::setData(const double *data, int size) { data_ = data + comp_ * size_; size_ = size; } -void GridFunctionReaction::setGridFunction(const mfem::GridFunction & f) { +void GridFunctionReaction::setGridFunction(const mfem::GridFunction &f) { size_ = f.FESpace()->GetNDofs(); assert(comp_ < f.FESpace()->GetVDim()); assert(f.FESpace()->GetOrdering() == mfem::Ordering::byNODES); diff --git a/src/reaction.hpp b/src/reaction.hpp index c563e0dd8..078c26faf 100644 --- a/src/reaction.hpp +++ b/src/reaction.hpp @@ -129,9 +129,9 @@ class GridFunctionReaction : public Reaction { MFEM_HOST_DEVICE virtual ~GridFunctionReaction(); - void setGridFunction(const mfem::GridFunction & f); + void setGridFunction(const mfem::GridFunction &f); - MFEM_HOST_DEVICE void setData(const double * data, int size); + MFEM_HOST_DEVICE void setData(const double *data, int size); MFEM_HOST_DEVICE virtual double computeRateCoefficient([[maybe_unused]] const double &T_h, [[maybe_unused]] const double &T_e, const int &dofindex, diff --git a/src/tomboulides.cpp b/src/tomboulides.cpp index d83265b6d..0932a1889 100644 --- a/src/tomboulides.cpp +++ b/src/tomboulides.cpp @@ -115,6 +115,19 @@ Tomboulides::Tomboulides(mfem::ParMesh *pmesh, int vorder, int porder, temporalS // locates quadrature points on the axis, which can lead to // singular mass matrices and evaluations of 1/r = 1/0. if (axisym_) assert(!numerical_integ_); + + // exposing solver tolerance options to user + tps->getInput("loMach/tomboulides/psolve-atol", pressure_solve_atol_, default_atol_); + tps->getInput("loMach/tomboulides/hsolve-atol", hsolve_atol_, default_atol_); + tps->getInput("loMach/tomboulides/msolve-atol", mass_inverse_atol_, default_atol_); + + tps->getInput("loMach/tomboulides/psolve-rtol", pressure_solve_rtol_, default_rtol_); + tps->getInput("loMach/tomboulides/hsolve-rtol", hsolve_rtol_, default_rtol_); + tps->getInput("loMach/tomboulides/msolve-rtol", mass_inverse_rtol_, default_rtol_); + + tps->getInput("loMach/tomboulides/psolve-maxIters", pressure_solve_max_iter_, default_max_iter_); + tps->getInput("loMach/tomboulides/hsolve-maxIters", hsolve_max_iter_, default_max_iter_); + tps->getInput("loMach/tomboulides/msolve-maxIters", mass_inverse_max_iter_, default_max_iter_); } } @@ -562,6 +575,16 @@ void Tomboulides::initializeSelf() { void Tomboulides::initializeOperators() { assert(thermo_interface_ != NULL); + // polynomial order for smoother of precons + smoother_poly_order_ = vorder_ + 1; + + // AMG strength threshold + if (dim_ == 2) { + pressure_strength_thres_ = 0.25; + } else { + pressure_strength_thres_ = 0.6; + } + // Create all the Coefficient objects we need rho_coeff_ = new GridFunctionCoefficient(thermo_interface_->density); @@ -657,16 +680,13 @@ void Tomboulides::initializeOperators() { L_iorho_blfi->SetIntRule(&ir_ni_p); } L_iorho_form_->AddDomainIntegrator(L_iorho_blfi); - if (partial_assembly_) { - L_iorho_form_->SetAssemblyLevel(AssemblyLevel::PARTIAL); - } L_iorho_form_->Assemble(); L_iorho_form_->FormSystemMatrix(pres_ess_tdof_, L_iorho_op_); - // Variable coefficient Laplacian inverse + // Variable coefficient Laplacian inverse (gets destoryed and rebuilt every step) L_iorho_lor_ = new ParLORDiscretization(*L_iorho_form_, pres_ess_tdof_); L_iorho_inv_pc_ = new HypreBoomerAMG(L_iorho_lor_->GetAssembledMatrix()); - L_iorho_inv_pc_->SetPrintLevel(0); + L_iorho_inv_pc_->SetPrintLevel(pressure_solve_pl_); L_iorho_inv_ortho_pc_ = new OrthoSolver(pfes_->GetComm()); L_iorho_inv_ortho_pc_->SetSolver(*L_iorho_inv_pc_); @@ -745,9 +765,6 @@ void Tomboulides::initializeOperators() { msr_blfi->SetIntRule(&ir_ni_p); } Ms_rho_form_->AddDomainIntegrator(msr_blfi); - if (partial_assembly_) { - Ms_rho_form_->SetAssemblyLevel(AssemblyLevel::PARTIAL); - } Ms_rho_form_->Assemble(); Ms_rho_form_->FormSystemMatrix(empty, Ms_rho_op_); @@ -781,9 +798,6 @@ void Tomboulides::initializeOperators() { mvr_blfi->SetIntRule(&ir_ni_v); } Mv_rho_form_->AddDomainIntegrator(mvr_blfi); - if (partial_assembly_) { - Mv_rho_form_->SetAssemblyLevel(AssemblyLevel::PARTIAL); - } Mv_rho_form_->Assemble(); Mv_rho_form_->FormSystemMatrix(empty, Mv_rho_op_); @@ -794,29 +808,32 @@ void Tomboulides::initializeOperators() { Mv_inv_pc_ = new OperatorJacobiSmoother(diag_pa, empty); } else { Mv_inv_pc_ = new HypreSmoother(*Mv_op_.As()); - dynamic_cast(Mv_inv_pc_)->SetType(HypreSmoother::Jacobi, 1); + dynamic_cast(Mv_inv_pc_)->SetType(smoother_type_, smoother_passes_); + dynamic_cast(Mv_inv_pc_)->SetSOROptions(smoother_relax_weight_, smoother_relax_omega_); + dynamic_cast(Mv_inv_pc_) + ->SetPolyOptions(smoother_poly_order_, smoother_poly_fraction_, smoother_eig_est_); } Mv_inv_ = new CGSolver(vfes_->GetComm()); Mv_inv_->iterative_mode = false; Mv_inv_->SetOperator(*Mv_op_); Mv_inv_->SetPreconditioner(*Mv_inv_pc_); Mv_inv_->SetPrintLevel(mass_inverse_pl_); + Mv_inv_->SetAbsTol(mass_inverse_atol_); Mv_inv_->SetRelTol(mass_inverse_rtol_); Mv_inv_->SetMaxIter(mass_inverse_max_iter_); - if (partial_assembly_) { - Vector diag_pa(vfes_->GetTrueVSize()); - Mv_rho_form_->AssembleDiagonal(diag_pa); - Mv_rho_inv_pc_ = new OperatorJacobiSmoother(diag_pa, empty); - } else { - Mv_rho_inv_pc_ = new HypreSmoother(*Mv_rho_op_.As()); - dynamic_cast(Mv_rho_inv_pc_)->SetType(HypreSmoother::Jacobi, 1); - } + Mv_rho_inv_pc_ = new HypreSmoother(*Mv_rho_op_.As()); + dynamic_cast(Mv_rho_inv_pc_)->SetType(smoother_type_, smoother_passes_); + dynamic_cast(Mv_rho_inv_pc_)->SetSOROptions(smoother_relax_weight_, smoother_relax_omega_); + dynamic_cast(Mv_rho_inv_pc_) + ->SetPolyOptions(smoother_poly_order_, smoother_poly_fraction_, smoother_eig_est_); + Mv_rho_inv_ = new CGSolver(vfes_->GetComm()); Mv_rho_inv_->iterative_mode = false; Mv_rho_inv_->SetOperator(*Mv_rho_op_); Mv_rho_inv_->SetPreconditioner(*Mv_rho_inv_pc_); Mv_rho_inv_->SetPrintLevel(mass_inverse_pl_); + Mv_rho_inv_->SetAbsTol(mass_inverse_atol_); Mv_rho_inv_->SetRelTol(mass_inverse_rtol_); Mv_rho_inv_->SetMaxIter(mass_inverse_max_iter_); @@ -878,29 +895,22 @@ void Tomboulides::initializeOperators() { auto *hfv_blfi = new VectorMassIntegrator(*visc_forcing_coeff_); Hv_form_->AddDomainIntegrator(hfv_blfi); } - if (partial_assembly_) { - // Partial assembly is not supported for variable coefficient - // VectorMassIntegrator (as of mfem 4.5.2 at least) - assert(false); - Hv_form_->SetAssemblyLevel(AssemblyLevel::PARTIAL); - } Hv_form_->Assemble(); Hv_form_->FormSystemMatrix(vel_ess_tdof_, Hv_op_); // Helmholtz solver - if (partial_assembly_) { - Vector diag_pa(vfes_->GetTrueVSize()); - Hv_form_->AssembleDiagonal(diag_pa); - Hv_inv_pc_ = new OperatorJacobiSmoother(diag_pa, vel_ess_tdof_); - } else { - Hv_inv_pc_ = new HypreSmoother(*Hv_op_.As()); - dynamic_cast(Hv_inv_pc_)->SetType(HypreSmoother::Jacobi, 1); - } + Hv_inv_pc_ = new HypreSmoother(*Hv_op_.As()); + dynamic_cast(Hv_inv_pc_)->SetType(smoother_type_, smoother_passes_); + dynamic_cast(Hv_inv_pc_)->SetSOROptions(hsmoother_relax_weight_, hsmoother_relax_omega_); + dynamic_cast(Hv_inv_pc_) + ->SetPolyOptions(smoother_poly_order_, smoother_poly_fraction_, smoother_eig_est_); + Hv_inv_ = new CGSolver(vfes_->GetComm()); Hv_inv_->iterative_mode = true; Hv_inv_->SetOperator(*Hv_op_); Hv_inv_->SetPreconditioner(*Hv_inv_pc_); Hv_inv_->SetPrintLevel(hsolve_pl_); + Hv_inv_->SetAbsTol(hsolve_atol_); Hv_inv_->SetRelTol(hsolve_rtol_); Hv_inv_->SetMaxIter(hsolve_max_iter_); @@ -986,13 +996,17 @@ void Tomboulides::initializeOperators() { Hs_form_->FormSystemMatrix(swirl_ess_tdof_, Hs_op_); Hs_inv_pc_ = new HypreSmoother(*Hs_op_.As()); - dynamic_cast(Hs_inv_pc_)->SetType(HypreSmoother::Jacobi, 1); + dynamic_cast(Hs_inv_pc_)->SetType(smoother_type_, smoother_passes_); + dynamic_cast(Hs_inv_pc_)->SetSOROptions(hsmoother_relax_weight_, hsmoother_relax_omega_); + dynamic_cast(Hs_inv_pc_) + ->SetPolyOptions(smoother_poly_order_, smoother_poly_fraction_, smoother_eig_est_); Hs_inv_ = new CGSolver(pfes_->GetComm()); Hs_inv_->iterative_mode = true; Hs_inv_->SetOperator(*Hs_op_); Hs_inv_->SetPreconditioner(*Hs_inv_pc_); Hs_inv_->SetPrintLevel(hsolve_pl_); + Hs_inv_->SetAbsTol(hsolve_atol_); Hs_inv_->SetRelTol(hsolve_rtol_); Hs_inv_->SetMaxIter(hsolve_max_iter_); @@ -1134,7 +1148,17 @@ void Tomboulides::step() { L_iorho_lor_ = new ParLORDiscretization(*L_iorho_form_, pres_ess_tdof_); L_iorho_inv_pc_ = new HypreBoomerAMG(L_iorho_lor_->GetAssembledMatrix()); - L_iorho_inv_pc_->SetPrintLevel(0); + L_iorho_inv_pc_->SetPrintLevel(pressure_solve_pl_); + L_iorho_inv_pc_->SetCoarsening(amg_coarsening_); + L_iorho_inv_pc_->SetAggressiveCoarsening(amg_aggresive_); + L_iorho_inv_pc_->SetInterpolation(amg_interpolation_); + L_iorho_inv_pc_->SetStrengthThresh(pressure_strength_thres_); + L_iorho_inv_pc_->SetRelaxType(amg_relax_); + L_iorho_inv_pc_->SetMaxLevels(amg_max_levels_); + L_iorho_inv_pc_->SetMaxIter(amg_max_iters_); + L_iorho_inv_pc_->SetTol(0); + // NOTE: other cycle types (i.e. not V-cycle) do not scale well in parallel, so option removed for now + // L_iorho_inv_pc_->SetCycleType(1); L_iorho_inv_ortho_pc_ = new OrthoSolver(pfes_->GetComm()); L_iorho_inv_ortho_pc_->SetSolver(*L_iorho_inv_pc_); @@ -1168,10 +1192,7 @@ void Tomboulides::step() { Hv_form_->FormSystemMatrix(vel_ess_tdof_, Hv_op_); Hv_inv_->SetOperator(*Hv_op_); - if (partial_assembly_) { - // TODO(trevilo): Support partial assembly - assert(false); - } + sw_helm_.Stop(); //------------------------------------------------------------------------ @@ -1375,15 +1396,7 @@ void Tomboulides::step() { pfes_->GetRestrictionMatrix()->MultTranspose(resp_vec_, *resp_gf_); Vector X1, B1; - if (partial_assembly_) { - // TODO(trevilo): Support partial assembly here - assert(false); - // auto *SpC = Sp.As(); - // EliminateRHS(*Sp_form, *SpC, pres_ess_tdof, pn_gf, resp_gf, X1, B1, 1); - } else { - L_iorho_form_->FormLinearSystem(pres_ess_tdof_, *p_gf_, *resp_gf_, L_iorho_op_, X1, B1, 1); - } - + L_iorho_form_->FormLinearSystem(pres_ess_tdof_, *p_gf_, *resp_gf_, L_iorho_op_, X1, B1, 1); L_iorho_inv_->Mult(B1, X1); if (!L_iorho_inv_->GetConverged()) { if (rank0_) std::cout << "ERROR: Poisson solve did not converge." << std::endl; @@ -1430,15 +1443,7 @@ void Tomboulides::step() { vfes_->GetRestrictionMatrix()->MultTranspose(resu_vec_, *resu_gf_); Vector X2, B2; - if (partial_assembly_) { - // TODO(trevilo): Add partial assembly support - assert(false); - // auto *HC = H.As(); - // EliminateRHS(*Hv_form_, *HC, vel_ess_tdof, un_next_gf, resu_gf, X2, B2, 1); - } else { - Hv_form_->FormLinearSystem(vel_ess_tdof_, *u_next_gf_, *resu_gf_, Hv_op_, X2, B2, 1); - } - + Hv_form_->FormLinearSystem(vel_ess_tdof_, *u_next_gf_, *resu_gf_, Hv_op_, X2, B2, 1); Hv_inv_->Mult(B2, X2); if (!Hv_inv_->GetConverged()) { if (rank0_) std::cout << "ERROR: Helmholtz solve did not converge." << std::endl; diff --git a/src/tomboulides.hpp b/src/tomboulides.hpp index 1dd9cc047..8bc5d8584 100644 --- a/src/tomboulides.hpp +++ b/src/tomboulides.hpp @@ -80,22 +80,88 @@ class Tomboulides final : public FlowBase { bool axisym_; // Options - // TODO(trevilo): hardcoded for testing. Need to set based on input file. - bool numerical_integ_ = true; + bool numerical_integ_ = false; bool partial_assembly_ = false; + // linear-solver options + int smoother_poly_order_; + double smoother_poly_fraction_ = 0.75; + int smoother_eig_est_ = 10; + int smoother_passes_ = 1; + double smoother_relax_weight_ = + 0.4; // NOTE: setting relax wt to 0 should determine wt dynamically but this does not seem to work + double smoother_relax_omega_ = 1.0; + double hsmoother_relax_weight_ = 0.8; + double hsmoother_relax_omega_ = 0.1; + + // Options: Jacobi, l1Jacobi, l1GS, l1GStr, lumpedJacobi, + // GS, OPFS, Chebyshev, Taubin, FIR + mfem::HypreSmoother::Type smoother_type_ = HypreSmoother::Jacobi; + + double pressure_strength_thres_ = 0.6; + int amg_aggresive_ = 4; + int amg_max_levels_ = 10; + int amg_max_iters_ = + 1; // should be 1 for precon, setting to zero is ~30-40% faster per step but effectively turns off solve + int amg_relax_ = 18; // only 0 or 18 now + + /* + 0 : CLJP-coarsening (a parallel coarsening algorithm using independent sets. + 1 : classical Ruge-Stueben coarsening on each processor, no boundary treatment (not recommended!) + 3 : classical Ruge-Stueben coarsening on each processor, followed by a third pass, which adds coarse points on the + boundaries 6 : Falgout coarsening (uses 1 first, followed by CLJP using the interior coarse points generated by 1 as + its first independent set) 7 : CLJP-coarsening (using a fixed random vector, for debugging purposes only) 8 : + PMIS-coarsening (a parallel coarsening algorithm using independent sets, generating lower complexities than CLJP, + might also lead to slower convergence) 9 : PMIS-coarsening (using a fixed random vector, for debugging purposes only) + 10 : HMIS-coarsening (uses one pass Ruge-Stueben on each processor independently, followed by PMIS using the interior + C-points generated as its first independent set) 11 : one-pass Ruge-Stueben coarsening on each processor, no boundary + treatment (not recommended!) 21 : CGC coarsening by M. Griebel, B. Metsch and A. Schweitzer 22 : CGC-E coarsening by + M. Griebel, B. Metsch and A.Schweitzer + */ + int amg_coarsening_ = 8; + + /* + 0 : classical modified interpolation + 1 : LS interpolation (for use with GSMG) + 2 : classical modified interpolation for hyperbolic PDEs + 3 : direct interpolation (with separation of weights) (also for GPU use) + 4 : multipass interpolation + 5 : multipass interpolation (with separation of weights) + 6 : extended+i interpolation (also for GPU use) *** + 7 : extended+i (if no common C neighbor) interpolation + 8 : standard interpolation + 9 : standard interpolation (with separation of weights) + 10 : classical block interpolation (for use with nodal systems version only) + 11 : classical block interpolation (for use with nodal systems version only) with diagonalized diagonal blocks + 12 : FF interpolation + 13 : FF1 interpolation + 14 : extended interpolation (also for GPU use) + 15 : interpolation with adaptive weights (GPU use only) + 16 : extended interpolation in matrix-matrix form + 17 : extended+i interpolation in matrix-matrix form + 18 : extended+e interpolation in matrix-matrix form + */ + int amg_interpolation_ = 14; + + // solver tolerance options + int default_max_iter_ = 1000; + double default_rtol_ = 1e-10; + double default_atol_ = 1e-12; + int pressure_solve_pl_ = 0; - int pressure_solve_max_iter_ = 100; - double pressure_solve_rtol_ = 1e-8; - double pressure_solve_atol_ = 1e-18; + int pressure_solve_max_iter_; + double pressure_solve_rtol_; + double pressure_solve_atol_; int mass_inverse_pl_ = 0; - int mass_inverse_max_iter_ = 200; - double mass_inverse_rtol_ = 1e-12; + int mass_inverse_max_iter_; + double mass_inverse_rtol_; + double mass_inverse_atol_; int hsolve_pl_ = 0; - int hsolve_max_iter_ = 200; - double hsolve_rtol_ = 1e-12; + int hsolve_max_iter_; + double hsolve_rtol_; + double hsolve_atol_; // To use "numerical integration", quadrature rule must persist mfem::IntegrationRules gll_rules; diff --git a/src/tps.cpp b/src/tps.cpp index b82b7caf3..7e0cd6c39 100644 --- a/src/tps.cpp +++ b/src/tps.cpp @@ -140,8 +140,7 @@ void Tps::parseCommandLineArgs(int argc, char *argv[]) { args.AddOption(&visualMode, "-visual", "--visualization", "", "--no-visualization", "Launch post-process visualization."); gpu_aware_mpi_ = false; - args.AddOption(&gpu_aware_mpi_, "-ga", "--gpu-aware-mpi", "", "--no-gpu-aware-mpi", - "Set GPU-aware MPI."); + args.AddOption(&gpu_aware_mpi_, "-ga", "--gpu-aware-mpi", "", "--no-gpu-aware-mpi", "Set GPU-aware MPI."); args.Parse(); if (!args.Good()) { diff --git a/src/tps2Boltzmann.cpp b/src/tps2Boltzmann.cpp index 72f9b0678..689fded06 100644 --- a/src/tps2Boltzmann.cpp +++ b/src/tps2Boltzmann.cpp @@ -94,12 +94,10 @@ Tps2Boltzmann::Tps2Boltzmann(Tps *tps) save_to_paraview_dc = tps->getInput("boltzmannInterface/save_to_paraview", false); - offsets.SetSize(NIndexes + 1); ncomps.SetSize(NIndexes + 1); } - int Tps2Boltzmann::_countBTEReactions() { int total_reactions(0); int bte_reactions(0); diff --git a/test/autoPeriodic.test b/test/autoPeriodic.test index dc6a9d33e..de811ddf7 100755 --- a/test/autoPeriodic.test +++ b/test/autoPeriodic.test @@ -9,6 +9,7 @@ RESTART="ref_solns/sgsLoMach/restart_output.sol.h5" setup() { SOLN_FILE=restart_output.sol.h5 REF_FILE=ref_solns/sgsLoMach/restart_output.sol.h5 + OUT_FILE=output_solns/restart_output_autoPeriodic.sol.h5 } @test "[$TEST] check for input file $RUNFILE" { @@ -26,5 +27,6 @@ setup() { @test "[$TEST] verify tps output with input -> $RUNFILE" { test -s $SOLN_FILE test -s $REF_FILE - h5diff -r --delta=1e-12 $SOLN_FILE $REF_FILE /velocity + h5diff -r --delta=1e-10 $SOLN_FILE $REF_FILE /velocity + # cp $SOLN_FILE $OUT_FILE } diff --git a/test/aveLoMach.test b/test/aveLoMach.test index 31af36add..008c43efc 100755 --- a/test/aveLoMach.test +++ b/test/aveLoMach.test @@ -9,6 +9,7 @@ RESTART="ref_solns/aveLoMach/restart_output.sol.h5" setup() { SOLN_FILE=restart_output.sol.h5 REF_FILE=ref_solns/aveLoMach/restart_output.sol.h5 + OUT_FILE=output_solns/restart_output_aveLoMach.sol.h5 } @test "[$TEST] check for input file $RUNFILE" { @@ -26,5 +27,6 @@ setup() { @test "[$TEST] verify tps output with input -> $RUNFILE" { test -s $SOLN_FILE test -s $REF_FILE - h5diff -r --delta=1e-12 $SOLN_FILE $REF_FILE meanVel + h5diff -r --delta=1e-11 $SOLN_FILE $REF_FILE meanVel + # cp $SOLN_FILE $OUT_FILE } diff --git a/test/heatEq.test b/test/heatEq.test index 771aa9296..ac6108dd5 100755 --- a/test/heatEq.test +++ b/test/heatEq.test @@ -9,6 +9,7 @@ RESTART="ref_solns/heatedBox/restart_output.sol.h5" setup() { SOLN_FILE=restart_output.sol.h5 REF_FILE=ref_solns/heatedBox/restart_output.sol.h5 + OUT_FILE=output_solns/restart_output_heatedBox.sol.h5 } @test "[$TEST] check for input file $RUNFILE" { @@ -25,5 +26,6 @@ setup() { @test "[$TEST] verify tps output with input -> $RUNFILE" { test -s $SOLN_FILE test -s $REF_FILE - h5diff -r --relative=1e-13 $SOLN_FILE $REF_FILE /temperature/temperature + h5diff -r --relative=1e-10 $SOLN_FILE $REF_FILE /temperature/temperature + # cp $SOLN_FILE $OUT_FILE } diff --git a/test/inputs/input.autoPeriodic.ini b/test/inputs/input.autoPeriodic.ini index 56fc43205..a462938b6 100644 --- a/test/inputs/input.autoPeriodic.ini +++ b/test/inputs/input.autoPeriodic.ini @@ -3,35 +3,34 @@ type = loMach [loMach] flow-solver = tomboulides +thermo-solver = constant-property mesh = meshes/flatBox.msh -uOrder = 1 -pOrder = 1 -nOrder = 1 +order = 1 maxIters = 10 outputFreq = 10 -fluid = dry_air -refLength = 0.05 -equation_system = navier-stokes enablePressureForcing = False -constantViscosity = 1.552e-5 -constantDensity = 1.1839 enableGravity = False +gravity = '0 0 0' openSystem = True ambientPressure = 101326. sgsModel = smagorinsky sgsModelConstant = 0.09 [loMach/tomboulides] -ic = tgv2d +numerical-integ = false +ic = tgv2d_uniform + +[loMach/constprop] +mu = 1.552e-5 +rho = 1.1839 [io] outdirBase = output [time] -cfl = 0.5 +integrator = curlcurl dt_fixed = 1.0e-3 -maxSolverIteration = 1000 -solverRelTolerance = 1.0e-12 +bdfOrder = 3 [initialConditions] rho = 1.1839 @@ -49,4 +48,4 @@ numOutlets = 0 enablePeriodic = True periodicX = True periodicY = True -periodicZ = True \ No newline at end of file +periodicZ = True diff --git a/test/inputs/input.heatedBox.ini b/test/inputs/input.heatedBox.ini index c3b68817a..c603db677 100644 --- a/test/inputs/input.heatedBox.ini +++ b/test/inputs/input.heatedBox.ini @@ -4,9 +4,6 @@ type = loMach [loMach] mesh = meshes/lequereBoxCrs3wall.msh order = 1 -uOrder = 1 -pOrder = 1 -nOrder = 1 nFilter = 0 filterWeight = 1.0 maxIters = 5000 diff --git a/test/inputs/input.sgsLoMach.ini b/test/inputs/input.sgsLoMach.ini index a884829c6..ad3e812db 100644 --- a/test/inputs/input.sgsLoMach.ini +++ b/test/inputs/input.sgsLoMach.ini @@ -3,35 +3,34 @@ type = loMach [loMach] flow-solver = tomboulides +thermo-solver = constant-property mesh = meshes/flatBox.msh -uOrder = 1 -pOrder = 1 -nOrder = 1 +order = 1 maxIters = 10 outputFreq = 10 -fluid = dry_air -refLength = 0.05 -equation_system = navier-stokes enablePressureForcing = False -constantViscosity = 1.552e-5 -constantDensity = 1.1839 enableGravity = False +gravity = '0 0 0' openSystem = True ambientPressure = 101326. sgsModel = smagorinsky sgsModelConstant = 0.09 [loMach/tomboulides] -ic = tgv2d +numerical-integ = false +ic = tgv2d_uniform + +[loMach/constprop] +mu = 1.552e-5 +rho = 1.1839 [io] outdirBase = output [time] -cfl = 0.5 +integrator = curlcurl dt_fixed = 1.0e-3 -maxSolverIteration = 1000 -solverRelTolerance = 1.0e-12 +bdfOrder = 3 [initialConditions] rho = 1.1839 diff --git a/test/interpInlet.test b/test/interpInlet.test index e9fc0e30f..0af9a9283 100755 --- a/test/interpInlet.test +++ b/test/interpInlet.test @@ -9,6 +9,7 @@ RESTART= setup() { SOLN_FILE=restart_output.sol.h5 REF_FILE=ref_solns/interpInlet/restart_output.sol.h5 + OUT_FILE=output_solns/restart_output_interpInlet.sol.h5 } @test "[$TEST] check for input file $RUNFILE" { @@ -33,5 +34,6 @@ setup() { @test "[$TEST] verify tps output with input -> $RUNFILE" { test -s $SOLN_FILE test -s $REF_FILE - h5diff -r --relative=1e-12 $SOLN_FILE $REF_FILE /temperature/temperature + h5diff -r --relative=1e-10 $SOLN_FILE $REF_FILE /temperature/temperature + # cp $SOLN_FILE $OUT_FILE } diff --git a/test/lomach-flow.test b/test/lomach-flow.test index a54cfaedd..eba58c5b9 100755 --- a/test/lomach-flow.test +++ b/test/lomach-flow.test @@ -16,12 +16,15 @@ setup() { RUNFILE_PIPE="inputs/lomach.pipe.ini" REF_SOLN_PIPE="ref_solns/pipe/restart_output-pipe-lam.sol.h5" + OUT_SOLN_PIPE="output_solns/restart_output-pipe-lam.sol.h5" RUNFILE_TC="inputs/lomach.taylor.couette.ini" REF_SOLN_TC="ref_solns/taylor-couette/restart_output-tc.Re100.h5" + OUT_SOLN_TC="output_solns/restart_output-tc.Re100.h5" RUNFILE_PIPE_ARANS="inputs/lomach.pipe.arans.ini" REF_SOLN_PIPE_ARANS="ref_solns/pipe/restart_output-pipe-arans.sol.h5" + OUT_SOLN_PIPE_ARANS="output_solns/restart_output-pipe-arans.sol.h5" MPIRUN=`./sniff_mpirun.sh` } @@ -109,8 +112,8 @@ setup() { [[ ${status} -eq 0 ]] # check solutions are the same! - h5diff -r --delta=1e-12 restart_output-lid.sol.h5 restart_output-lid.sol.2.h5 - + h5diff -r --delta=1e-11 restart_output-lid.sol.h5 restart_output-lid.sol.2.h5 + # delete intermediate files rm -f restart_output-lid*.h5 rm $RUNFILE_LID_MOD @@ -138,7 +141,7 @@ setup() { $MPIRUN -n 2 $EXE --runFile $RUNFILE_LID_MOD # check solutions are the same! - h5diff -r --delta=1e-12 restart_output-lid.sol.h5 restart_output-lid.sol.2.h5 + h5diff -r --delta=1e-10 restart_output-lid.sol.h5 restart_output-lid.sol.2.h5 # delete intermediate files rm -f restart_output-lid*.h5 @@ -149,22 +152,25 @@ setup() { run $EXE --runFile $RUNFILE_PIPE [[ ${status} -eq 0 ]] test -s restart_output-pipe-lam.sol.h5 - h5diff -r --delta=1e-12 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /velocity - h5diff -r --delta=1e-12 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /swirl + h5diff -r --delta=1e-10 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /velocity + h5diff -r --delta=1e-10 restart_output-pipe-lam.sol.h5 $REF_SOLN_PIPE /swirl + # cp restart_output-pipe-lam.sol.h5 $OUT_SOLN_PIPE } @test "[$TEST] check that Taylor-Couette (axisymmetric, with swirl) runs and verify result" { run $EXE --runFile $RUNFILE_TC [[ ${status} -eq 0 ]] test -s restart_output-tc.sol.h5 - h5diff -r --delta=1e-12 restart_output-tc.sol.h5 $REF_SOLN_TC /velocity - h5diff -r --delta=1e-12 restart_output-tc.sol.h5 $REF_SOLN_TC /swirl + h5diff -r --delta=1e-10 restart_output-tc.sol.h5 $REF_SOLN_TC /velocity + h5diff -r --delta=1e-10 restart_output-tc.sol.h5 $REF_SOLN_TC /swirl + # cp restart_output-tc.sol.h5 $OUT_SOLN_TC } @test "[$TEST] check pipe (axisymmetric) flow with algebraic rans model" { run $EXE --runFile $RUNFILE_PIPE_ARANS [[ ${status} -eq 0 ]] test -s restart_output-pipe-arans.sol.h5 - h5diff -r --delta=1e-12 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /velocity - h5diff -r --delta=1e-12 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /swirl + h5diff -r --delta=1e-9 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /velocity + h5diff -r --delta=1e-9 restart_output-pipe-arans.sol.h5 $REF_SOLN_PIPE_ARANS /swirl + # cp restart_output-pipe-arans.sol.h5 $OUT_SOLN_PIPE_ARANS } diff --git a/test/lomach-lequere.test b/test/lomach-lequere.test index 4738f3ac9..546b91b13 100755 --- a/test/lomach-lequere.test +++ b/test/lomach-lequere.test @@ -10,6 +10,7 @@ setup() { RUNFILE="inputs/lomach.lequere.varmu.ini" REF_SOLN="ref_solns/lequere-varmu/reference-lequere-varmu.sol.h5" SOLN_FILE="restart_output-lequere-varmu.sol.h5" + OUT_SOLN="output_solns/reference-lequere-varmu.sol.h5" } @test "[$TEST] Le Quere low Mach, thermally-driven cavity regression with variable viscosity" { @@ -24,8 +25,9 @@ setup() { $EXE --runFile $RUNFILE # check - h5diff -r --relative=1e-12 $SOLN_FILE $REF_SOLN /temperature/temperature - h5diff -r --relative=1e-10 $SOLN_FILE $REF_SOLN /velocity/x-comp - h5diff -r --relative=1e-10 $SOLN_FILE $REF_SOLN /velocity/y-comp + h5diff -r --relative=1e-10 $SOLN_FILE $REF_SOLN /temperature/temperature + h5diff -r --delta=1e-10 $SOLN_FILE $REF_SOLN /velocity/x-comp + h5diff -r --delta=1e-10 $SOLN_FILE $REF_SOLN /velocity/y-comp + # cp $SOLN_FILE $OUT_SOLN } diff --git a/test/ref_solns/aveLoMach/restart_output.sol.h5 b/test/ref_solns/aveLoMach/restart_output.sol.h5 index 48d9b67a7..fc8a71bcd 100644 --- a/test/ref_solns/aveLoMach/restart_output.sol.h5 +++ b/test/ref_solns/aveLoMach/restart_output.sol.h5 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c3d84bab6ef05f42cdad7b3e28a758b3a1f32b0eaaf55ec3cdf0a7b04a47fec0 +oid sha256:15bb2ec395f79dc7d28324a61467760e675f3501b5582b56ff7a294146cb337d size 382040 diff --git a/test/ref_solns/heatedBox/restart_output.sol.h5 b/test/ref_solns/heatedBox/restart_output.sol.h5 index dc428085f..cf108bb26 100644 --- a/test/ref_solns/heatedBox/restart_output.sol.h5 +++ b/test/ref_solns/heatedBox/restart_output.sol.h5 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a7e7088904222b6e9c29b70a410f82885f389e2c9fb672686df5ff418ea92696 -size 3504 +oid sha256:02d366574f35b75cc97fdfe330450832cdb98937bcbdf3fd39f4f79921a6bab9 +size 3568 diff --git a/test/ref_solns/interpInlet/restart_output.sol.h5 b/test/ref_solns/interpInlet/restart_output.sol.h5 index 5fc3e60c0..78a7f4a38 100644 --- a/test/ref_solns/interpInlet/restart_output.sol.h5 +++ b/test/ref_solns/interpInlet/restart_output.sol.h5 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c782a4cdbb7228c7ffd19f262ba1f2440ed132ca055e2e76b54c3a3c2630c5d -size 8664 +oid sha256:c0639671f8f1f9496eb313f87d4fa40bcada3713d9d6f4bbd67b4bbf81405a32 +size 8728 diff --git a/test/ref_solns/lequere-varmu/reference-lequere-varmu.sol.h5 b/test/ref_solns/lequere-varmu/reference-lequere-varmu.sol.h5 index 13e2013d8..b62cc8878 100644 --- a/test/ref_solns/lequere-varmu/reference-lequere-varmu.sol.h5 +++ b/test/ref_solns/lequere-varmu/reference-lequere-varmu.sol.h5 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:992d58bb5010f3576f13fd076f2b2ab67b4ead1536b627d7e05649c6acfccc87 +oid sha256:222e94021b4b7ed239f24c8b486a45b89a7bf7d7a15d621273f2b504bf14900a size 106416 diff --git a/test/ref_solns/pipe/restart_output-pipe-arans.sol.h5 b/test/ref_solns/pipe/restart_output-pipe-arans.sol.h5 index 5e71a3a80..dd9e8665d 100644 --- a/test/ref_solns/pipe/restart_output-pipe-arans.sol.h5 +++ b/test/ref_solns/pipe/restart_output-pipe-arans.sol.h5 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc4128fc860c4f6f3a5419ed3117af719e8968cfee76b85bee28bb9019667e90 +oid sha256:39061c77f5cc54f664ce69f5f91ae3f5f5386a04616efa7223cce39793234b97 size 56496 diff --git a/test/ref_solns/pipe/restart_output-pipe-lam.sol.h5 b/test/ref_solns/pipe/restart_output-pipe-lam.sol.h5 index 636445c61..953709889 100644 --- a/test/ref_solns/pipe/restart_output-pipe-lam.sol.h5 +++ b/test/ref_solns/pipe/restart_output-pipe-lam.sol.h5 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7fe39fdee999551ea2e82c2e492f0cafd8567e9c0bae0066a02063e05cac8bc4 -size 18416 +oid sha256:3af1089c90ac4118d913cf80d7e9e9ee260e2ad94e0a5c0310a2fde4ae63c574 +size 18480 diff --git a/test/ref_solns/sgsLoMach/restart_output.sol.h5 b/test/ref_solns/sgsLoMach/restart_output.sol.h5 index 333ab85e4..c56fe05a7 100644 --- a/test/ref_solns/sgsLoMach/restart_output.sol.h5 +++ b/test/ref_solns/sgsLoMach/restart_output.sol.h5 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1d285d59acd77b7cc383d646e8b2ddf10b1da771dad96bf0a5f46afa08df0bc +oid sha256:663299c7c61d64043b0e02a6da2e6c315bf0ff9d63736bbc7ba8ec27b64a4840 size 78744 diff --git a/test/ref_solns/spongeBox/restart_output.sol.h5 b/test/ref_solns/spongeBox/restart_output.sol.h5 index 0251aed2e..75c4efff5 100644 --- a/test/ref_solns/spongeBox/restart_output.sol.h5 +++ b/test/ref_solns/spongeBox/restart_output.sol.h5 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6369b60adb2786bcd2c477743345cc303d33e73a105db3d39fc114990a6f96dd -size 8664 +oid sha256:197ed2f249869bc6f94a5649bb6d3f4aff73dc406fc94ca98681e48dbd01b6e3 +size 8728 diff --git a/test/sgsLoMach.test b/test/sgsLoMach.test index d572d711d..8034a54b6 100755 --- a/test/sgsLoMach.test +++ b/test/sgsLoMach.test @@ -9,6 +9,7 @@ RESTART="ref_solns/sgsLoMach/restart_output.sol.h5" setup() { SOLN_FILE=restart_output.sol.h5 REF_FILE=ref_solns/sgsLoMach/restart_output.sol.h5 + OUT_FILE=output_solns/restart_output_sgsLoMach.sol.h5 } @test "[$TEST] check for input file $RUNFILE" { @@ -26,5 +27,6 @@ setup() { @test "[$TEST] verify tps output with input -> $RUNFILE" { test -s $SOLN_FILE test -s $REF_FILE - h5diff -r --delta=1e-12 $SOLN_FILE $REF_FILE /velocity + h5diff -r --delta=1e-10 $SOLN_FILE $REF_FILE /velocity + # cp $SOLN_FILE $OUT_FILE } diff --git a/test/sponge.test b/test/sponge.test index c06d1757a..d69ff6edc 100755 --- a/test/sponge.test +++ b/test/sponge.test @@ -33,5 +33,5 @@ setup() { @test "[$TEST] verify tps output with input -> $RUNFILE" { test -s $SOLN_FILE test -s $REF_FILE - h5diff -r --relative=1e-13 $SOLN_FILE $REF_FILE /temperature/temperature + h5diff -r --relative=1e-10 $SOLN_FILE $REF_FILE /temperature/temperature }