xfem.lset_smoothblend module
- class xfem.lset_smoothblend.LevelSet_SmoothBlending(sb_type, option_dict)
Bases:
objectClass to supply the user with an automatically calculated smooth blending function b used in LevelSetMeshAdaptation_Spacetime objects. Call the constructor of this class to obtain an object with the member function CF, which is the sought-after b prepared for you by the constructor. The constructor shall be called with a blending type, either BLEND_FIXED_WIDTH or BLEND_AUTODETECT, as the first argument and a dictionary with options as the second argument. What shall be supplied in the dictionary differs by the blending types.
About the two blending types in detail:
BLEND_FIXED_WIDTH. Required keys in the dict: { “lset”: CF, “order”: int , “width”: float} In this case, the blending is assumed to decay with a fixed width w. The cut topology (time dependent or not) is specified by the lset Coefficientfunction. Starting from those points with lset=0 on the cut interface, we assume that the lset function is a measure of the distance from the interface. (If it is only equivalent to such a function up to a non- degenerating constant this is not a problem, only to the extend that the resulting width might eventually differ by the same constant from w) If the distance (“measured” as such) is between 0 and w, b equals 0. If the distance is between w and 2*w, the blending will increase from 0 to 1 by the polynomial pi_s of order order as defined in https://arxiv.org/abs/2311.02348. For distances greater than 2*w, b=1, asking for a zero deformation.
- BLEND_AUTODETECT. Required keys in the dict: { “lset”: CF, “order”: int, “mesh”: mesh,
“time_order”: int}
In this function, the overall structure of the BLEND_FIXED_WIDTH remains the same. However, the parameter w does not have to be provided explicitely. Instead, it is evaluted by a numerical estimate of all the cut elements inside the current time slice as prescribed by lset. To this extend, the further arguments of a mesh and a time_order are needed. The latter is used to generate sampling points in time for the maximum distance estimation. This means that e.g. time_order 1 or 2 would be typical reasonable choices.
- Calc_blend_CF()