Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ void MappingGraph::build(const InputLists& input)

// 1. Create one wrapper node per object; index state nodes by raw ptr.
std::vector<MappingGraphNode<sofa::core::behavior::BaseMechanicalState>*> mechanicalStateNodes;
for (auto& s : input.mechanicalStates)
for (auto* s : input.mechanicalStates)
{
auto node = makeMappingGraphNode<sofa::core::behavior::BaseMechanicalState>(s);
mechanicalStateNodes.push_back(node.get());
Expand Down Expand Up @@ -333,6 +333,16 @@ void MappingGraph::build(const InputLists& input)
{
addEdge(sn, mappingNode);
}
else
{
thread_local sofa::helper::logging::OnceTracker sofaMsgOnceTracker;
const bool firstTimeMapping = sofaMsgOnceTracker.firstTimeFor(static_cast<const void*>(input.mappings[i]));
const bool firstTimeState = sofaMsgOnceTracker.firstTimeFor(static_cast<const void*>(s));
if (firstTimeMapping || firstTimeState)
{
msg_warning(input.mappings[i]) << "Mapping input '" << s->getPathName() << "' is not contained in the mapping graph context. It will not be considered when traversing the graph, neither the components relying on it.";
}
}
}
}

Expand All @@ -342,6 +352,16 @@ void MappingGraph::build(const InputLists& input)
{
addEdge(mappingNode, sn);
}
else
{
thread_local sofa::helper::logging::OnceTracker sofaMsgOnceTracker;
const bool firstTimeMapping = sofaMsgOnceTracker.firstTimeFor(static_cast<const void*>(input.mappings[i]));
const bool firstTimeState = sofaMsgOnceTracker.firstTimeFor(static_cast<const void*>(s));
if (firstTimeMapping || firstTimeState)
{
msg_warning(input.mappings[i]) << "Mapping output '" << s->getPathName() << "' is not contained in the mapping graph context. It will not be considered when traversing the graph, neither the components relying on it.";
}
}
}
}

Expand Down
Loading