Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F86788791
py_model_couplers.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
Tue, Oct 8, 15:15
Size
3 KB
Mime Type
text/x-c
Expires
Thu, Oct 10, 15:15 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
21473191
Attached To
rAKA akantu
py_model_couplers.cc
View Options
/* -------------------------------------------------------------------------- */
#include "py_aka_array.hh"
/* -------------------------------------------------------------------------- */
#include <coupler_solid_contact.hh>
#include <non_linear_solver.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, \
[](CouplerSolidContact & self) -> decltype(auto) { \
return self.func_name(); \
}, \
py::return_value_policy::reference)
#define def_function(func_name) \
def(#func_name, [](CouplerSolidContact & self) -> decltype(auto) { \
return self.func_name(); \
})
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
void
register_model_couplers
(
py
::
module
&
mod
)
{
py
::
class_
<
CouplerSolidContactOptions
>
(
mod
,
"CouplerSolidContactOptions"
)
.
def
(
py
::
init
<
AnalysisMethod
>
(),
py
::
arg
(
"analysis_method"
)
=
_explicit_dynamic_contact
);
py
::
class_
<
CouplerSolidContact
,
Model
>
(
mod
,
"CouplerSolidContact"
)
.
def
(
py
::
init
<
Mesh
&
,
UInt
,
const
ID
&
,
const
MemoryID
&
,
std
::
shared_ptr
<
DOFManager
>
,
const
ModelType
>
(),
py
::
arg
(
"mesh"
),
py
::
arg
(
"spatial_dimension"
)
=
_all_dimensions
,
py
::
arg
(
"id"
)
=
"coupler_solid_contact"
,
py
::
arg
(
"memory_id"
)
=
0
,
py
::
arg
(
"dof_manager"
)
=
nullptr
,
py
::
arg
(
"model_type"
)
=
ModelType
::
_coupler_solid_contact
)
.
def
(
"initFull"
,
[](
CouplerSolidContact
&
self
,
const
CouplerSolidContactOptions
&
options
)
{
self
.
initFull
(
options
);
},
py
::
arg
(
"_analysis_method"
)
=
CouplerSolidContactOptions
())
.
def
(
"initFull"
,
[](
CouplerSolidContact
&
self
,
const
AnalysisMethod
&
analysis_method
)
{
self
.
initFull
(
_analysis_method
=
analysis_method
);
},
py
::
arg
(
"_analysis_method"
))
.
def
(
"setTimeStep"
,
&
CouplerSolidContact
::
setTimeStep
,
py
::
arg
(
"time_step"
),
py
::
arg
(
"solver_id"
)
=
""
)
.
def
(
"getSolidMechanicsModel"
,
&
CouplerSolidContact
::
getSolidMechanicsModel
,
py
::
return_value_policy
::
reference
)
.
def
(
"getContactMechanicsModel"
,
&
CouplerSolidContact
::
getContactMechanicsModel
,
py
::
return_value_policy
::
reference
)
.
def
(
"dump"
,
py
::
overload_cast
<>
(
&
CouplerSolidContact
::
dump
))
.
def
(
"dump"
,
py
::
overload_cast
<
const
std
::
string
&>
(
&
CouplerSolidContact
::
dump
))
.
def
(
"dump"
,
py
::
overload_cast
<
const
std
::
string
&
,
UInt
>
(
&
CouplerSolidContact
::
dump
))
.
def
(
"dump"
,
py
::
overload_cast
<
const
std
::
string
&
,
Real
,
UInt
>
(
&
CouplerSolidContact
::
dump
));
}
}
// namespace akantu
Event Timeline
Log In to Comment