Lines Matching refs:forest

124   DM_Forest                 *forest = (DM_Forest *)dm->data;  in DMForestTemplate()  local
158 if (forest->ftemplate) PetscCall((*forest->ftemplate)(dm, *tedm)); in DMForestTemplate()
178 DM_Forest *forest = (DM_Forest *)dm->data; in DMClone_Forest() local
182 forest->refct++; in DMClone_Forest()
183 (*newdm)->data = forest; in DMClone_Forest()
192 DM_Forest *forest = (DM_Forest *)dm->data; in DMDestroy_Forest() local
203 if (--forest->refct > 0) PetscFunctionReturn(PETSC_SUCCESS); in DMDestroy_Forest()
204 if (forest->destroy) PetscCall((*forest->destroy)(dm)); in DMDestroy_Forest()
205 PetscCall(PetscSFDestroy(&forest->cellSF)); in DMDestroy_Forest()
206 PetscCall(PetscSFDestroy(&forest->preCoarseToFine)); in DMDestroy_Forest()
207 PetscCall(PetscSFDestroy(&forest->coarseToPreFine)); in DMDestroy_Forest()
208 PetscCall(DMLabelDestroy(&forest->adaptLabel)); in DMDestroy_Forest()
209 PetscCall(PetscFree(forest->adaptStrategy)); in DMDestroy_Forest()
210 PetscCall(DMDestroy(&forest->base)); in DMDestroy_Forest()
211 PetscCall(DMDestroy(&forest->adapt)); in DMDestroy_Forest()
212 PetscCall(PetscFree(forest->topology)); in DMDestroy_Forest()
213 PetscCall(PetscFree(forest)); in DMDestroy_Forest()
234 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetTopology() local
239 PetscCall(PetscFree(forest->topology)); in DMForestSetTopology()
240 PetscCall(PetscStrallocpy((const char *)topology, (char **)&forest->topology)); in DMForestSetTopology()
261 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetTopology() local
266 *topology = forest->topology; in DMForestGetTopology()
293 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetBaseDM() local
300 PetscCall(DMDestroy(&forest->base)); in DMForestSetBaseDM()
301 forest->base = base; in DMForestSetBaseDM()
340 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetBaseDM() local
345 *base = forest->base; in DMForestGetBaseDM()
351 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetBaseCoordinateMapping() local
355 forest->mapcoordinates = func; in DMForestSetBaseCoordinateMapping()
356 forest->mapcoordinatesctx = ctx; in DMForestSetBaseCoordinateMapping()
362 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetBaseCoordinateMapping() local
366 if (func) *func = forest->mapcoordinates; in DMForestGetBaseCoordinateMapping()
367 if (ctx) *((void **)ctx) = forest->mapcoordinatesctx; in DMForestGetBaseCoordinateMapping()
396 DM_Forest *forest, *adaptForest, *oldAdaptForest; in DMForestSetAdaptivityForest() local
406 forest = (DM_Forest *)dm->data; in DMForestSetAdaptivityForest()
411 PetscCall(PetscSFDestroy(&forest->preCoarseToFine)); in DMForestSetAdaptivityForest()
412 PetscCall(PetscSFDestroy(&forest->coarseToPreFine)); in DMForestSetAdaptivityForest()
413 if (forest->clearadaptivityforest) PetscCall((*forest->clearadaptivityforest)(dm)); in DMForestSetAdaptivityForest()
415 switch (forest->adaptPurpose) { in DMForestSetAdaptivityForest()
418 PetscCall(DMDestroy(&forest->adapt)); in DMForestSetAdaptivityForest()
419 forest->adapt = adapt; in DMForestSetAdaptivityForest()
451 DM_Forest *forest; in DMForestGetAdaptivityForest() local
455 forest = (DM_Forest *)dm->data; in DMForestGetAdaptivityForest()
456 switch (forest->adaptPurpose) { in DMForestGetAdaptivityForest()
458 *adapt = forest->adapt; in DMForestGetAdaptivityForest()
498 DM_Forest *forest; in DMForestSetAdaptivityPurpose() local
501 forest = (DM_Forest *)dm->data; in DMForestSetAdaptivityPurpose()
503 if (purpose != forest->adaptPurpose) { in DMForestSetAdaptivityPurpose()
510 forest->adaptPurpose = purpose; in DMForestSetAdaptivityPurpose()
545 DM_Forest *forest; in DMForestGetAdaptivityPurpose() local
548 forest = (DM_Forest *)dm->data; in DMForestGetAdaptivityPurpose()
549 *purpose = forest->adaptPurpose; in DMForestGetAdaptivityPurpose()
570 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetAdjacencyDimension() local
578 forest->adjDim = adjDim; in DMForestSetAdjacencyDimension()
625 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetAdjacencyDimension() local
630 *adjDim = forest->adjDim; in DMForestGetAdjacencyDimension()
652 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetAdjacencyCodimension() local
659 *adjCodim = dim - forest->adjDim; in DMForestGetAdjacencyCodimension()
680 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetPartitionOverlap() local
686 forest->overlap = overlap; in DMForestSetPartitionOverlap()
708 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetPartitionOverlap() local
713 *overlap = forest->overlap; in DMForestGetPartitionOverlap()
734 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetMinimumRefinement() local
739 forest->minRefinement = minRefinement; in DMForestSetMinimumRefinement()
762 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetMinimumRefinement() local
767 *minRefinement = forest->minRefinement; in DMForestGetMinimumRefinement()
787 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetInitialRefinement() local
792 forest->initRefinement = initRefinement; in DMForestSetInitialRefinement()
814 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetInitialRefinement() local
819 *initRefinement = forest->initRefinement; in DMForestGetInitialRefinement()
840 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetMaximumRefinement() local
845 forest->maxRefinement = maxRefinement; in DMForestSetMaximumRefinement()
868 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetMaximumRefinement() local
873 *maxRefinement = forest->maxRefinement; in DMForestGetMaximumRefinement()
897 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetAdaptivityStrategy() local
901 PetscCall(PetscFree(forest->adaptStrategy)); in DMForestSetAdaptivityStrategy()
902 PetscCall(PetscStrallocpy((const char *)adaptStrategy, (char **)&forest->adaptStrategy)); in DMForestSetAdaptivityStrategy()
929 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetAdaptivityStrategy() local
934 *adaptStrategy = forest->adaptStrategy; in DMForestGetAdaptivityStrategy()
961 DM_Forest *forest; in DMForestGetAdaptivitySuccess() local
966 forest = (DM_Forest *)dm->data; in DMForestGetAdaptivitySuccess()
967 PetscCall(forest->getadaptivitysuccess(dm, success)); in DMForestGetAdaptivitySuccess()
990 DM_Forest *forest; in DMForestSetComputeAdaptivitySF() local
995 forest = (DM_Forest *)dm->data; in DMForestSetComputeAdaptivitySF()
996 forest->computeAdaptSF = computeSF; in DMForestSetComputeAdaptivitySF()
1002 DM_Forest *forest; in DMForestTransferVec() local
1009 forest = (DM_Forest *)dmIn->data; in DMForestTransferVec()
1010 …PetscCheck(forest->transfervec, PetscObjectComm((PetscObject)dmIn), PETSC_ERR_SUP, "DMForestTransf… in DMForestTransferVec()
1011 PetscCall(forest->transfervec(dmIn, vecIn, dmOut, vecOut, useBCs, time)); in DMForestTransferVec()
1017 DM_Forest *forest; in DMForestTransferVecFromBase() local
1023 forest = (DM_Forest *)dm->data; in DMForestTransferVecFromBase()
1024 …PetscCheck(forest->transfervecfrombase, PetscObjectComm((PetscObject)dm), PETSC_ERR_SUP, "DMForest… in DMForestTransferVecFromBase()
1025 PetscCall(forest->transfervecfrombase(dm, vecIn, vecOut)); in DMForestTransferVecFromBase()
1048 DM_Forest *forest; in DMForestGetComputeAdaptivitySF() local
1052 forest = (DM_Forest *)dm->data; in DMForestGetComputeAdaptivitySF()
1053 *computeSF = forest->computeAdaptSF; in DMForestGetComputeAdaptivitySF()
1083 DM_Forest *forest; in DMForestGetAdaptivitySF() local
1088 forest = (DM_Forest *)dm->data; in DMForestGetAdaptivitySF()
1089 if (preCoarseToFine) *preCoarseToFine = forest->preCoarseToFine; in DMForestGetAdaptivitySF()
1090 if (coarseToPreFine) *coarseToPreFine = forest->coarseToPreFine; in DMForestGetAdaptivitySF()
1114 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetGradeFactor() local
1119 forest->gradeFactor = grade; in DMForestSetGradeFactor()
1142 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetGradeFactor() local
1147 *grade = forest->gradeFactor; in DMForestGetGradeFactor()
1174 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetCellWeightFactor() local
1179 forest->weightsFactor = weightsFactor; in DMForestSetCellWeightFactor()
1208 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetCellWeightFactor() local
1213 *weightsFactor = forest->weightsFactor; in DMForestGetCellWeightFactor()
1235 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetCellChart() local
1241forest->cStart == PETSC_DETERMINE) || (forest->cEnd == PETSC_DETERMINE)) && forest->createcellchar… in DMForestGetCellChart()
1242 *cStart = forest->cStart; in DMForestGetCellChart()
1243 *cEnd = forest->cEnd; in DMForestGetCellChart()
1264 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetCellSF() local
1269 …if ((!forest->cellSF) && forest->createcellsf) PetscCall(forest->createcellsf(dm, &forest->cellSF)… in DMForestGetCellSF()
1270 *cellSF = forest->cellSF; in DMForestGetCellSF()
1295 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetAdaptivityLabel() local
1301 PetscCall(DMLabelDestroy(&forest->adaptLabel)); in DMForestSetAdaptivityLabel()
1302 forest->adaptLabel = adaptLabel; in DMForestSetAdaptivityLabel()
1329 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetAdaptivityLabel() local
1333 *adaptLabel = forest->adaptLabel; in DMForestGetAdaptivityLabel()
1354 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetCellWeights() local
1362 …if (forest->cellWeightsCopyMode != PETSC_OWN_POINTER || forest->cellWeights == weights) PetscCall(… in DMForestSetCellWeights()
1363 PetscCall(PetscArraycpy(forest->cellWeights, weights, cEnd - cStart)); in DMForestSetCellWeights()
1364 forest->cellWeightsCopyMode = PETSC_OWN_POINTER; in DMForestSetCellWeights()
1367 if (forest->cellWeightsCopyMode == PETSC_OWN_POINTER) PetscCall(PetscFree(forest->cellWeights)); in DMForestSetCellWeights()
1368 forest->cellWeights = weights; in DMForestSetCellWeights()
1369 forest->cellWeightsCopyMode = copyMode; in DMForestSetCellWeights()
1391 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetCellWeights() local
1396 *weights = forest->cellWeights; in DMForestGetCellWeights()
1421 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestSetWeightCapacity() local
1427 forest->weightCapacity = capacity; in DMForestSetWeightCapacity()
1454 DM_Forest *forest = (DM_Forest *)dm->data; in DMForestGetWeightCapacity() local
1459 *capacity = forest->weightCapacity; in DMForestGetWeightCapacity()
1681 DM_Forest *forest; in DMCreate_Forest() local
1685 PetscCall(PetscNew(&forest)); in DMCreate_Forest()
1687 dm->data = forest; in DMCreate_Forest()
1688 forest->refct = 1; in DMCreate_Forest()
1689 forest->data = NULL; in DMCreate_Forest()
1690 forest->topology = NULL; in DMCreate_Forest()
1691 forest->adapt = NULL; in DMCreate_Forest()
1692 forest->base = NULL; in DMCreate_Forest()
1693 forest->adaptPurpose = DM_ADAPT_DETERMINE; in DMCreate_Forest()
1694 forest->adjDim = PETSC_DEFAULT; in DMCreate_Forest()
1695 forest->overlap = PETSC_DEFAULT; in DMCreate_Forest()
1696 forest->minRefinement = PETSC_DEFAULT; in DMCreate_Forest()
1697 forest->maxRefinement = PETSC_DEFAULT; in DMCreate_Forest()
1698 forest->initRefinement = PETSC_DEFAULT; in DMCreate_Forest()
1699 forest->cStart = PETSC_DETERMINE; in DMCreate_Forest()
1700 forest->cEnd = PETSC_DETERMINE; in DMCreate_Forest()
1701 forest->cellSF = NULL; in DMCreate_Forest()
1702 forest->adaptLabel = NULL; in DMCreate_Forest()
1703 forest->gradeFactor = 2; in DMCreate_Forest()
1704 forest->cellWeights = NULL; in DMCreate_Forest()
1705 forest->cellWeightsCopyMode = PETSC_USE_POINTER; in DMCreate_Forest()
1706 forest->weightsFactor = 1.; in DMCreate_Forest()
1707 forest->weightCapacity = 1.; in DMCreate_Forest()