Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79765687
lm_python_couplers.hh
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
Wed, Aug 28, 03:21
Size
3 KB
Mime Type
text/x-c
Expires
Fri, Aug 30, 03:21 (2 d)
Engine
blob
Format
Raw Data
Handle
20228147
Attached To
rLIBMULTISCALE LibMultiScale
lm_python_couplers.hh
View Options
#ifndef __LM_PYTHON_COUPLERS_HH__
#define __LM_PYTHON_COUPLERS_HH__
/* -------------------------------------------------------------------------- */
#include <pybind11/eigen.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
/* -------------------------------------------------------------------------- */
#include "bridging.hh"
#include "xiao.hh"
/* -------------------------------------------------------------------------- */
namespace
py
=
pybind11
;
__BEGIN_LIBMULTISCALE__
/* -------------------------------------------------------------------------- */
void
declare_couplers
(
py
::
module
&
m
)
{
py
::
class_
<
DofAssociation
,
Parsable
,
Component
,
std
::
shared_ptr
<
DofAssociation
>>
(
m
,
"DofAssociation"
,
py
::
multiple_inheritance
());
py
::
class_
<
Bridging
,
DofAssociation
,
std
::
shared_ptr
<
Bridging
>>
(
m
,
"Bridging"
,
py
::
multiple_inheritance
())
.
def
(
py
::
init
<
const
std
::
string
&>
())
.
def
(
"init"
,
[](
Bridging
&
self
,
ContainerInterface
&
domA
,
ContainerInterface
&
domB
)
{
self
.
checkAllKeywordsAreParsed
();
self
.
init
<
dispatch
>
(
domA
,
domB
);
})
.
def
(
"mesh2Point"
,
py
::
overload_cast
<
FieldType
,
ContainerArray
<
Real
>
&>
(
&
Bridging
::
mesh2Point
))
.
def
(
"mesh2Point"
,
py
::
overload_cast
<
const
ContainerArray
<
Real
>
&
,
ContainerArray
<
Real
>
&>
(
&
Bridging
::
mesh2Point
))
.
def_property_readonly
(
"pointList"
,
[](
Bridging
&
self
)
{
return
self
.
pointList
;
},
py
::
return_value_policy
::
reference
)
.
def_property_readonly
(
"meshList"
,
[](
Bridging
&
self
)
{
return
self
.
meshList
;
},
py
::
return_value_policy
::
reference
);
py
::
class_
<
BridgingAtomicContinuum
,
Bridging
,
std
::
shared_ptr
<
BridgingAtomicContinuum
>>
(
m
,
"BridgingAtomicContinuum"
,
py
::
multiple_inheritance
());
/* --------------------------------------------------------------------- */
py
::
class_
<
CouplingInterface
,
Parsable
,
Component
,
std
::
shared_ptr
<
CouplingInterface
>>
(
m
,
"CouplingInterface"
,
py
::
multiple_inheritance
());
py
::
class_
<
CouplingAtomicContinuum
,
CouplingInterface
,
std
::
shared_ptr
<
CouplingAtomicContinuum
>>
(
m
,
"CouplingAtomicContinuum"
,
py
::
multiple_inheritance
());
py
::
class_
<
ArlequinTemplate
,
CouplingAtomicContinuum
,
std
::
shared_ptr
<
ArlequinTemplate
>>
(
m
,
"ArlequinTemplate"
,
py
::
multiple_inheritance
())
.
def_property_readonly
(
"bridging_zone"
,
[](
ArlequinTemplate
&
self
)
->
auto
&
{
return
self
.
bridging_zone
;
},
py
::
return_value_policy
::
reference
);
py
::
class_
<
Xiao
,
ArlequinTemplate
,
std
::
shared_ptr
<
Xiao
>>
(
m
,
"Xiao"
,
py
::
multiple_inheritance
())
.
def
(
py
::
init
<
const
std
::
string
&>
())
.
def
(
"init"
,
[](
Xiao
&
self
,
DomainInterface
&
domA
,
DomainInterface
&
domC
)
{
self
.
init
<
dispatch
>
(
domA
,
domC
);
});
}
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
#endif
//__LM_PYTHON_COUPLERS_HH__
Event Timeline
Log In to Comment