Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenCARP Actors
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Numerical_Simulations_Lab
Cardiac
OpenCARP Actors
Commits
c71f1c12
Commit
c71f1c12
authored
1 year ago
by
KyleKlenk
Browse files
Options
Downloads
Patches
Plain Diff
added new par file for input of simulation parameters
parent
2c33a8ab
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
simulations/input/new_basic.par
+70
-0
70 additions, 0 deletions
simulations/input/new_basic.par
src/main.cpp
+32
-2
32 additions, 2 deletions
src/main.cpp
with
102 additions
and
2 deletions
simulations/input/new_basic.par
0 → 100644
+
70
−
0
View file @
c71f1c12
# ----------------------------------------
# Output Folder Name
# ----------------------------------------
simID = Test_Output
# ----------------------------------------
# Meshname
# ----------------------------------------
meshname = meshes/2023-07-21_hUDXjwCFKT/block
# ----------------------------------------
# Definition of physics region
# ----------------------------------------
num_phys_regions = 2
phys_region[0].name = "Intracellular domain"
phys_region[0].ptype = 0
phys_region[0].num_IDs = 1
phys_region[0].ID[0] = 1
phys_region[1].name = "Extracellular domain"
phys_region[1].ptype = 1
phys_region[1].num_IDs = 1
phys_region[1].ID[0] = 1
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ---------------
# Definition of ionic model and plugins (IMP) for each unique tagged
# region in the mesh
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ------ ----- ----
num_imp_regions = 1
imp_region[0].im = DrouhardRoberge
# --------------------
# Definition of stimuli
# --------------------
num_stim = 1
stimulus[0].name = S1
stimulus[0].stimtype = 0
stimulus[0].strength = 20.0
stimulus[0].duration = 2.0
stimulus[0].x0 = -50.0
stimulus[0].xd = 2100.0
stimulus[0].y0 = -50.0
stimulus[0].yd = 400.0
stimulus[0].z0 = -50.0
stimulus[0].zd = 300.0
# -------------------------------
# Definition of general parameters
# -------------------------------
tend = 20.0
spacedt = 1.0
timedt = 1.0
# --------------------------------------------------
# Definition of solving problem and numerical methods
# --------------------------------------------------
bidomain = 0
dt = 25
parab_options_file = /root/.local/lib/python3.8/site-packages/carputils/resources/petsc_options/ilu_cg_opts
ellip_options_file = /root/.local/lib/python3.8/site-packages/carputils/resources/petsc_options/gamg_cg_opts
parab_solve = 1
ellip_use_pt = 0
parab_use_pt = 0
This diff is collapsed.
Click to expand it.
src/main.cpp
+
32
−
2
View file @
c71f1c12
...
...
@@ -5,6 +5,27 @@
using
namespace
caf
;
// Define some message atoms
CAF_BEGIN_TYPE_ID_BLOCK
(
my_project
,
caf
::
first_custom_type_id
)
CAF_ADD_ATOM
(
my_project
,
some_atom
)
CAF_ADD_ATOM
(
my_project
,
some_other_atom
)
CAF_END_TYPE_ID_BLOCK
(
my_project
)
behavior
some_actor
(
event_based_actor
*
self
)
{
return
{
[
=
](
some_atom
)
{
aout
(
self
)
<<
"received some_atom
\n
"
;
},
};
}
void
caf_main
(
actor_system
&
system
)
{
scoped_actor
self
{
system
};
YAML
::
Node
config
;
...
...
@@ -18,12 +39,21 @@ void caf_main(actor_system& system) {
aout
(
self
)
<<
"config = "
<<
config
<<
"
\n
"
;
auto
some_actor_ref
=
self
->
spawn
(
some_actor
);
self
->
send
(
some_actor_ref
,
some_atom_v
);
// std::vector<int> val_1 = config["some_val"].as<std::vector<int>>();
// aout(self) << "val_1 = " << val_1 << "\n";
}
int
main
()
{
caf
::
exec_main_init_meta_objects
<
io
::
middleman
,
id_block
::
my_project
>
();
caf
::
core
::
init_global_meta_objects
();
int
dummy_argc
=
0
;
char
**
dummy_argv
=
nullptr
;
return
caf
::
exec_main
<>
(
caf_main
,
dummy_argc
,
dummy_argv
);
}
CAF_MAIN
(
io
::
middleman
)
\ No newline at end of file
// CAF_MAIN(io::middleman, id_block::my_project)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment