Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77948092
py_fragment_manager.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
Sat, Aug 17, 10:05
Size
2 KB
Mime Type
text/x-c
Expires
Mon, Aug 19, 10:05 (2 d)
Engine
blob
Format
Raw Data
Handle
19922792
Attached To
rAKA akantu
py_fragment_manager.cc
View Options
/* -------------------------------------------------------------------------- */
#include <fragment_manager.hh>
#include <solid_mechanics_model_cohesive.hh>
/* -------------------------------------------------------------------------- */
#include <pybind11/pybind11.h>
/* -------------------------------------------------------------------------- */
namespace
py
=
pybind11
;
/* -------------------------------------------------------------------------- */
namespace
akantu
{
/* -------------------------------------------------------------------------- */
#define def_deprecated(func_name, mesg) \
def(func_name, [](py::args, py::kwargs) { AKANTU_ERROR(mesg); })
#define def_function_nocopy(func_name) \
def( \
#func_name, \
[](SolidMechanicsModel & self) -> decltype(auto) { \
return self.func_name(); \
}, \
py::return_value_policy::reference)
#define def_function(func_name) \
def(#func_name, [](FragmentManager & self) -> decltype(auto) { \
return self.func_name(); \
})
void
register_fragment_manager
(
py
::
module
&
mod
)
{
py
::
class_
<
FragmentManager
>
(
mod
,
"FragmentManager"
)
.
def
(
py
::
init
<
SolidMechanicsModelCohesive
&
,
bool
,
const
ID
&>
(),
py
::
arg
(
"model"
),
py
::
arg
(
"dump_data"
)
=
true
,
py
::
arg
(
"ID"
)
=
"fragment_manager"
)
.
def_function
(
buildFragments
)
.
def_function
(
computeCenterOfMass
)
.
def_function
(
computeVelocity
)
.
def_function
(
computeInertiaMoments
)
.
def_function
(
computeAllData
)
.
def_function
(
computeNbElementsPerFragment
)
.
def_function
(
getNbFragment
)
.
def_function
(
getMass
)
.
def_function
(
getVelocity
)
.
def_function
(
getMomentsOfInertia
)
.
def_function
(
getPrincipalDirections
)
.
def_function
(
getNbElementsPerFragment
);
}
}
// namespace akantu
Event Timeline
Log In to Comment