I guess you are refering to this question.
In the question above, Aurel refers to the `-gi_scale_vec` and `-ge_scale_vec` that are vectors of the size of the number of elements and scale the intra- and extra-cellular conductivities respectively.
You can create such a vector using a similar approach to the example 05a_regions_vs_gradients/. The only difference is that instead of a vector of size of number of points it needs to be a vector of the number of elements.
The following code can be used as a guidance generate a conductivity scaling vector where the conductivity decreases along the x-axis of the generated block:
size=(20, 0.5, 0.5)
geom = mesh.Block(size= size)
# Set fibre angle to 0°, sheet angle to 90° both on "endo" and "epi" surfaces
geom.set_fibres(0, 0, 90, 90)
# Generate and return base name
meshname = mesh.generate(geom)
fmin, fmax = (2, 0)
adjf_conductivity_fn = job.ID + '_GradientWise_{0:4.2f}-{1:4.2f}_Conductivity.adj'.format(fmin, fmax)
adjf_conductivity = open(adjf_conductivity_fn, 'w')
elem, tags, nelems = txt.read(meshname + '.elem')
points, npts = txt.read(meshname + '.pts')
um_to_mm = 1e-3
for i in range(nelems):
x, y, z = (0,0,0)
count = 0
for point in elem[i]:
x += points[point,0]
y += points[point,1]
z += points[point,2]
count += 1
x = x/count
y = y/count
z = z/count
scaling = (x*um_to_mm + size[0]/2)/(size[0])*(fmax - fmin) + fmin
adjf_conductivity.write(f'{scaling}\n')
adjf_conductivity.close()
cmd += ['-ge_scale_vec', adjf_conductivity_fn]
cmd += ['-gi_scale_vec', adjf_conductivity_fn]