carputils.mesh
.block_region
orphan: |
---|
carputils.mesh.
block_region
(block, entity, index, low, up, bath=False, verbose=False)Generate a boundary condition definition for a Block
.
Given a Block
, generate a set of openCARP options
defining a block-shaped region on a given domain
low and up specify lower and upper coordinates of the block region.
For example, for the default origin-centred box of size (1,1,1) and resolution 0.1:
>>> geom = Block()
calling block_region()
with low =’[-0.5, -0.5 -0.5]’ and up=’[0.0, 0.0, 0.0]’:
>>> block_region(geom, 'stimulus', 0, low, up, False)
will generate a stimulus block definition for -0.5<=x<=0., -0.5<=y<=0. and -0.5<=z<=0.0.