Skip to content

Commit

Permalink
Clarify role of refractive index/speed of light for anisotrpic materi…
Browse files Browse the repository at this point in the history
…als when choosing a postprocessing side for internal boundaries
  • Loading branch information
sebastiangrimberg committed May 9, 2024
1 parent 8ad2459 commit fb91f0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/src/config/boundaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ The available options are:

- `"SmallerRefractiveIndex"` : Take the value from the side where the material index of
refraction is smaller (speed of light is larger). Typically this selects the vacuum
side.
side. For anisotropic materials, the index of refraction associated with the principal
direction with the smallest value is used.
- `"LargerRefractiveIndex"` : Take the value from the side where the material index of
refraction is larger (speed of light is smaller). Typically this selects the non-vacuum
side.
Expand Down Expand Up @@ -609,7 +610,8 @@ general double-valued). The available options are:

- `"SmallerRefractiveIndex"` : Take the value from the side where the material index of
refraction is smaller (speed of light is larger). Typically this selects the vacuum
side.
side. For anisotropic materials, the index of refraction associated with the principal
direction with the smallest value is used.
- `"LargerRefractiveIndex"` : Take the value from the side where the material index of
refraction is larger (speed of light is smaller). Typically this selects the non-vacuum
side.
4 changes: 2 additions & 2 deletions palace/fem/coefficient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class BdrGridFunctionCoefficient
{
// For interior faces with no way to distinguish on which side to evaluate quantities,
// evaluate on both (using the average or sum, depending on the application).
return (FET.Elem2 && mat_op.GetLightSpeedMin(FET.Elem2->Attribute) ==
return (FET.Elem2 && mat_op.GetLightSpeedMax(FET.Elem2->Attribute) ==
mat_op.GetLightSpeedMax(FET.Elem1->Attribute));
}

Expand All @@ -60,7 +60,7 @@ class BdrGridFunctionCoefficient
// (refractive index is smaller, typically should choose the vacuum side). For cases
// where the speeds are the same, use element 1.
return (FET.Elem2 && side_n_min &&
mat_op.GetLightSpeedMin(FET.Elem2->Attribute) >
mat_op.GetLightSpeedMax(FET.Elem2->Attribute) >
mat_op.GetLightSpeedMax(FET.Elem1->Attribute));
}

Expand Down

0 comments on commit fb91f0f

Please sign in to comment.