Task: Add missing WaveMoLRegister.c in CactusExamples/WaveMoL (einsteintoolkit/Cactus#2)

org: einsteintoolkit
repo: Cactus
pr_number: 2
issue_title: Add missing WaveMoLRegister.c in CactusExamples/WaveMoL
issue_body: This PR adds the missing source file WaveMoLRegister.c to complete the CactusExamples/WaveMoL thorn implementation.
resolved_issues: number: 2
title: Implement the full functionality of WaveMoL
body: Please implement the full functionality of `WaveMoL` by finishing the code in `WaveMoLRegister.c`.

## Thorn Information:
- Name: WaveMoL
- Target file: WaveMoLRegister.c

## Interface Definition in interface.ccl:

## Schedule Definition in schedule.ccl:

## Parameters Definition in param.ccl:

## Configuration Definition in configuration.ccl:

## Documentation Context in readme.md and doc/documentation.tex

## Related Code Context in src folder



Reference solution:
fix_patch: diff --git a/arrangements/CactusExamples/WaveMoL/src/WaveMoLRegister.c b/arrangements/CactusExamples/WaveMoL/src/WaveMoLRegister.c
new file mode 100644
index 0000000..0000000
--- /dev/null
+++ b/arrangements/CactusExamples/WaveMoL/src/WaveMoLRegister.c
@@ -0,0 +1,93 @@
+ /*@@
+   @file      WaveMoLRegister.c
+   @date      Fri Nov  9 13:47:07 2001
+   @author    Ian Hawke
+   @desc 
+   Routine to register the variables with the MoL thorn.
+   @enddesc 
+ @@*/
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+#include "cctk_Parameters.h"
+
+static const char *rcsid = "$Header$";
+
+CCTK_FILEVERSION(CactusExamples_WaveMoL_WaveMoLRegister_c)
+
+/*
+#ifndef DEBUG_MOL
+#define DEBUG_MOL
+#endif
+*/
+
+void WaveMoL_RegisterVars(CCTK_ARGUMENTS);
+
+ /*@@
+   @routine    WaveMoL_RegisterVars
+   @date       Fri Nov  9 13:47:41 2001
+   @author     Ian Hawke
+   @desc 
+   The registration routine.
+   @enddesc 
+   @calls     
+   @calledby   
+   @history 
+ 
+   @endhistory 
+
+@@*/
+
+void WaveMoL_RegisterVars(CCTK_ARGUMENTS)
+{
+
+  DECLARE_CCTK_ARGUMENTS;
+  DECLARE_CCTK_PARAMETERS;
+
+  CCTK_INT ierr = 0, group, rhs, var;
+
+  group = CCTK_GroupIndex("wavemol::scalarevolvemol_scalar");
+  rhs = CCTK_GroupIndex("wavemol::scalarrhsmol_scalar");
+
+  if (CCTK_IsFunctionAliased("MoLRegisterEvolvedGroup"))
+  {
+    ierr += MoLRegisterEvolvedGroup(group, rhs);
+  }
+  else
+  {
+    CCTK_WARN(0, "MoL function not aliased");
+    ierr++;
+  }
+
+  group = CCTK_GroupIndex("wavemol::scalarevolvemol_vector");
+  rhs = CCTK_GroupIndex("wavemol::scalarrhsmol_vector");
+
+  if (CCTK_IsFunctionAliased("MoLRegisterEvolvedGroup"))
+  {
+    ierr += MoLRegisterEvolvedGroup(group, rhs);
+  }
+  else
+  {
+    CCTK_WARN(0, "MoL function MoLRegisterEvolvedGroup not aliased");
+    ierr++;
+  }
+
+  var = CCTK_VarIndex("wavemol::energy");
+
+  if (CCTK_IsFunctionAliased("MoLRegisterConstrained"))
+  {
+    ierr += MoLRegisterConstrained(var);
+  }
+  else
+  {
+    CCTK_WARN(0, "MoL function MoLRegisterConstrained not aliased");
+    ierr++;
+  }      
+  
+  if (ierr) CCTK_WARN(0,"Problems registering with MoL");
+
+#ifdef DEBUG_MOL
+  printf("If we've got this far, then we've done with wavetoy registration.\n");
+#endif  
+
+}