Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77470540
normal_bind.cpp
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 14, 16:28
Size
1 KB
Mime Type
text/x-c
Expires
Fri, Aug 16, 16:28 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
19872975
Attached To
rDLMA Diffusion limited mixed aggregation
normal_bind.cpp
View Options
#include <normal_bind.hh>
namespace
simulation
{
template
<
typename
type
>
normal_bind
<
type
>::
normal_bind
(
system
<
type
>
*
system_ptr
){
sys_state
=
system_ptr
;
}
template
<
typename
type
>
constituent
<
type
>*
normal_bind
<
type
>::
bind_aggregates
(
constituent
<
type
>
*
c_1
,
constituent
<
type
>
*
c_2
){
//std::cout<<"1"<<std::endl;
std
::
string
name_type
=
"cluster"
;
constituent
<
type
>
*
temp
;
temp
=
factory
.
create_constituent
(
sys_state
->
get_latest_cluster_id
(),
sys_state
->
get_lattice
(),
sys_state
->
get_dim
(),
name_type
,
sys_state
->
get_box
());
for
(
int
i
=
0
;
i
<
c_1
->
get_size
();
i
++
){
temp
->
add_constituent
(
c_1
->
get_element
(
i
));
}
for
(
int
i
=
0
;
i
<
c_2
->
get_size
();
i
++
){
temp
->
add_constituent
(
c_2
->
get_element
(
i
));
}
temp
->
calculate_aggregate_mass
();
temp
->
set_current_seed_status
(
1
);
sys_state
->
remove_aggregate
(
c_1
->
get_id
());
sys_state
->
remove_aggregate
(
c_2
->
get_id
());
delete
c_1
;
delete
c_2
;
sys_state
->
add_aggregate
(
temp
);
sys_state
->
build_id_map
();
sys_state
->
build_idx_map_for_agg
();
sys_state
->
calculate_propensity
();
return
temp
;
}
template
class
normal_bind
<
int
>
;
template
class
normal_bind
<
double
>
;
}
Event Timeline
Log In to Comment