Commit Graph

15 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
d08920476e Added copyright block to all source code files. 2010-10-12 07:25:46 +00:00
Bård Skaflestad
3aedc2bc27 Indent region following insertion of conditional in -r5507.
White-space only, no functional changes.
2010-10-06 19:30:36 +00:00
Bård Skaflestad
6da1feb765 In coarse_topology_build_final(), whilst constructing the sub-face
mapping, guard against bns[b1] being NULL.  This will legitimately
  occur in this implementation whenever b1's neighbouring blocks are
  all numbered less than b1, e.g., for the very last block.

  Uncovered by: knl (During Shell presentation)
2010-10-06 19:29:10 +00:00
Bård Skaflestad
8413144b50 Correct a few off-by-ones in the CSR push-back implementation. 2010-10-03 22:01:15 +00:00
Bård Skaflestad
bcac0e78da Summarise purpose for remaining functions. Document a few
parameters and return values.

  While here, convert function pair coarse_topology_build_coarsef()
  and coarse_topology_build_final() to CSR push-back build mode.
2010-09-14 12:15:49 +00:00
Bård Skaflestad
c3c7000815 Complete revision 5188. Sorry about the breakage. 2010-09-09 16:46:28 +00:00
Bård Skaflestad
c324097c63 Don't generate "negative" indices (size_t's) whilst double-probing
the set.  Allow 'm' table-lookups (i==m is valid).  Full table
  detected by inspecting final s[j].  Finally, hash_set_insert_core()
  does not return the key but rather the index at which the key was
  inserted.  Update assertion in hash_set_expand() to respect this
  property.

  Also, for increased transparency during debugging, assign
  intermediate quantities of the hash function to separate variables.
2010-08-31 12:27:21 +00:00
Bård Skaflestad
11c12f8fb6 Fix egregious off-by-one. Now generates coarse grid for 1.122e6
Cartesian cells in 0.1 seconds on a laptop computer.
2010-08-31 01:40:05 +00:00
Bård Skaflestad
e0c6e24ab7 Correct a number of small, but crucial, mistakes:
- Initialise new neighbours to INT_MIN rather than -1.  The latter
      is a valid block (the outside) and it is better to properly
      distinguish unset values from boundary blocks.

    - Ensure NULL-initialisation of a block's neighbour structure when
      this structure has just been allocated.

    - Adjust bin-search algorithm to support i==nneigh (target larger
      than all existing neighbouring blocks).

    - This means that if i==nneigh, then we must take precaution so as
      not to reference any invalid table elements.  However, an
      explicit check for i<nneigh means that the semantics of the
      memmove() statement becomes more transparent.

    - Finally, we must properly assign the 'nblocks' and 'nfaces'
      fields of the struct coarse_topology before returning to caller.
2010-08-30 21:42:52 +00:00
Bård Skaflestad
9cd8f309c3 Announce and implement the public interface for deriving coarse-grid
topology from a fine-grid topology and a partition vector.
2010-08-30 16:51:25 +00:00
Bård Skaflestad
424e919a64 Correctly define the 'b' field of a new block-to-block coarse-scale
connection.
2010-08-29 22:00:03 +00:00
Bård Skaflestad
2391437b3b Add first, untested, edition of code for creating and updating a
block-to-block coarse-scale connection with optional fine-scale
  constituents.
2010-08-29 21:54:11 +00:00
Bård Skaflestad
3d316e6279 Insert summary comments. 2010-08-29 20:01:43 +00:00
Bård Skaflestad
1489e72bc4 Stop-gap implementation of coarse-to-fine connection topology.
Unfinished.
2010-08-27 12:35:13 +00:00
Bård Skaflestad
0c6a564cbb Move hash.c to coarse_conn.c to reflect new responsibilities. 2010-08-27 08:52:00 +00:00