Skip to content

Issue on page /julia/waveguide_anisotropic.html #220

@muchalito

Description

@muchalito

Hello,

Can the Python/ScikitFem version of the code model anisotropic materials as well, or is this only available in Julia?

I'm looking at how to modify the statement in Python to assign the material parameters as 3x3 matrices but it flags an error as it's expecting only scalars:

basis0 = Basis(mesh, ElementTriP0())
epsilon = basis0.zeros()
if True:
for subdomain, n in {"core": index_core, "box": index_box, "clad": index_cladding}.items():
epsilon[basis0.get_dofs(elements=subdomain)] = (n**2)*np.eye(3)
basis0.plot(epsilon, colorbar=True).show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions