Actual source code: dmswarmimpl.h

petsc-3.13.6 2020-09-29
Report Typos and Errors

  2: #if !defined(_SWARMIMPL_H)
  3: #define _SWARMIMPL_H

  5:  #include <petscvec.h>
  6:  #include <petscmat.h>
  7:  #include <petscdmswarm.h>
  8:  #include <petsc/private/dmimpl.h>

 10: PETSC_EXTERN PetscLogEvent DMSWARM_Migrate;
 11: PETSC_EXTERN PetscLogEvent DMSWARM_SetSizes;
 12: PETSC_EXTERN PetscLogEvent DMSWARM_AddPoints;
 13: PETSC_EXTERN PetscLogEvent DMSWARM_RemovePoints;
 14: PETSC_EXTERN PetscLogEvent DMSWARM_Sort;
 15: PETSC_EXTERN PetscLogEvent DMSWARM_DataExchangerTopologySetup;
 16: PETSC_EXTERN PetscLogEvent DMSWARM_DataExchangerBegin;
 17: PETSC_EXTERN PetscLogEvent DMSWARM_DataExchangerEnd;
 18: PETSC_EXTERN PetscLogEvent DMSWARM_DataExchangerSendCount;
 19: PETSC_EXTERN PetscLogEvent DMSWARM_DataExchangerPack;

 21: typedef struct _p_DMSwarmDataField* DMSwarmDataField;
 22: typedef struct _p_DMSwarmDataBucket* DMSwarmDataBucket;
 23: typedef struct _p_DMSwarmSort* DMSwarmSort;

 25: typedef struct {
 26:   DMSwarmDataBucket db;

 28:   PetscBool field_registration_initialized;
 29:   PetscBool field_registration_finalized;
 30:   /* DMSwarmProjectMethod *swarm_project;*/ /* swarm, geometry, result */

 32:   /* PetscInt overlap; */
 33:   /* PetscErrorCode (*update_overlap)(void); */

 35:   char      vec_field_name[PETSC_MAX_PATH_LEN];
 36:   PetscBool vec_field_set;
 37:   PetscInt  vec_field_bs,vec_field_nlocal;

 39:   PetscBool          issetup;
 40:   DMSwarmType        swarm_type;
 41:   DMSwarmMigrateType migrate_type;
 42:   DMSwarmCollectType collect_type;

 44:   DM        dmcell;

 46:   PetscBool migrate_error_on_missing_point;

 48:   PetscBool collect_view_active;
 49:   PetscInt  collect_view_reset_nlocal;
 50:   DMSwarmSort sort_context;
 51: } DM_Swarm;

 53: typedef struct {
 54:   PetscInt point_index;
 55:   PetscInt cell_index;
 56: } SwarmPoint;

 58: struct _p_DMSwarmSort {
 59:   PetscBool isvalid;
 60:   PetscInt ncells,npoints;
 61:   PetscInt *pcell_offsets;
 62:   SwarmPoint *list;
 63: };


 66: PETSC_INTERN PetscErrorCode DMSwarmMigrate_Push_Basic(DM, PetscBool);
 67: PETSC_INTERN PetscErrorCode DMSwarmMigrate_CellDMScatter(DM,PetscBool);
 68: PETSC_INTERN PetscErrorCode DMSwarmMigrate_CellDMExact(DM,PetscBool);

 70: #endif /* _SWARMIMPL_H */