Actual source code: dmswarmimpl.h

petsc-3.8.3 2017-12-09
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:                            DMSWARM_SetSizes, DMSWARM_AddPoints, DMSWARM_RemovePoints,
 12:                            DMSWARM_Sort,
 13:                            DMSWARM_DataExchangerTopologySetup,
 14:                            DMSWARM_DataExchangerBegin, DMSWARM_DataExchangerEnd,
 15:                            DMSWARM_DataExchangerSendCount, DMSWARM_DataExchangerPack;


 18: typedef struct _p_DataField* DataField;
 19: typedef struct _p_DataBucket* DataBucket;
 20: typedef struct _p_DMSwarmSort* DMSwarmSort;

 22: typedef struct {
 23:   DataBucket db;

 25:   PetscBool field_registration_initialized;
 26:   PetscBool field_registration_finalized;
 27:   /* DMSwarmProjectMethod *swarm_project;*/ /* swarm, geometry, result */

 29:   /* PetscInt overlap; */
 30:   /* PetscErrorCode (*update_overlap)(void); */

 32:   char      vec_field_name[PETSC_MAX_PATH_LEN];
 33:   PetscBool vec_field_set;
 34:   PetscInt  vec_field_bs,vec_field_nlocal;

 36:   PetscBool          issetup;
 37:   DMSwarmType        swarm_type;
 38:   DMSwarmMigrateType migrate_type;
 39:   DMSwarmCollectType collect_type;

 41:   DM        dmcell;

 43:   PetscBool migrate_error_on_missing_point;

 45:   PetscBool collect_view_active;
 46:   PetscInt  collect_view_reset_nlocal;
 47:   DMSwarmSort sort_context;
 48: } DM_Swarm;

 50: typedef struct {
 51:   PetscInt point_index;
 52:   PetscInt cell_index;
 53: } SwarmPoint;

 55: struct _p_DMSwarmSort {
 56:   PetscBool isvalid;
 57:   PetscInt ncells,npoints;
 58:   PetscInt *pcell_offsets;
 59:   SwarmPoint *list;
 60: };


 63: PETSC_INTERN PetscErrorCode DMSwarmMigrate_Push_Basic(DM, PetscBool);
 64: PETSC_INTERN PetscErrorCode DMSwarmMigrate_CellDMScatter(DM,PetscBool);
 65: PETSC_INTERN PetscErrorCode DMSwarmMigrate_CellDMExact(DM,PetscBool);

 67: #endif /* _SWARMIMPL_H */