Revision 99bcb1a63c60aff851469c7ff47d2e33c213b5c2 authored by Dmitry Yu. Naumov on 02 February 2023, 10:06:47 UTC, committed by Dmitry Yu. Naumov on 02 February 2023, 10:06:47 UTC
Small fixes See merge request ogs/ogs!4466
GenericIntegrationMethod.h
/**
* \file
* \copyright
* Copyright (c) 2012-2023, 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 <vector>
#include "MathLib/WeightedPoint.h"
namespace NumLib
{
//! Provides data for arbitrary numerical integration methods of any integration
//! order.
//!
//! This class basically holds a collection of integration points and
//! integration weights.
class GenericIntegrationMethod final
{
public:
GenericIntegrationMethod(unsigned const order,
std::vector<MathLib::WeightedPoint>&& points)
: order_{order}, points_{std::move(points)}
{
}
unsigned getIntegrationOrder() const { return order_; }
unsigned getNumberOfPoints() const { return points_.size(); }
MathLib::WeightedPoint const& getWeightedPoint(unsigned const igp) const
{
return points_[igp];
}
// forbid accidental copies
GenericIntegrationMethod(GenericIntegrationMethod const&) = delete;
GenericIntegrationMethod& operator=(GenericIntegrationMethod const&) =
delete;
GenericIntegrationMethod(GenericIntegrationMethod&&) = default;
GenericIntegrationMethod& operator=(GenericIntegrationMethod&&) = default;
private:
unsigned order_;
std::vector<MathLib::WeightedPoint> points_;
};
} // namespace NumLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...