Skip to content

Commit

Permalink
Clearing the local ip's in the subordinated inputs of the linkers.
Browse files Browse the repository at this point in the history
  • Loading branch information
LogashenkoDL committed Dec 2, 2024
1 parent 6a6e21d commit e594348
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ugbase/lib_disc/spatial_disc/user_data/linker/linker.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ class StdDataLinker
/// forwards the local positions to the data inputs
virtual void local_ips_changed(const size_t seriesID, const size_t newNumIP);

/// requests cleaning of the ip series in the data inputs
virtual void local_ip_series_to_be_cleared();

/// forwards the global positions to the data inputs
virtual void global_ips_changed(const size_t seriesID, const MathVector<dim>* vPos, const size_t numIP);

Expand Down
17 changes: 17 additions & 0 deletions ugbase/lib_disc/spatial_disc/user_data/linker/linker_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,23 @@ local_ips_changed(const size_t seriesID, const size_t newNumIP)
DependentUserData<TData, dim>::local_ips_changed(seriesID, newNumIP);
}

template <typename TImpl, typename TData, int dim>
void StdDataLinker<TImpl,TData,dim>::
local_ip_series_to_be_cleared()
{
// loop inputs
for(size_t i = 0; i < m_vspICplUserData.size(); ++i)
{
// skip unset data
UG_ASSERT(m_vspICplUserData[i].valid(), "No Input set, but requested.");

m_vspICplUserData[i]->clear ();
}

// postprocess the base class
DependentUserData<TData, dim>::local_ip_series_to_be_cleared();
}

template <typename TImpl, typename TData, int dim>
void StdDataLinker<TImpl,TData,dim>::
global_ips_changed(const size_t seriesID, const MathVector<dim>* vPos, const size_t numIP)
Expand Down

0 comments on commit e594348

Please sign in to comment.