[petsc-dev] DMNetwork static sizing

Zhang, Hong hzhang at mcs.anl.gov
Tue Apr 6 16:46:13 CDT 2021


Shri,
You designed this approach. Is it intended or out of implementation convenience at the time?
Hong
________________________________
From: petsc-dev <petsc-dev-bounces at mcs.anl.gov> on behalf of Matthew Knepley <knepley at gmail.com>
Sent: Monday, April 5, 2021 5:47 AM
To: PETSc <petsc-dev at mcs.anl.gov>
Subject: [petsc-dev] DMNetwork static sizing

Dowe really need a configure time constant for

struct _p_DMNetworkComponentHeader {
  PetscInt index;    /* index for user input global edge and vertex */
  PetscInt subnetid; /* Id for subnetwork */
  PetscInt ndata;    /* number of components */
  PetscInt size[PETSC_DMNETWORK_MAXIMUM_COMPONENTS_PER_POINT];
  PetscInt key[PETSC_DMNETWORK_MAXIMUM_COMPONENTS_PER_POINT];
  PetscInt offset[PETSC_DMNETWORK_MAXIMUM_COMPONENTS_PER_POINT];
  PetscInt nvar[PETSC_DMNETWORK_MAXIMUM_COMPONENTS_PER_POINT]; /* Number of variables */
  PetscInt offsetvarrel[PETSC_DMNETWORK_MAXIMUM_COMPONENTS_PER_POINT]; /* offset from the first variable of the network point */
} PETSC_ATTRIBUTEALIGNED(PetscMax(sizeof(double),sizeof(PetscScalar)));

Can't we just allocate this struct when needed and carry the size along?

This design seem to go against the rest of what we do in PETSc?

  Thanks,

     Matt

--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/<http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20210406/ee6848a6/attachment.html>


More information about the petsc-dev mailing list