Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78636966
py_integration_scheme.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 22, 02:45
Size
3 KB
Mime Type
text/x-c
Expires
Sat, Aug 24, 02:45 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
20040512
Attached To
rAKA akantu
py_integration_scheme.cc
View Options
/**
* Copyright (©) 2022-2023 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This file is part of Akantu
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*/
/* -------------------------------------------------------------------------- */
#include "py_integration_scheme.hh"
/* -------------------------------------------------------------------------- */
#include <dof_manager.hh>
#include <integration_scheme.hh>
#include <integration_scheme_1st_order.hh>
#include <integration_scheme_2nd_order.hh>
/* -------------------------------------------------------------------------- */
#include <pybind11/pybind11.h>
/* -------------------------------------------------------------------------- */
namespace py = pybind11;
namespace akantu {
/* -------------------------------------------------------------------------- */
void register_integration_schemes(py::module & mod) {
auto integration_scheme_class =
py::class_<IntegrationScheme>(mod, "IntegrationScheme");
py::enum_<IntegrationScheme::SolutionType>(integration_scheme_class,
"SolutionType")
.value("_not_defined", IntegrationScheme::SolutionType::_not_defined)
.value("_displacement", IntegrationScheme::SolutionType::_displacement)
.value("_temperature", IntegrationScheme::SolutionType::_temperature)
.value("_damage", IntegrationScheme::SolutionType::_damage)
.value("_velocity", IntegrationScheme::SolutionType::_velocity)
.value("_temperature_rate",
IntegrationScheme::SolutionType::_temperature_rate)
.value("_acceleration", IntegrationScheme::SolutionType::_acceleration)
.export_values();
py::class_<IntegrationScheme2ndOrder, IntegrationScheme>(
mod, "IntegrationScheme2ndOrder");
py::class_<NewmarkBeta, IntegrationScheme2ndOrder>(mod, "NewmarkBeta")
.def(py::init<DOFManager &, const ID &, Real, Real>(),
py::arg("dof_manager"), py::arg("id"), py::arg("alpha"),
py::arg("beta"))
.def_property("alpha", &NewmarkBeta::getAlpha, &NewmarkBeta::setAlpha)
.def_property("beta", &NewmarkBeta::getBeta, &NewmarkBeta::setBeta);
py::class_<CentralDifference, NewmarkBeta>(mod, "CentralDifference");
py::class_<TrapezoidalRule2, NewmarkBeta>(mod, "TrapezoidalRule2");
py::class_<FoxGoodwin, NewmarkBeta>(mod, "FoxGoodwin");
py::class_<LinearAceleration, NewmarkBeta>(mod, "LinearAceleration");
}
} // namespace akantu
Event Timeline
Log In to Comment