diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-05-24 19:37:47 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-05-25 11:23:20 +0200 |
commit | b56e3c5fcf0ff63f1b59890fe843482feba4964c (patch) | |
tree | 489f80def373554eebf6db5eb5252540785770af /Tools/CodeGen/Interface.m | |
parent | bfba9bad6d1628e9880ced2aee809584e45e2b5b (diff) |
Make multiplication by Jacobian selectable at run-time
Use of the Jacobian is determined by the user setting the jacobian_group parameter. Also provide a parameter jacobian_identity_map which the user can set to a Carpet map which does not require the Jacobian, in which case the Jacobian will not be applied.
Diffstat (limited to 'Tools/CodeGen/Interface.m')
-rw-r--r-- | Tools/CodeGen/Interface.m | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Tools/CodeGen/Interface.m b/Tools/CodeGen/Interface.m index c0a15e1..5f8f613 100644 --- a/Tools/CodeGen/Interface.m +++ b/Tools/CodeGen/Interface.m @@ -73,7 +73,7 @@ CreateKrancInterface[nonevolvedGroups_, evolvedGroups_, rhsGroups_, groups_, Module[{registerEvolved, (*registerConstrained,*) nonevolvedGroupStructures, evolvedGroupStructures, rhsGroupStructures, - groupStructures, interface}, + groupStructures, interface, getMap}, VerifyGroupNames[nonevolvedGroups]; VerifyGroupNames[evolvedGroups]; VerifyGroupNames[rhsGroups]; @@ -105,6 +105,13 @@ CreateKrancInterface[nonevolvedGroups_, evolvedGroups_, rhsGroups_, groups_, ArgString -> "CCTK_POINTER_TO_CONST IN cctkGH, CCTK_INT IN dir, CCTK_INT IN nsize, CCTK_INT OUT ARRAY imin, CCTK_INT OUT ARRAY imax, CCTK_REAL OUT ARRAY q, CCTK_INT IN table_handle" }; + getMap = + { + Name -> "MultiPatch_GetMap", + Type -> "CCTK_INT", + ArgString -> "CCTK_POINTER_TO_CONST IN cctkGH" + }; + (* For each group declared in this thorn, we need an entry in the interface file. Each evolved group needs an associated rhs @@ -131,7 +138,7 @@ CreateKrancInterface[nonevolvedGroups_, evolvedGroups_, rhsGroups_, groups_, If[OptionValue[UseVectors], {"vectors.h"}, {}]], groupStructures, UsesFunctions -> - Join[{registerEvolved, (*registerConstrained,*) diffCoeff}, + Join[{registerEvolved, (*registerConstrained,*) diffCoeff, getMap}, CactusBoundary`GetUsedFunctions[]]]; Return[interface]]; |