modules
core
MarmotMathCore
include
Marmot
MarmotNumericalIntegration.h
Go to the documentation of this file.
1
2
/* ---------------------------------------------------------------------
3
* _
4
* _ __ ___ __ _ _ __ _ __ ___ ___ | |_
5
* | '_ ` _ \ / _` | '__| '_ ` _ \ / _ \| __|
6
* | | | | | | (_| | | | | | | | | (_) | |_
7
* |_| |_| |_|\__,_|_| |_| |_| |_|\___/ \__|
8
*
9
* Unit of Strength of Materials and Structural Analysis
10
* University of Innsbruck,
11
* 2020 - today
12
*
13
* festigkeitslehre@uibk.ac.at
14
*
15
* Alexander Dummer alexander.dummer@uibk.ac.at
16
*
17
* This file is part of the MAteRialMOdellingToolbox (marmot).
18
*
19
* This library is free software; you can redistribute it and/or
20
* modify it under the terms of the GNU Lesser General Public
21
* License as published by the Free Software Foundation; either
22
* version 2.1 of the License, or (at your option) any later version.
23
*
24
* The full text of the license can be found in the file LICENSE.md at
25
* the top level directory of marmot.
26
* ---------------------------------------------------------------------
27
*/
28
29
#pragma once
30
#include <functional>
31
32
namespace
Marmot
{
33
namespace
NumericalAlgorithms::Integration {
34
35
using
scalar_to_scalar_function_type
= std::function< double(
const
double
x ) >;
36
37
enum
integrationRule
{
midpoint
,
trapezodial
,
simpson
};
38
39
double
integrateScalarFunction
(
scalar_to_scalar_function_type
f,
40
const
std::tuple< double, double > integrationLimits,
41
const
int
n,
42
const
integrationRule
intRule );
43
}
// namespace NumericalAlgorithms::Integration
44
}
// namespace Marmot
Marmot::NumericalAlgorithms::Integration::simpson
@ simpson
Definition:
MarmotNumericalIntegration.h:37
Marmot::NumericalAlgorithms::Integration::trapezodial
@ trapezodial
Definition:
MarmotNumericalIntegration.h:37
Marmot::NumericalAlgorithms::Integration::integrationRule
integrationRule
Definition:
MarmotNumericalIntegration.h:37
Marmot::NumericalAlgorithms::Integration::integrateScalarFunction
double integrateScalarFunction(scalar_to_scalar_function_type f, const std::tuple< double, double > integrationLimits, const int n, const integrationRule intRule)
Definition:
MarmotNumericalIntegration.cpp:8
Marmot
This file includes functions needed for calculations with stress and strain tensors written in voigt ...
Definition:
MarmotTesting.h:32
Marmot::NumericalAlgorithms::Integration::scalar_to_scalar_function_type
std::function< double(const double x) > scalar_to_scalar_function_type
Definition:
MarmotNumericalIntegration.h:35
Marmot::NumericalAlgorithms::Integration::midpoint
@ midpoint
Definition:
MarmotNumericalIntegration.h:37