Example #1
0
EXTERN_C_END

#undef __FUNCT__
#define __FUNCT__ "MatPartitioningSetFromOptions_Party"
PetscErrorCode MatPartitioningSetFromOptions_Party(MatPartitioning part)
{
  PetscErrorCode        ierr;
  PetscBool             flag;
  char                  value[256];
  PetscReal             r;
  MatPartitioning_Party *party = (MatPartitioning_Party*)part->data;

  PetscFunctionBegin;
  ierr = PetscOptionsHead("Set Party partitioning options");CHKERRQ(ierr);
    ierr = PetscOptionsString("-mat_partitioning_party_global","Global method","MatPartitioningPartySetGlobal",party->global,value,256,&flag);CHKERRQ(ierr);
    if (flag) { ierr = MatPartitioningPartySetGlobal(part,value);CHKERRQ(ierr); }
    ierr = PetscOptionsString("-mat_partitioning_party_local","Local method","MatPartitioningPartySetLocal",party->local,value,256,&flag);CHKERRQ(ierr);
    if (flag) { ierr = MatPartitioningPartySetLocal(part,value);CHKERRQ(ierr); }
    ierr = PetscOptionsReal("-mat_partitioning_party_coarse","Coarse level","MatPartitioningPartySetCoarseLevel",0.0,&r,&flag);CHKERRQ(ierr);
    if (flag) { ierr = MatPartitioningPartySetCoarseLevel(part,r);CHKERRQ(ierr); }
    ierr = PetscOptionsBool("-mat_partitioning_party_match_optimization","Matching optimization on/off","MatPartitioningPartySetMatchOptimization",party->redo,&party->redo,PETSC_NULL);CHKERRQ(ierr);
    ierr = PetscOptionsBool("-mat_partitioning_party_bipart","Bipartitioning on/off","MatPartitioningPartySetBipart",party->recursive,&party->recursive,PETSC_NULL);CHKERRQ(ierr);
    ierr = PetscOptionsBool("-mat_partitioning_party_verbose","Show library output","",party->verbose,&party->verbose,PETSC_NULL);CHKERRQ(ierr);
  ierr = PetscOptionsTail();CHKERRQ(ierr);
  PetscFunctionReturn(0);
}
Example #2
0
PetscErrorCode MatPartitioningSetFromOptions_Party(MatPartitioning part)
{
    PetscErrorCode ierr;
    PetscTruth flag, b;
    char value[15];
    PetscReal r;

    PetscFunctionBegin;
    ierr = PetscOptionsHead("Set Party partitioning options");CHKERRQ(ierr);

    ierr = PetscOptionsString("-mat_partitioning_party_global",
        "Global method to use", "MatPartitioningPartySetGlobal", "gcf,gbf",
        value, 15, &flag);CHKERRQ(ierr);
    if (flag)
        ierr = MatPartitioningPartySetGlobal(part, value);CHKERRQ(ierr);

    ierr = PetscOptionsString("-mat_partitioning_party_local",
        "Local method to use", "MatPartitioningPartySetLocal", "kl", value, 15,
        &flag);CHKERRQ(ierr);
    if (flag)
        ierr = MatPartitioningPartySetLocal(part, value);CHKERRQ(ierr);

    ierr = PetscOptionsReal("-mat_partitioning_party_coarse_level",
        "Coarse level", "MatPartitioningPartySetCoarseLevel", 0, &r,
        &flag);CHKERRQ(ierr);
    if (flag)
        ierr = MatPartitioningPartySetCoarseLevel(part, r);CHKERRQ(ierr);

    ierr = PetscOptionsTruth("-mat_partitioning_party_match_optimization",
        "Matching optimization on/off (boolean)",
        "MatPartitioningPartySetMatchOptimization", PETSC_TRUE, &b, &flag);CHKERRQ(ierr);
    if (flag)
        ierr = MatPartitioningPartySetMatchOptimization(part, b);CHKERRQ(ierr);

    ierr = PetscOptionsTruth("-mat_partitioning_party_bipart",
        "Bipartitioning option on/off (boolean)",
        "MatPartitioningPartySetBipart", PETSC_TRUE, &b, &flag);CHKERRQ(ierr);
    if (flag)
        ierr = MatPartitioningPartySetBipart(part, b);CHKERRQ(ierr);

    ierr = PetscOptionsTail();CHKERRQ(ierr);
    PetscFunctionReturn(0);
}