Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 425
    • Issues 425
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

Planned maintenance at 14:00 - platform may be offline until 15:00 (UK times)

  • Development
  • openfoamopenfoam
  • Issues
  • #1676
Closed
Open
Issue created Apr 09, 2020 by Henning Scheufler@Henning86

mappedPatchBase is not updated if the sampleMesh is topochanging

Summary

This could be an issue in the imaginable solver: chtMultiRegionDyMFoam.

mappedPatchBase should recalculate the addressing to the sampledPatch if the sampledMesh changes its topology. The addressing should also be recalculated if the mesh owning the patch changes its topolology. This would be the case with dynamicMotionSolverFvMesh with e.g. displacementLaplacian motion solver. In case of AMR, the fields are remapped after calling mappedPatchBase::clearOut

Possible fixes

mappedPatchBaseI.H:

inline const Foam::mapDistribute& Foam::mappedPatchBase::map() const
{
    const polyMesh& thisMesh = patch_.boundaryMesh().mesh();
    bool topoChange = sampleMesh().topoChanging() || thisMesh.topoChanging();

    if (topoChange)
    {
        mapPtr_.clear();
    }

    if (mapPtr_.empty())
    {
        calcMapping();
    }

    return *mapPtr_;
}


inline const Foam::AMIPatchToPatchInterpolation& Foam::mappedPatchBase::AMI
(
    bool forceUpdate
) const
{
    const polyMesh& thisMesh = patch_.boundaryMesh().mesh();
    bool topoChange = sampleMesh().topoChanging() || thisMesh.topoChanging();

    if (topoChange || forceUpdate)
    {
        AMIPtr_.clear();
    }

    if (AMIPtr_.empty())
    {
        calcAMI();
    }

    return *AMIPtr_;
}

mappedPatchBase.C:

const Foam::autoPtr<Foam::searchableSurface>& Foam::mappedPatchBase::surfPtr()
const
{
    const polyMesh& thisMesh = patch_.boundaryMesh().mesh();
    bool topoChange = thisMesh.topoChanging();
    if (topoChange)
    {
        surfPtr_.clear();
    }

    const word surfType(surfDict_.lookupOrDefault<word>("type", "none"));

    if (!surfPtr_.valid() && surfType != "none")
    {
    ...
    ...
Edited Apr 15, 2020 by Henning Scheufler
Assignee
Assign to
Time tracking