From c71f1c123b1210943375c9264d8eed5337255cb8 Mon Sep 17 00:00:00 2001
From: KyleKlenk <kyle.c.klenk@gmail.com>
Date: Mon, 24 Jul 2023 00:47:13 +0000
Subject: [PATCH] added new par file for input of simulation parameters

---
 simulations/input/new_basic.par | 70 +++++++++++++++++++++++++++++++++
 src/main.cpp                    | 34 +++++++++++++++-
 2 files changed, 102 insertions(+), 2 deletions(-)
 create mode 100644 simulations/input/new_basic.par

diff --git a/simulations/input/new_basic.par b/simulations/input/new_basic.par
new file mode 100644
index 0000000..158bf55
--- /dev/null
+++ b/simulations/input/new_basic.par
@@ -0,0 +1,70 @@
+# ----------------------------------------
+# 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
+
diff --git a/src/main.cpp b/src/main.cpp
index 5c20e29..446a95f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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
-- 
GitLab