775 {
777 try {
779 PetscBool activation = PETSC_FALSE, domain = PETSC_FALSE,
780 domain_budget = PETSC_FALSE, flow = PETSC_FALSE,
781 flow_budget = PETSC_FALSE;
783 &activation, nullptr);
785 &domain, nullptr);
787 "-test_nullspace_domain_budget", &domain_budget,
788 nullptr);
790 nullptr);
792 &flow_budget, nullptr);
793 if (activation) {
794 CHKERR checkCandidateActivation();
795 } else if (domain_budget) {
796 CHKERR checkObjectiveDomainLineSearch(
true);
797 } else if (domain) {
798 CHKERR checkObjectiveDomainLineSearch(
false);
799 } else if (flow || flow_budget) {
800 CHKERR checkAlgorithmOneStep(flow_budget);
801 } else {
802 const std::array<std::array<PetscScalar, 3>, 3> starts = {
803 {{1, 1, 3}, {3, 4, 2}, {1, 1, 6}}};
804 for (
const auto scale : {1.0, 0.1, 10.0})
805 for (
size_t i = 0;
i != starts.size(); ++
i)
807 }
808 }
811 return 0;
812}
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
FTensor::Index< 'i', SPACE_DIM > i
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
MoFEMErrorCode TaoRegisterNullSpace()
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.