Revision 54cf21a1380719172c0b049f860dafc30e37cd56 authored by Dmitry Yu. Naumov on 02 March 2021, 22:50:12 UTC, committed by Dmitry Yu. Naumov on 02 March 2021, 22:50:12 UTC
Exclude _deps directory from warnings check. See merge request ogs/ogs!3478
moveMeshNodes.h
/**
* @file moveMeshNodes.h
* @author Thomas Fischer
* @date Feb 03, 2014
* @brief Functionality to move mesh nodes using a given displacement vec.
*
* \file
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#pragma once
#include "MeshLib/Node.h"
namespace MeshLib
{
/**
* Function that moves mesh nodes.
*
* The function iterates over all mesh nodes between the
* begin and the end iterator and moves them using the
* given displacement.
* @param begin begin iterator
* @param end end iterator
* @param displacement the displacement to use
*/
template <typename Iterator>
void moveMeshNodes(
Iterator begin,
Iterator end,
MeshLib::Node const& displacement)
{
std::for_each(begin, end, [&displacement](MeshLib::Node* node)
{
(*node)[0] += displacement[0];
(*node)[1] += displacement[1];
(*node)[2] += displacement[2];
}
);
};
} // end namespace MeshLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...