Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103723611
py_heat_transfer_model.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, Mar 4, 07:43
Size
3 KB
Mime Type
text/x-c
Expires
Thu, Mar 6, 07:43 (2 d)
Engine
blob
Format
Raw Data
Handle
24505832
Attached To
rAKA akantu
py_heat_transfer_model.cc
View Options
/**
* Copyright (©) 2019-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_aka_array.hh"
/* -------------------------------------------------------------------------- */
#include <heat_transfer_model.hh>
#include <non_linear_solver.hh>
/* -------------------------------------------------------------------------- */
//#include <pybind11/operators.h>
#include <pybind11/pybind11.h>
//#include <pybind11/stl.h>
/* -------------------------------------------------------------------------- */
namespace
py
=
pybind11
;
/* -------------------------------------------------------------------------- */
namespace
akantu
{
/* -------------------------------------------------------------------------- */
#define def_function_nocopy(func_name) \
def( \
#func_name, \
[](HeatTransferModel & self) -> decltype(auto) { \
return self.func_name(); \
}, \
py::return_value_policy::reference)
#define def_function(func_name) \
def(#func_name, [](HeatTransferModel & self) -> decltype(auto) { \
return self.func_name(); \
})
/* -------------------------------------------------------------------------- */
void
register_heat_transfer_model
(
py
::
module
&
mod
)
{
py
::
class_
<
HeatTransferModelOptions
>
(
mod
,
"HeatTransferModelOptions"
)
.
def
(
py
::
init
<
AnalysisMethod
>
(),
py
::
arg
(
"analysis_method"
)
=
_explicit_lumped_mass
);
py
::
class_
<
HeatTransferModel
,
Model
>
(
mod
,
"HeatTransferModel"
,
py
::
multiple_inheritance
())
.
def
(
py
::
init
<
Mesh
&
,
UInt
,
const
ID
&>
(),
py
::
arg
(
"mesh"
),
py
::
arg
(
"spatial_dimension"
)
=
_all_dimensions
,
py
::
arg
(
"id"
)
=
"heat_transfer_model"
)
.
def
(
"initFull"
,
[](
HeatTransferModel
&
self
,
const
HeatTransferModelOptions
&
options
)
{
self
.
initFull
(
options
);
},
py
::
arg
(
"_analysis_method"
)
=
HeatTransferModelOptions
())
.
def
(
"initFull"
,
[](
HeatTransferModel
&
self
,
const
AnalysisMethod
&
_analysis_method
)
{
self
.
initFull
(
HeatTransferModelOptions
(
_analysis_method
));
},
py
::
arg
(
"_analysis_method"
))
.
def
(
"setTimeStep"
,
&
HeatTransferModel
::
setTimeStep
,
py
::
arg
(
"time_step"
),
py
::
arg
(
"solver_id"
)
=
""
)
.
def_function
(
getStableTimeStep
)
.
def_function_nocopy
(
getTemperature
)
.
def_function_nocopy
(
getBlockedDOFs
)
.
def
(
"getTemperatureGradient"
,
&
HeatTransferModel
::
getTemperatureGradient
,
py
::
arg
(
"el_type"
),
py
::
arg
(
"ghost_type"
)
=
_not_ghost
,
py
::
return_value_policy
::
reference
)
.
def
(
"getKgradT"
,
&
HeatTransferModel
::
getKgradT
,
py
::
arg
(
"el_type"
),
py
::
arg
(
"ghost_type"
)
=
_not_ghost
,
py
::
return_value_policy
::
reference
);
}
}
// namespace akantu
Event Timeline
Log In to Comment