visit icon indicating copy to clipboard operation
visit copied to clipboard

Ability to draw material edge lines

Open JustinPrivitera opened this issue 2 years ago • 5 comments

Slide8

JustinPrivitera avatar Aug 09 '22 02:08 JustinPrivitera

We actually have logic that calculates the external faces for each block and then uses the coordinates to eliminate duplicate faces. This is only implemented for structured grids, but it could be done for unstructured grids as well. We probably should have a switch to turn this off since it is expensive to do.

brugger1 avatar Aug 16 '22 23:08 brugger1

We currently have the following ghost zone types defined in avtGhostData.h:

typedef enum
{
    DUPLICATED_ZONE_INTERNAL_TO_PROBLEM = 0,
    ENHANCED_CONNECTIVITY_ZONE = 1,
    REDUCED_CONNECTIVITY_ZONE = 2,
    REFINED_ZONE_IN_AMR_GRID = 3,
    ZONE_EXTERIOR_TO_PROBLEM = 4,
    ZONE_NOT_APPLICABLE_TO_PROBLEM = 5
} avtGhostZoneTypes;
  • We currently use DUPLICATED_ZONE_INTERNAL_TO_PROBLEM for ghost zones that correspond to ghost zones that are duplicated in other domains. We want to add these when we have domain decomposed data.
  • We currently use ZONE_NOT_APPLICABLE_TO_PROBLEM for ghost zones that invalid and should not be considered part of the problem. We currently use these for sanded zones.

We want to modify the logic that decides about adding ghost zones using global node ids to do so if there aren't any ghost zones marked DUPLICATED_ZONE_INTERNAL_TO_PROBLEM.

We want to modify the ghost zone removal logic to first remove ghost zones marked ZONE_NOT_APPLICABLE_TO_PROBLEM, then calculate the external faces, then remove the ghost zones marked DUPLICATED_ZONE_INTERNAL_TO_PROBLEM along with any faces corresponding to them.

brugger1 avatar Oct 30 '23 23:10 brugger1

The class avtDatabaseMetaData has methods for tracking the ghost zone types associated with a mesh. We can use those to determine if one of the ghost zone types is DUPLICATED_ZONE_INTERNAL_TO_PROBLEM.

    int GetGhostZoneTypesPresent(std::string name) const;
    void ClearGhostTypesPresent(std::string name);
    void AddGhostZoneTypePresent(std::string name, avtGhostsZonesPresent v);

There is only one spot where AddGhostZoneTypePresent is used and only a couple where GetGhostZoneTypesPresent is used, so these probably aren't appropriately set at the moment. It seems like it should be done down in the readers.

The class also had methods for tracking if a mesh has ghost zones for a mesh.

    void         SetContainsGhostZones(std::string name, avtGhostType);
    avtGhostType GetContainsGhostZones(std::string name) const;

Notice that they use avtGhostType, which comes from avtTypes.h.

enum avtGhostType
{
    AVT_NO_GHOSTS        = 0,
    AVT_HAS_GHOSTS,     /* 1 */
    AVT_CREATED_GHOSTS, /* 2 */
    AVT_MAYBE_GHOSTS    /* 3 */
};

SetContainsGhostZones gets called in avtGenericDatabase::GetMesh based on the existance of the array avtGhostZones being present in the mesh cell data.

brugger1 avatar Nov 01 '23 18:11 brugger1

The method avtGenericDatabase::CommunicateGhosts has mechanisms for generating ghost zones if they aren't already present. It has an early exit if GetContainsGhostZones(meshname) == AVT_HOST_GHOSTS for the mesh on any processor. This early termination needs to be modified to take into account the ghost zone type for the mesh.

In particular, it has a mechanism to generate the ghost zones if the mesh has global node ids. We should be able to leverage this to generate the ghost zones in Mili files.

    else if (ghostType == GHOST_ZONE_DATA)
    {
        if (hasDomainBoundaryInfo)
            madeGhosts = CommunicateGhostZonesFromDomainBoundariesFromFile
                (ds, doms, spec, src);
        else if (canUseGlobalNodeIds)
            madeGhosts = CommunicateGhostZonesFromGlobalNodeIds
                (ds, doms, spec, src);
        else if (canDoStreamingGhosts)
            madeGhosts = CommunicateGhostZonesWhileStreaming
                (ds, doms, spec, src);
    }

brugger1 avatar Nov 01 '23 18:11 brugger1

@durrenberger1

JustinPrivitera avatar Feb 01 '24 18:02 JustinPrivitera