hillclimber 0.1.6__cp313-cp313-macosx_15_0_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (468) hide show
  1. hillclimber/__init__.py +41 -0
  2. hillclimber/actions.py +53 -0
  3. hillclimber/analysis.py +590 -0
  4. hillclimber/biases.py +293 -0
  5. hillclimber/calc.py +22 -0
  6. hillclimber/cvs.py +1070 -0
  7. hillclimber/interfaces.py +133 -0
  8. hillclimber/metadynamics.py +416 -0
  9. hillclimber/nodes.py +6 -0
  10. hillclimber/opes.py +359 -0
  11. hillclimber/pycv.py +362 -0
  12. hillclimber/selectors.py +230 -0
  13. hillclimber/virtual_atoms.py +341 -0
  14. hillclimber-0.1.6.dist-info/METADATA +325 -0
  15. hillclimber-0.1.6.dist-info/RECORD +468 -0
  16. hillclimber-0.1.6.dist-info/WHEEL +6 -0
  17. hillclimber-0.1.6.dist-info/entry_points.txt +8 -0
  18. hillclimber-0.1.6.dist-info/licenses/LICENSE +165 -0
  19. plumed/__init__.py +104 -0
  20. plumed/_lib/bin/plumed +0 -0
  21. plumed/_lib/bin/plumed-config +9 -0
  22. plumed/_lib/bin/plumed-patch +9 -0
  23. plumed/_lib/include/plumed/adjmat/AdjacencyMatrixBase.h +659 -0
  24. plumed/_lib/include/plumed/adjmat/ContactMatrix.h +59 -0
  25. plumed/_lib/include/plumed/asmjit/arch.h +228 -0
  26. plumed/_lib/include/plumed/asmjit/arm.h +43 -0
  27. plumed/_lib/include/plumed/asmjit/asmjit.h +69 -0
  28. plumed/_lib/include/plumed/asmjit/asmjit_apibegin.h +143 -0
  29. plumed/_lib/include/plumed/asmjit/asmjit_apiend.h +93 -0
  30. plumed/_lib/include/plumed/asmjit/asmjit_build.h +971 -0
  31. plumed/_lib/include/plumed/asmjit/assembler.h +183 -0
  32. plumed/_lib/include/plumed/asmjit/base.h +56 -0
  33. plumed/_lib/include/plumed/asmjit/codebuilder.h +944 -0
  34. plumed/_lib/include/plumed/asmjit/codecompiler.h +767 -0
  35. plumed/_lib/include/plumed/asmjit/codeemitter.h +528 -0
  36. plumed/_lib/include/plumed/asmjit/codeholder.h +777 -0
  37. plumed/_lib/include/plumed/asmjit/constpool.h +286 -0
  38. plumed/_lib/include/plumed/asmjit/cpuinfo.h +402 -0
  39. plumed/_lib/include/plumed/asmjit/func.h +1327 -0
  40. plumed/_lib/include/plumed/asmjit/globals.h +370 -0
  41. plumed/_lib/include/plumed/asmjit/inst.h +137 -0
  42. plumed/_lib/include/plumed/asmjit/logging.h +317 -0
  43. plumed/_lib/include/plumed/asmjit/misc_p.h +103 -0
  44. plumed/_lib/include/plumed/asmjit/moved_string.h +318 -0
  45. plumed/_lib/include/plumed/asmjit/operand.h +1599 -0
  46. plumed/_lib/include/plumed/asmjit/osutils.h +207 -0
  47. plumed/_lib/include/plumed/asmjit/regalloc_p.h +597 -0
  48. plumed/_lib/include/plumed/asmjit/runtime.h +227 -0
  49. plumed/_lib/include/plumed/asmjit/simdtypes.h +1104 -0
  50. plumed/_lib/include/plumed/asmjit/utils.h +1387 -0
  51. plumed/_lib/include/plumed/asmjit/vmem.h +183 -0
  52. plumed/_lib/include/plumed/asmjit/x86.h +45 -0
  53. plumed/_lib/include/plumed/asmjit/x86assembler.h +125 -0
  54. plumed/_lib/include/plumed/asmjit/x86builder.h +117 -0
  55. plumed/_lib/include/plumed/asmjit/x86compiler.h +322 -0
  56. plumed/_lib/include/plumed/asmjit/x86emitter.h +5149 -0
  57. plumed/_lib/include/plumed/asmjit/x86globals.h +535 -0
  58. plumed/_lib/include/plumed/asmjit/x86inst.h +2547 -0
  59. plumed/_lib/include/plumed/asmjit/x86instimpl_p.h +74 -0
  60. plumed/_lib/include/plumed/asmjit/x86internal_p.h +108 -0
  61. plumed/_lib/include/plumed/asmjit/x86logging_p.h +92 -0
  62. plumed/_lib/include/plumed/asmjit/x86misc.h +417 -0
  63. plumed/_lib/include/plumed/asmjit/x86operand.h +1133 -0
  64. plumed/_lib/include/plumed/asmjit/x86regalloc_p.h +734 -0
  65. plumed/_lib/include/plumed/asmjit/zone.h +1157 -0
  66. plumed/_lib/include/plumed/bias/Bias.h +82 -0
  67. plumed/_lib/include/plumed/bias/ReweightBase.h +58 -0
  68. plumed/_lib/include/plumed/blas/blas.h +253 -0
  69. plumed/_lib/include/plumed/blas/def_external.h +61 -0
  70. plumed/_lib/include/plumed/blas/def_internal.h +97 -0
  71. plumed/_lib/include/plumed/blas/real.h +49 -0
  72. plumed/_lib/include/plumed/cltools/CLTool.h +32 -0
  73. plumed/_lib/include/plumed/clusters/ClusteringBase.h +70 -0
  74. plumed/_lib/include/plumed/colvar/Colvar.h +32 -0
  75. plumed/_lib/include/plumed/colvar/ColvarInput.h +68 -0
  76. plumed/_lib/include/plumed/colvar/ColvarShortcut.h +81 -0
  77. plumed/_lib/include/plumed/colvar/CoordinationBase.h +52 -0
  78. plumed/_lib/include/plumed/colvar/MultiColvarTemplate.h +333 -0
  79. plumed/_lib/include/plumed/colvar/PathMSDBase.h +101 -0
  80. plumed/_lib/include/plumed/colvar/RMSDVector.h +78 -0
  81. plumed/_lib/include/plumed/config/Config.h +118 -0
  82. plumed/_lib/include/plumed/config/version.h +9 -0
  83. plumed/_lib/include/plumed/contour/ContourFindingObject.h +87 -0
  84. plumed/_lib/include/plumed/contour/DistanceFromContourBase.h +82 -0
  85. plumed/_lib/include/plumed/contour/FindContour.h +67 -0
  86. plumed/_lib/include/plumed/core/Action.h +540 -0
  87. plumed/_lib/include/plumed/core/ActionAnyorder.h +48 -0
  88. plumed/_lib/include/plumed/core/ActionAtomistic.h +343 -0
  89. plumed/_lib/include/plumed/core/ActionForInterface.h +99 -0
  90. plumed/_lib/include/plumed/core/ActionPilot.h +57 -0
  91. plumed/_lib/include/plumed/core/ActionRegister.h +124 -0
  92. plumed/_lib/include/plumed/core/ActionSet.h +163 -0
  93. plumed/_lib/include/plumed/core/ActionSetup.h +48 -0
  94. plumed/_lib/include/plumed/core/ActionShortcut.h +73 -0
  95. plumed/_lib/include/plumed/core/ActionToGetData.h +59 -0
  96. plumed/_lib/include/plumed/core/ActionToPutData.h +101 -0
  97. plumed/_lib/include/plumed/core/ActionWithArguments.h +140 -0
  98. plumed/_lib/include/plumed/core/ActionWithMatrix.h +87 -0
  99. plumed/_lib/include/plumed/core/ActionWithValue.h +258 -0
  100. plumed/_lib/include/plumed/core/ActionWithVector.h +94 -0
  101. plumed/_lib/include/plumed/core/ActionWithVirtualAtom.h +123 -0
  102. plumed/_lib/include/plumed/core/CLTool.h +177 -0
  103. plumed/_lib/include/plumed/core/CLToolMain.h +102 -0
  104. plumed/_lib/include/plumed/core/CLToolRegister.h +108 -0
  105. plumed/_lib/include/plumed/core/Colvar.h +115 -0
  106. plumed/_lib/include/plumed/core/DataPassingObject.h +94 -0
  107. plumed/_lib/include/plumed/core/DataPassingTools.h +54 -0
  108. plumed/_lib/include/plumed/core/DomainDecomposition.h +120 -0
  109. plumed/_lib/include/plumed/core/ExchangePatterns.h +47 -0
  110. plumed/_lib/include/plumed/core/FlexibleBin.h +63 -0
  111. plumed/_lib/include/plumed/core/GREX.h +61 -0
  112. plumed/_lib/include/plumed/core/GenericMolInfo.h +89 -0
  113. plumed/_lib/include/plumed/core/Group.h +41 -0
  114. plumed/_lib/include/plumed/core/ModuleMap.h +30 -0
  115. plumed/_lib/include/plumed/core/ParallelTaskManager.h +1023 -0
  116. plumed/_lib/include/plumed/core/PbcAction.h +61 -0
  117. plumed/_lib/include/plumed/core/PlumedMain.h +632 -0
  118. plumed/_lib/include/plumed/core/PlumedMainInitializer.h +118 -0
  119. plumed/_lib/include/plumed/core/RegisterBase.h +340 -0
  120. plumed/_lib/include/plumed/core/TargetDist.h +48 -0
  121. plumed/_lib/include/plumed/core/Value.h +547 -0
  122. plumed/_lib/include/plumed/core/WithCmd.h +93 -0
  123. plumed/_lib/include/plumed/dimred/SMACOF.h +55 -0
  124. plumed/_lib/include/plumed/drr/DRR.h +383 -0
  125. plumed/_lib/include/plumed/drr/colvar_UIestimator.h +777 -0
  126. plumed/_lib/include/plumed/fisst/legendre_rule_fast.h +44 -0
  127. plumed/_lib/include/plumed/function/Custom.h +54 -0
  128. plumed/_lib/include/plumed/function/Function.h +85 -0
  129. plumed/_lib/include/plumed/function/FunctionOfMatrix.h +368 -0
  130. plumed/_lib/include/plumed/function/FunctionOfScalar.h +135 -0
  131. plumed/_lib/include/plumed/function/FunctionOfVector.h +296 -0
  132. plumed/_lib/include/plumed/function/FunctionSetup.h +180 -0
  133. plumed/_lib/include/plumed/function/FunctionShortcut.h +130 -0
  134. plumed/_lib/include/plumed/function/FunctionWithSingleArgument.h +165 -0
  135. plumed/_lib/include/plumed/gridtools/ActionWithGrid.h +43 -0
  136. plumed/_lib/include/plumed/gridtools/EvaluateGridFunction.h +99 -0
  137. plumed/_lib/include/plumed/gridtools/FunctionOfGrid.h +295 -0
  138. plumed/_lib/include/plumed/gridtools/GridCoordinatesObject.h +179 -0
  139. plumed/_lib/include/plumed/gridtools/GridSearch.h +135 -0
  140. plumed/_lib/include/plumed/gridtools/Interpolator.h +45 -0
  141. plumed/_lib/include/plumed/gridtools/KDE.h +455 -0
  142. plumed/_lib/include/plumed/gridtools/RDF.h +40 -0
  143. plumed/_lib/include/plumed/gridtools/SumOfKernels.h +219 -0
  144. plumed/_lib/include/plumed/isdb/MetainferenceBase.h +398 -0
  145. plumed/_lib/include/plumed/lapack/def_external.h +207 -0
  146. plumed/_lib/include/plumed/lapack/def_internal.h +388 -0
  147. plumed/_lib/include/plumed/lapack/lapack.h +899 -0
  148. plumed/_lib/include/plumed/lapack/lapack_limits.h +79 -0
  149. plumed/_lib/include/plumed/lapack/real.h +50 -0
  150. plumed/_lib/include/plumed/lepton/CompiledExpression.h +164 -0
  151. plumed/_lib/include/plumed/lepton/CustomFunction.h +143 -0
  152. plumed/_lib/include/plumed/lepton/Exception.h +93 -0
  153. plumed/_lib/include/plumed/lepton/ExpressionProgram.h +137 -0
  154. plumed/_lib/include/plumed/lepton/ExpressionTreeNode.h +145 -0
  155. plumed/_lib/include/plumed/lepton/Lepton.h +85 -0
  156. plumed/_lib/include/plumed/lepton/MSVC_erfc.h +123 -0
  157. plumed/_lib/include/plumed/lepton/Operation.h +1302 -0
  158. plumed/_lib/include/plumed/lepton/ParsedExpression.h +165 -0
  159. plumed/_lib/include/plumed/lepton/Parser.h +111 -0
  160. plumed/_lib/include/plumed/lepton/windowsIncludes.h +73 -0
  161. plumed/_lib/include/plumed/mapping/Path.h +44 -0
  162. plumed/_lib/include/plumed/mapping/PathProjectionCalculator.h +57 -0
  163. plumed/_lib/include/plumed/matrixtools/MatrixOperationBase.h +54 -0
  164. plumed/_lib/include/plumed/matrixtools/MatrixTimesMatrix.h +309 -0
  165. plumed/_lib/include/plumed/matrixtools/MatrixTimesVectorBase.h +365 -0
  166. plumed/_lib/include/plumed/matrixtools/OuterProduct.h +238 -0
  167. plumed/_lib/include/plumed/maze/Core.h +65 -0
  168. plumed/_lib/include/plumed/maze/Loss.h +86 -0
  169. plumed/_lib/include/plumed/maze/Member.h +66 -0
  170. plumed/_lib/include/plumed/maze/Memetic.h +799 -0
  171. plumed/_lib/include/plumed/maze/Optimizer.h +357 -0
  172. plumed/_lib/include/plumed/maze/Random_MT.h +156 -0
  173. plumed/_lib/include/plumed/maze/Tools.h +183 -0
  174. plumed/_lib/include/plumed/metatomic/vesin.h +188 -0
  175. plumed/_lib/include/plumed/molfile/Gromacs.h +2013 -0
  176. plumed/_lib/include/plumed/molfile/endianswap.h +217 -0
  177. plumed/_lib/include/plumed/molfile/fastio.h +683 -0
  178. plumed/_lib/include/plumed/molfile/largefiles.h +78 -0
  179. plumed/_lib/include/plumed/molfile/libmolfile_plugin.h +77 -0
  180. plumed/_lib/include/plumed/molfile/molfile_plugin.h +1034 -0
  181. plumed/_lib/include/plumed/molfile/periodic_table.h +248 -0
  182. plumed/_lib/include/plumed/molfile/readpdb.h +447 -0
  183. plumed/_lib/include/plumed/molfile/vmdplugin.h +236 -0
  184. plumed/_lib/include/plumed/multicolvar/MultiColvarShortcuts.h +45 -0
  185. plumed/_lib/include/plumed/opes/ExpansionCVs.h +79 -0
  186. plumed/_lib/include/plumed/sasa/Sasa.h +32 -0
  187. plumed/_lib/include/plumed/secondarystructure/SecondaryStructureBase.h +372 -0
  188. plumed/_lib/include/plumed/setup/ActionSetup.h +25 -0
  189. plumed/_lib/include/plumed/small_vector/small_vector.h +6114 -0
  190. plumed/_lib/include/plumed/symfunc/CoordinationNumbers.h +41 -0
  191. plumed/_lib/include/plumed/tools/Angle.h +52 -0
  192. plumed/_lib/include/plumed/tools/AtomDistribution.h +138 -0
  193. plumed/_lib/include/plumed/tools/AtomNumber.h +152 -0
  194. plumed/_lib/include/plumed/tools/BiasRepresentation.h +106 -0
  195. plumed/_lib/include/plumed/tools/BitmaskEnum.h +167 -0
  196. plumed/_lib/include/plumed/tools/Brent1DRootSearch.h +159 -0
  197. plumed/_lib/include/plumed/tools/CheckInRange.h +44 -0
  198. plumed/_lib/include/plumed/tools/Citations.h +74 -0
  199. plumed/_lib/include/plumed/tools/ColvarOutput.h +118 -0
  200. plumed/_lib/include/plumed/tools/Communicator.h +316 -0
  201. plumed/_lib/include/plumed/tools/ConjugateGradient.h +80 -0
  202. plumed/_lib/include/plumed/tools/DLLoader.h +79 -0
  203. plumed/_lib/include/plumed/tools/ERMSD.h +73 -0
  204. plumed/_lib/include/plumed/tools/Exception.h +406 -0
  205. plumed/_lib/include/plumed/tools/File.h +28 -0
  206. plumed/_lib/include/plumed/tools/FileBase.h +153 -0
  207. plumed/_lib/include/plumed/tools/FileTools.h +37 -0
  208. plumed/_lib/include/plumed/tools/ForwardDecl.h +54 -0
  209. plumed/_lib/include/plumed/tools/Grid.h +638 -0
  210. plumed/_lib/include/plumed/tools/HistogramBead.h +136 -0
  211. plumed/_lib/include/plumed/tools/IFile.h +117 -0
  212. plumed/_lib/include/plumed/tools/KernelFunctions.h +113 -0
  213. plumed/_lib/include/plumed/tools/Keywords.h +380 -0
  214. plumed/_lib/include/plumed/tools/LatticeReduction.h +66 -0
  215. plumed/_lib/include/plumed/tools/LeptonCall.h +64 -0
  216. plumed/_lib/include/plumed/tools/LinkCells.h +126 -0
  217. plumed/_lib/include/plumed/tools/Log.h +41 -0
  218. plumed/_lib/include/plumed/tools/LoopUnroller.h +163 -0
  219. plumed/_lib/include/plumed/tools/Matrix.h +721 -0
  220. plumed/_lib/include/plumed/tools/MatrixSquareBracketsAccess.h +138 -0
  221. plumed/_lib/include/plumed/tools/MergeVectorTools.h +153 -0
  222. plumed/_lib/include/plumed/tools/Minimise1DBrent.h +244 -0
  223. plumed/_lib/include/plumed/tools/MinimiseBase.h +120 -0
  224. plumed/_lib/include/plumed/tools/MolDataClass.h +51 -0
  225. plumed/_lib/include/plumed/tools/NeighborList.h +112 -0
  226. plumed/_lib/include/plumed/tools/OFile.h +286 -0
  227. plumed/_lib/include/plumed/tools/OpenACC.h +180 -0
  228. plumed/_lib/include/plumed/tools/OpenMP.h +75 -0
  229. plumed/_lib/include/plumed/tools/PDB.h +154 -0
  230. plumed/_lib/include/plumed/tools/Pbc.h +139 -0
  231. plumed/_lib/include/plumed/tools/PlumedHandle.h +105 -0
  232. plumed/_lib/include/plumed/tools/RMSD.h +493 -0
  233. plumed/_lib/include/plumed/tools/Random.h +80 -0
  234. plumed/_lib/include/plumed/tools/RootFindingBase.h +79 -0
  235. plumed/_lib/include/plumed/tools/Stopwatch.h +475 -0
  236. plumed/_lib/include/plumed/tools/Subprocess.h +142 -0
  237. plumed/_lib/include/plumed/tools/SwitchingFunction.h +208 -0
  238. plumed/_lib/include/plumed/tools/Tensor.h +724 -0
  239. plumed/_lib/include/plumed/tools/TokenizedLine.h +123 -0
  240. plumed/_lib/include/plumed/tools/Tools.h +638 -0
  241. plumed/_lib/include/plumed/tools/Torsion.h +55 -0
  242. plumed/_lib/include/plumed/tools/TrajectoryParser.h +118 -0
  243. plumed/_lib/include/plumed/tools/Tree.h +61 -0
  244. plumed/_lib/include/plumed/tools/TypesafePtr.h +463 -0
  245. plumed/_lib/include/plumed/tools/Units.h +167 -0
  246. plumed/_lib/include/plumed/tools/Vector.h +433 -0
  247. plumed/_lib/include/plumed/tools/View.h +296 -0
  248. plumed/_lib/include/plumed/tools/View2D.h +100 -0
  249. plumed/_lib/include/plumed/tools/h36.h +39 -0
  250. plumed/_lib/include/plumed/vatom/ActionWithVirtualAtom.h +32 -0
  251. plumed/_lib/include/plumed/ves/BasisFunctions.h +380 -0
  252. plumed/_lib/include/plumed/ves/CoeffsBase.h +310 -0
  253. plumed/_lib/include/plumed/ves/CoeffsMatrix.h +220 -0
  254. plumed/_lib/include/plumed/ves/CoeffsVector.h +251 -0
  255. plumed/_lib/include/plumed/ves/FermiSwitchingFunction.h +74 -0
  256. plumed/_lib/include/plumed/ves/GridIntegrationWeights.h +50 -0
  257. plumed/_lib/include/plumed/ves/GridLinearInterpolation.h +81 -0
  258. plumed/_lib/include/plumed/ves/GridProjWeights.h +61 -0
  259. plumed/_lib/include/plumed/ves/LinearBasisSetExpansion.h +303 -0
  260. plumed/_lib/include/plumed/ves/Optimizer.h +444 -0
  261. plumed/_lib/include/plumed/ves/TargetDistModifer.h +53 -0
  262. plumed/_lib/include/plumed/ves/TargetDistribution.h +266 -0
  263. plumed/_lib/include/plumed/ves/VesBias.h +545 -0
  264. plumed/_lib/include/plumed/ves/VesTools.h +142 -0
  265. plumed/_lib/include/plumed/ves/WaveletGrid.h +75 -0
  266. plumed/_lib/include/plumed/volumes/ActionVolume.h +268 -0
  267. plumed/_lib/include/plumed/volumes/VolumeShortcut.h +147 -0
  268. plumed/_lib/include/plumed/wrapper/Plumed.h +5025 -0
  269. plumed/_lib/include/plumed/xdrfile/xdrfile.h +663 -0
  270. plumed/_lib/include/plumed/xdrfile/xdrfile_trr.h +89 -0
  271. plumed/_lib/include/plumed/xdrfile/xdrfile_xtc.h +90 -0
  272. plumed/_lib/lib/PythonCVInterface.dylib +0 -0
  273. plumed/_lib/lib/libplumed.dylib +0 -0
  274. plumed/_lib/lib/libplumedKernel.dylib +0 -0
  275. plumed/_lib/lib/libplumedWrapper.a +0 -0
  276. plumed/_lib/lib/pkgconfig/plumed.pc +13 -0
  277. plumed/_lib/lib/pkgconfig/plumedInternals.pc +13 -0
  278. plumed/_lib/lib/pkgconfig/plumedWrapper.pc +13 -0
  279. plumed/_lib/lib/plumed/fortran/plumed.f90 +879 -0
  280. plumed/_lib/lib/plumed/fortran/plumed_f08.f90 +2625 -0
  281. plumed/_lib/lib/plumed/modulefile +69 -0
  282. plumed/_lib/lib/plumed/patches/gromacs-2022.5.config +43 -0
  283. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt +543 -0
  284. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt.preplumed +540 -0
  285. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp +1628 -0
  286. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1590 -0
  287. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h +103 -0
  288. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h.preplumed +99 -0
  289. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp +2527 -0
  290. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2513 -0
  291. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
  292. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
  293. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +408 -0
  294. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +394 -0
  295. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp +2348 -0
  296. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2091 -0
  297. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp +3573 -0
  298. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3495 -0
  299. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1506 -0
  300. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1402 -0
  301. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
  302. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
  303. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp +997 -0
  304. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +906 -0
  305. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp +2780 -0
  306. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2738 -0
  307. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
  308. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
  309. plumed/_lib/lib/plumed/patches/gromacs-2023.5.config +43 -0
  310. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt +549 -0
  311. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt.preplumed +546 -0
  312. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
  313. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
  314. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h +104 -0
  315. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
  316. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp +2624 -0
  317. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2610 -0
  318. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
  319. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
  320. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +409 -0
  321. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +395 -0
  322. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp +2419 -0
  323. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2164 -0
  324. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp +3546 -0
  325. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3468 -0
  326. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
  327. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
  328. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
  329. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
  330. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp +991 -0
  331. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +900 -0
  332. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp +2895 -0
  333. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2849 -0
  334. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
  335. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
  336. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp +886 -0
  337. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +880 -0
  338. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +347 -0
  339. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +345 -0
  340. plumed/_lib/lib/plumed/patches/gromacs-2024.3.config +43 -0
  341. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt +575 -0
  342. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt.preplumed +572 -0
  343. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
  344. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
  345. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h +104 -0
  346. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
  347. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp +2564 -0
  348. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2550 -0
  349. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
  350. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
  351. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h +410 -0
  352. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +396 -0
  353. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp +2435 -0
  354. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp.preplumed +2187 -0
  355. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp +3592 -0
  356. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3514 -0
  357. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
  358. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
  359. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
  360. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
  361. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp +958 -0
  362. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp.preplumed +929 -0
  363. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp +2987 -0
  364. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp.preplumed +2941 -0
  365. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
  366. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
  367. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp +904 -0
  368. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +898 -0
  369. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +353 -0
  370. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +351 -0
  371. plumed/_lib/lib/plumed/patches/gromacs-2025.0.config +39 -0
  372. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake +82 -0
  373. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake.preplumed +82 -0
  374. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp +162 -0
  375. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp.preplumed +154 -0
  376. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp +107 -0
  377. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp.preplumed +99 -0
  378. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h +120 -0
  379. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h.preplumed +111 -0
  380. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp +215 -0
  381. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp.preplumed +197 -0
  382. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h +87 -0
  383. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h.preplumed +86 -0
  384. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp +2971 -0
  385. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp.preplumed +2970 -0
  386. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h +430 -0
  387. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h.preplumed +429 -0
  388. plumed/_lib/lib/plumed/patches/namd-2.12.config +30 -0
  389. plumed/_lib/lib/plumed/patches/namd-2.12.diff +267 -0
  390. plumed/_lib/lib/plumed/patches/namd-2.13.config +30 -0
  391. plumed/_lib/lib/plumed/patches/namd-2.13.diff +267 -0
  392. plumed/_lib/lib/plumed/patches/namd-2.14.config +30 -0
  393. plumed/_lib/lib/plumed/patches/namd-2.14.diff +268 -0
  394. plumed/_lib/lib/plumed/patches/patch.sh +500 -0
  395. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.config +25 -0
  396. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90 +368 -0
  397. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90.preplumed +366 -0
  398. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90 +71 -0
  399. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90.preplumed +24 -0
  400. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90 +62 -0
  401. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  402. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90 +189 -0
  403. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90.preplumed +185 -0
  404. plumed/_lib/lib/plumed/patches/qespresso-6.2.config +26 -0
  405. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90 +422 -0
  406. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90.preplumed +420 -0
  407. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90 +70 -0
  408. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
  409. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90 +62 -0
  410. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  411. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90 +233 -0
  412. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90.preplumed +230 -0
  413. plumed/_lib/lib/plumed/patches/qespresso-7.0.config +28 -0
  414. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile +175 -0
  415. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile.preplumed +171 -0
  416. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90 +486 -0
  417. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90.preplumed +484 -0
  418. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90 +74 -0
  419. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
  420. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90 +64 -0
  421. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  422. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90 +532 -0
  423. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90.preplumed +518 -0
  424. plumed/_lib/lib/plumed/patches/qespresso-7.2.config +28 -0
  425. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile +249 -0
  426. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile.preplumed +244 -0
  427. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90 +532 -0
  428. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90.preplumed +535 -0
  429. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90 +74 -0
  430. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
  431. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90 +64 -0
  432. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  433. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90 +569 -0
  434. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90.preplumed +560 -0
  435. plumed/_lib/lib/plumed/plumed-config +9 -0
  436. plumed/_lib/lib/plumed/plumed-mklib +9 -0
  437. plumed/_lib/lib/plumed/plumed-newcv +9 -0
  438. plumed/_lib/lib/plumed/plumed-partial_tempering +9 -0
  439. plumed/_lib/lib/plumed/plumed-patch +9 -0
  440. plumed/_lib/lib/plumed/plumed-runtime +0 -0
  441. plumed/_lib/lib/plumed/plumed-selector +9 -0
  442. plumed/_lib/lib/plumed/plumed-vim2html +9 -0
  443. plumed/_lib/lib/plumed/scripts/config.sh +126 -0
  444. plumed/_lib/lib/plumed/scripts/mklib.sh +175 -0
  445. plumed/_lib/lib/plumed/scripts/newcv.sh +26 -0
  446. plumed/_lib/lib/plumed/scripts/partial_tempering.sh +319 -0
  447. plumed/_lib/lib/plumed/scripts/patch.sh +4 -0
  448. plumed/_lib/lib/plumed/scripts/selector.sh +234 -0
  449. plumed/_lib/lib/plumed/scripts/vim2html.sh +190 -0
  450. plumed/_lib/lib/plumed/src/colvar/Template.cpp +116 -0
  451. plumed/_lib/lib/plumed/src/config/compile_options.sh +3 -0
  452. plumed/_lib/lib/plumed/src/config/config.txt +181 -0
  453. plumed/_lib/lib/plumed/src/lib/Plumed.cmake +6 -0
  454. plumed/_lib/lib/plumed/src/lib/Plumed.cmake.runtime +5 -0
  455. plumed/_lib/lib/plumed/src/lib/Plumed.cmake.shared +5 -0
  456. plumed/_lib/lib/plumed/src/lib/Plumed.cmake.static +3 -0
  457. plumed/_lib/lib/plumed/src/lib/Plumed.inc +6 -0
  458. plumed/_lib/lib/plumed/src/lib/Plumed.inc.runtime +5 -0
  459. plumed/_lib/lib/plumed/src/lib/Plumed.inc.shared +5 -0
  460. plumed/_lib/lib/plumed/src/lib/Plumed.inc.static +3 -0
  461. plumed/_lib/lib/plumed/vim/scripts.vim +6 -0
  462. plumed/_plumed_core.cpython-311-darwin.so +0 -0
  463. plumed/_plumed_core.cpython-312-darwin.so +0 -0
  464. plumed/_plumed_core.cpython-313-darwin.so +0 -0
  465. plumedCommunications.cpython-311-darwin.so +0 -0
  466. plumedCommunications.cpython-312-darwin.so +0 -0
  467. plumedCommunications.cpython-313-darwin.so +0 -0
  468. plumedCommunications.pyi +431 -0
@@ -0,0 +1,2625 @@
1
+ ! vim:ft=fortran
2
+
3
+
4
+
5
+
6
+ module plumed_f08_module
7
+ use iso_c_binding
8
+ implicit none
9
+
10
+ ! names are private by default
11
+ private
12
+
13
+ ! only these names are public
14
+ public :: plumed
15
+ public :: plumed_create
16
+ public :: plumed_installed
17
+ public :: plumed_error
18
+
19
+ ! this type maps to the struct plumed defined in src/wrapper/Plumed.h
20
+ type, bind(C) :: cplumed
21
+ type(c_ptr) :: ptr
22
+ end type cplumed
23
+
24
+ ! this type maps to the struct plumed_nothrow_handler defined in src/wrapper/Plumed.h
25
+ type, bind(C) :: cplumed_nothrow_handler
26
+ type(c_ptr) :: ptr
27
+ type(c_funptr) :: handler
28
+ end type cplumed_nothrow_handler
29
+
30
+ ! this type maps to the struct plumed_safeptr defined in src/wrapper/Plumed.h
31
+ type, bind(C) :: cplumed_safeptr
32
+ type(c_ptr) :: ptr
33
+ integer(kind=c_size_t) :: nelem
34
+ type(c_ptr) :: shape
35
+ integer(kind=c_size_t) :: flags
36
+ type(c_ptr) :: opt
37
+ end type cplumed_safeptr
38
+
39
+ ! this subroutine provides a typesafe, not throwing interfafe to plumed
40
+ interface
41
+ subroutine plumed_cmd_safe_nothrow(p,key,safeptr,nothrow) bind(C)
42
+ import
43
+ type(cplumed), value :: p
44
+ character(kind=c_char), intent(in) :: key(*)
45
+ type(cplumed_safeptr), value :: safeptr
46
+ type(cplumed_nothrow_handler), value :: nothrow
47
+ end subroutine plumed_cmd_safe_nothrow
48
+ end interface
49
+
50
+ integer(kind=c_size_t), parameter :: flags_ptr = 67108864 ! 0x2000000*2
51
+ integer(kind=c_size_t), parameter :: flags_const_ptr = 100663296 ! 0x2000000*3
52
+ integer(kind=c_size_t), parameter :: flags_nocopy = 268435456 ! 0x10000000
53
+
54
+ ! this type is used to manipulate a plumed instance
55
+ ! since it has a destructor, if contains a logical label to check if it has been initialized
56
+ ! it also contains a number of methods
57
+ ! notice that constructor (plumed_create) is NOT a member
58
+ type plumed
59
+ type(cplumed), private :: handle
60
+ logical, private :: initialized = .false.
61
+ contains
62
+ private
63
+
64
+ generic, public :: cmd => pl_cmd
65
+ procedure :: pl_cmd
66
+
67
+ generic, public :: cmd_val => pl_cmd_val_integer_0_0
68
+ procedure :: pl_cmd_val_integer_0_0
69
+ generic, public :: cmd_val => pl_cmd_val_integer_0_1
70
+ procedure :: pl_cmd_val_integer_0_1
71
+ generic, public :: cmd_val => pl_cmd_val_integer_0_2
72
+ procedure :: pl_cmd_val_integer_0_2
73
+ generic, public :: cmd_val => pl_cmd_val_integer_0_3
74
+ procedure :: pl_cmd_val_integer_0_3
75
+ generic, public :: cmd_val => pl_cmd_val_integer_0_4
76
+ procedure :: pl_cmd_val_integer_0_4
77
+ generic, public :: cmd_val => pl_cmd_val_integer_1_0
78
+ procedure :: pl_cmd_val_integer_1_0
79
+ generic, public :: cmd_val => pl_cmd_val_integer_1_1
80
+ procedure :: pl_cmd_val_integer_1_1
81
+ generic, public :: cmd_val => pl_cmd_val_integer_1_2
82
+ procedure :: pl_cmd_val_integer_1_2
83
+ generic, public :: cmd_val => pl_cmd_val_integer_1_3
84
+ procedure :: pl_cmd_val_integer_1_3
85
+ generic, public :: cmd_val => pl_cmd_val_integer_1_4
86
+ procedure :: pl_cmd_val_integer_1_4
87
+ generic, public :: cmd_val => pl_cmd_val_integer_2_0
88
+ procedure :: pl_cmd_val_integer_2_0
89
+ generic, public :: cmd_val => pl_cmd_val_integer_2_1
90
+ procedure :: pl_cmd_val_integer_2_1
91
+ generic, public :: cmd_val => pl_cmd_val_integer_2_2
92
+ procedure :: pl_cmd_val_integer_2_2
93
+ generic, public :: cmd_val => pl_cmd_val_integer_2_3
94
+ procedure :: pl_cmd_val_integer_2_3
95
+ generic, public :: cmd_val => pl_cmd_val_integer_2_4
96
+ procedure :: pl_cmd_val_integer_2_4
97
+ generic, public :: cmd_val => pl_cmd_val_real_0_0
98
+ procedure :: pl_cmd_val_real_0_0
99
+ generic, public :: cmd_val => pl_cmd_val_real_0_1
100
+ procedure :: pl_cmd_val_real_0_1
101
+ generic, public :: cmd_val => pl_cmd_val_real_0_2
102
+ procedure :: pl_cmd_val_real_0_2
103
+ generic, public :: cmd_val => pl_cmd_val_real_0_3
104
+ procedure :: pl_cmd_val_real_0_3
105
+ generic, public :: cmd_val => pl_cmd_val_real_0_4
106
+ procedure :: pl_cmd_val_real_0_4
107
+ generic, public :: cmd_val => pl_cmd_val_real_1_0
108
+ procedure :: pl_cmd_val_real_1_0
109
+ generic, public :: cmd_val => pl_cmd_val_real_1_1
110
+ procedure :: pl_cmd_val_real_1_1
111
+ generic, public :: cmd_val => pl_cmd_val_real_1_2
112
+ procedure :: pl_cmd_val_real_1_2
113
+ generic, public :: cmd_val => pl_cmd_val_real_1_3
114
+ procedure :: pl_cmd_val_real_1_3
115
+ generic, public :: cmd_val => pl_cmd_val_real_1_4
116
+ procedure :: pl_cmd_val_real_1_4
117
+ generic, public :: cmd_ref => pl_cmd_ref_integer_0_0
118
+ procedure :: pl_cmd_ref_integer_0_0
119
+ generic, public :: cmd_ref => pl_cmd_ref_integer_0_1
120
+ procedure :: pl_cmd_ref_integer_0_1
121
+ generic, public :: cmd_ref => pl_cmd_ref_integer_0_2
122
+ procedure :: pl_cmd_ref_integer_0_2
123
+ generic, public :: cmd_ref => pl_cmd_ref_integer_0_3
124
+ procedure :: pl_cmd_ref_integer_0_3
125
+ generic, public :: cmd_ref => pl_cmd_ref_integer_0_4
126
+ procedure :: pl_cmd_ref_integer_0_4
127
+ generic, public :: cmd_ref => pl_cmd_ref_integer_1_0
128
+ procedure :: pl_cmd_ref_integer_1_0
129
+ generic, public :: cmd_ref => pl_cmd_ref_integer_1_1
130
+ procedure :: pl_cmd_ref_integer_1_1
131
+ generic, public :: cmd_ref => pl_cmd_ref_integer_1_2
132
+ procedure :: pl_cmd_ref_integer_1_2
133
+ generic, public :: cmd_ref => pl_cmd_ref_integer_1_3
134
+ procedure :: pl_cmd_ref_integer_1_3
135
+ generic, public :: cmd_ref => pl_cmd_ref_integer_1_4
136
+ procedure :: pl_cmd_ref_integer_1_4
137
+ generic, public :: cmd_ref => pl_cmd_ref_integer_2_0
138
+ procedure :: pl_cmd_ref_integer_2_0
139
+ generic, public :: cmd_ref => pl_cmd_ref_integer_2_1
140
+ procedure :: pl_cmd_ref_integer_2_1
141
+ generic, public :: cmd_ref => pl_cmd_ref_integer_2_2
142
+ procedure :: pl_cmd_ref_integer_2_2
143
+ generic, public :: cmd_ref => pl_cmd_ref_integer_2_3
144
+ procedure :: pl_cmd_ref_integer_2_3
145
+ generic, public :: cmd_ref => pl_cmd_ref_integer_2_4
146
+ procedure :: pl_cmd_ref_integer_2_4
147
+ generic, public :: cmd_ref => pl_cmd_ref_real_0_0
148
+ procedure :: pl_cmd_ref_real_0_0
149
+ generic, public :: cmd_ref => pl_cmd_ref_real_0_1
150
+ procedure :: pl_cmd_ref_real_0_1
151
+ generic, public :: cmd_ref => pl_cmd_ref_real_0_2
152
+ procedure :: pl_cmd_ref_real_0_2
153
+ generic, public :: cmd_ref => pl_cmd_ref_real_0_3
154
+ procedure :: pl_cmd_ref_real_0_3
155
+ generic, public :: cmd_ref => pl_cmd_ref_real_0_4
156
+ procedure :: pl_cmd_ref_real_0_4
157
+ generic, public :: cmd_ref => pl_cmd_ref_real_1_0
158
+ procedure :: pl_cmd_ref_real_1_0
159
+ generic, public :: cmd_ref => pl_cmd_ref_real_1_1
160
+ procedure :: pl_cmd_ref_real_1_1
161
+ generic, public :: cmd_ref => pl_cmd_ref_real_1_2
162
+ procedure :: pl_cmd_ref_real_1_2
163
+ generic, public :: cmd_ref => pl_cmd_ref_real_1_3
164
+ procedure :: pl_cmd_ref_real_1_3
165
+ generic, public :: cmd_ref => pl_cmd_ref_real_1_4
166
+ procedure :: pl_cmd_ref_real_1_4
167
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_0_0
168
+ procedure :: pl_cmd_ptr_integer_0_0
169
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_0_1
170
+ procedure :: pl_cmd_ptr_integer_0_1
171
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_0_2
172
+ procedure :: pl_cmd_ptr_integer_0_2
173
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_0_3
174
+ procedure :: pl_cmd_ptr_integer_0_3
175
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_0_4
176
+ procedure :: pl_cmd_ptr_integer_0_4
177
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_1_0
178
+ procedure :: pl_cmd_ptr_integer_1_0
179
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_1_1
180
+ procedure :: pl_cmd_ptr_integer_1_1
181
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_1_2
182
+ procedure :: pl_cmd_ptr_integer_1_2
183
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_1_3
184
+ procedure :: pl_cmd_ptr_integer_1_3
185
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_1_4
186
+ procedure :: pl_cmd_ptr_integer_1_4
187
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_2_0
188
+ procedure :: pl_cmd_ptr_integer_2_0
189
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_2_1
190
+ procedure :: pl_cmd_ptr_integer_2_1
191
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_2_2
192
+ procedure :: pl_cmd_ptr_integer_2_2
193
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_2_3
194
+ procedure :: pl_cmd_ptr_integer_2_3
195
+ generic, public :: cmd_ptr => pl_cmd_ptr_integer_2_4
196
+ procedure :: pl_cmd_ptr_integer_2_4
197
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_0_0
198
+ procedure :: pl_cmd_ptr_real_0_0
199
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_0_1
200
+ procedure :: pl_cmd_ptr_real_0_1
201
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_0_2
202
+ procedure :: pl_cmd_ptr_real_0_2
203
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_0_3
204
+ procedure :: pl_cmd_ptr_real_0_3
205
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_0_4
206
+ procedure :: pl_cmd_ptr_real_0_4
207
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_1_0
208
+ procedure :: pl_cmd_ptr_real_1_0
209
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_1_1
210
+ procedure :: pl_cmd_ptr_real_1_1
211
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_1_2
212
+ procedure :: pl_cmd_ptr_real_1_2
213
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_1_3
214
+ procedure :: pl_cmd_ptr_real_1_3
215
+ generic, public :: cmd_ptr => pl_cmd_ptr_real_1_4
216
+ procedure :: pl_cmd_ptr_real_1_4
217
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_0_0
218
+ procedure :: pl_cmd_const_ptr_integer_0_0
219
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_0_1
220
+ procedure :: pl_cmd_const_ptr_integer_0_1
221
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_0_2
222
+ procedure :: pl_cmd_const_ptr_integer_0_2
223
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_0_3
224
+ procedure :: pl_cmd_const_ptr_integer_0_3
225
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_0_4
226
+ procedure :: pl_cmd_const_ptr_integer_0_4
227
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_1_0
228
+ procedure :: pl_cmd_const_ptr_integer_1_0
229
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_1_1
230
+ procedure :: pl_cmd_const_ptr_integer_1_1
231
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_1_2
232
+ procedure :: pl_cmd_const_ptr_integer_1_2
233
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_1_3
234
+ procedure :: pl_cmd_const_ptr_integer_1_3
235
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_1_4
236
+ procedure :: pl_cmd_const_ptr_integer_1_4
237
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_2_0
238
+ procedure :: pl_cmd_const_ptr_integer_2_0
239
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_2_1
240
+ procedure :: pl_cmd_const_ptr_integer_2_1
241
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_2_2
242
+ procedure :: pl_cmd_const_ptr_integer_2_2
243
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_2_3
244
+ procedure :: pl_cmd_const_ptr_integer_2_3
245
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_integer_2_4
246
+ procedure :: pl_cmd_const_ptr_integer_2_4
247
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_0_0
248
+ procedure :: pl_cmd_const_ptr_real_0_0
249
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_0_1
250
+ procedure :: pl_cmd_const_ptr_real_0_1
251
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_0_2
252
+ procedure :: pl_cmd_const_ptr_real_0_2
253
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_0_3
254
+ procedure :: pl_cmd_const_ptr_real_0_3
255
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_0_4
256
+ procedure :: pl_cmd_const_ptr_real_0_4
257
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_1_0
258
+ procedure :: pl_cmd_const_ptr_real_1_0
259
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_1_1
260
+ procedure :: pl_cmd_const_ptr_real_1_1
261
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_1_2
262
+ procedure :: pl_cmd_const_ptr_real_1_2
263
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_1_3
264
+ procedure :: pl_cmd_const_ptr_real_1_3
265
+ generic, public :: cmd_const_ptr => pl_cmd_const_ptr_real_1_4
266
+ procedure :: pl_cmd_const_ptr_real_1_4
267
+ generic, public :: cmd_val => pl_cmd_val_char
268
+ procedure :: pl_cmd_val_char
269
+ generic, public :: cmd_ptr => pl_cmd_ptr_c
270
+ procedure :: pl_cmd_ptr_c
271
+ generic, public :: cmd_const_ptr => pl_cmd_ptr_c
272
+ procedure :: pl_cmd_const_ptr_c
273
+
274
+ procedure, public :: finalize => pl_finalize
275
+ procedure, public :: incref => pl_incref
276
+ procedure, public :: decref => pl_decref
277
+ generic, public :: assignment(=) => pl_assign
278
+ final :: pl_destructor
279
+ procedure, public :: valid => pl_valid
280
+ procedure, public :: use_count => pl_use_count
281
+ procedure :: pl_assign
282
+ end type plumed
283
+
284
+ ! this type holds the information associated to a thrown exception
285
+ type :: plumed_error
286
+ integer :: code=0
287
+ character(len = :), allocatable :: what
288
+ ! nested error, if present
289
+ type(plumed_error), allocatable :: nested
290
+ contains
291
+ private
292
+ generic, public :: assignment(=) => pl_error_assign
293
+ procedure :: pl_error_assign
294
+ end type plumed_error
295
+
296
+ ! now there are interfaces to some of the classic C functions, only used internally
297
+
298
+ interface
299
+ function cplumed_create() bind(C,name="plumed_create")
300
+ import
301
+ type(cplumed) :: cplumed_create
302
+ end function cplumed_create
303
+ end interface
304
+
305
+ interface
306
+ function cplumed_create_dlopen(path) bind(C,name="plumed_create_dlopen")
307
+ import
308
+ character(kind=c_char), intent(in) :: path(*)
309
+ type(cplumed) :: cplumed_create_dlopen
310
+ end function cplumed_create_dlopen
311
+ end interface
312
+
313
+ interface
314
+ function cplumed_create_reference(p) bind(C,name="plumed_create_reference")
315
+ import
316
+ type(cplumed), value :: p
317
+ type(cplumed) :: cplumed_create_reference
318
+ end function cplumed_create_reference
319
+ end interface
320
+
321
+ interface
322
+ subroutine cplumed_finalize(p) bind(C,name="plumed_finalize")
323
+ import
324
+ type(cplumed), value :: p
325
+ end subroutine cplumed_finalize
326
+ end interface
327
+
328
+ interface
329
+ function cplumed_installed() bind(C,name="plumed_installed")
330
+ import
331
+ integer(kind=c_int) :: cplumed_installed
332
+ end function cplumed_installed
333
+ end interface
334
+
335
+ interface
336
+ function cplumed_valid(p) bind(C,name="plumed_valid")
337
+ import
338
+ type(cplumed), value :: p
339
+ integer(kind=c_int) :: cplumed_valid
340
+ end function cplumed_valid
341
+ end interface
342
+
343
+ interface
344
+ function cplumed_use_count(p) bind(C,name="plumed_use_count")
345
+ import
346
+ type(cplumed), value :: p
347
+ integer(kind=c_int) :: cplumed_use_count
348
+ end function cplumed_use_count
349
+ end interface
350
+
351
+ ! here the interfaces to C functions to construct the plumed_safeptr object
352
+ interface
353
+ function plumed_f_safeptr_ptr(val,nelem,pass_shape,flags,opt) bind(C)
354
+ import
355
+ type(c_ptr), value :: val
356
+ integer(kind=c_size_t), value :: nelem
357
+ integer(kind=c_size_t) :: pass_shape(*)
358
+ integer(kind=c_size_t), value :: flags
359
+ type(c_ptr), value :: opt
360
+ type(cplumed_safeptr) :: plumed_f_safeptr_ptr
361
+ end function plumed_f_safeptr_ptr
362
+ end interface
363
+
364
+ interface
365
+ function plumed_f_safeptr_char(val,nelem,pass_shape,flags,opt) bind(C)
366
+ import
367
+ type(c_ptr), value :: val
368
+ integer(kind=c_size_t), value :: nelem
369
+ integer(kind=c_size_t) :: pass_shape(*)
370
+ integer(kind=c_size_t), value :: flags
371
+ type(c_ptr), value :: opt
372
+ type(cplumed_safeptr) :: plumed_f_safeptr_char
373
+ end function plumed_f_safeptr_char
374
+ end interface
375
+
376
+ interface
377
+ function plumed_f_safeptr_int(val,nelem,pass_shape,flags,opt) bind(C)
378
+ import
379
+ type(c_ptr), value :: val
380
+ integer(kind=c_size_t), value :: nelem
381
+ integer(kind=c_size_t) :: pass_shape(*)
382
+ integer(kind=c_size_t), value :: flags
383
+ type(c_ptr), value :: opt
384
+ type(cplumed_safeptr) :: plumed_f_safeptr_int
385
+ end function plumed_f_safeptr_int
386
+ end interface
387
+ interface
388
+ function plumed_f_safeptr_short(val,nelem,pass_shape,flags,opt) bind(C)
389
+ import
390
+ type(c_ptr), value :: val
391
+ integer(kind=c_size_t), value :: nelem
392
+ integer(kind=c_size_t) :: pass_shape(*)
393
+ integer(kind=c_size_t), value :: flags
394
+ type(c_ptr), value :: opt
395
+ type(cplumed_safeptr) :: plumed_f_safeptr_short
396
+ end function plumed_f_safeptr_short
397
+ end interface
398
+ interface
399
+ function plumed_f_safeptr_long(val,nelem,pass_shape,flags,opt) bind(C)
400
+ import
401
+ type(c_ptr), value :: val
402
+ integer(kind=c_size_t), value :: nelem
403
+ integer(kind=c_size_t) :: pass_shape(*)
404
+ integer(kind=c_size_t), value :: flags
405
+ type(c_ptr), value :: opt
406
+ type(cplumed_safeptr) :: plumed_f_safeptr_long
407
+ end function plumed_f_safeptr_long
408
+ end interface
409
+ interface
410
+ function plumed_f_safeptr_float(val,nelem,pass_shape,flags,opt) bind(C)
411
+ import
412
+ type(c_ptr), value :: val
413
+ integer(kind=c_size_t), value :: nelem
414
+ integer(kind=c_size_t) :: pass_shape(*)
415
+ integer(kind=c_size_t), value :: flags
416
+ type(c_ptr), value :: opt
417
+ type(cplumed_safeptr) :: plumed_f_safeptr_float
418
+ end function plumed_f_safeptr_float
419
+ end interface
420
+ interface
421
+ function plumed_f_safeptr_double(val,nelem,pass_shape,flags,opt) bind(C)
422
+ import
423
+ type(c_ptr), value :: val
424
+ integer(kind=c_size_t), value :: nelem
425
+ integer(kind=c_size_t) :: pass_shape(*)
426
+ integer(kind=c_size_t), value :: flags
427
+ type(c_ptr), value :: opt
428
+ type(cplumed_safeptr) :: plumed_f_safeptr_double
429
+ end function plumed_f_safeptr_double
430
+ end interface
431
+
432
+ contains
433
+
434
+ ! this is a callback function.
435
+ ! notice that it ends up in global namespace (no protection for being a module function!)
436
+ ! be careful with name thus
437
+ subroutine plumed_f_f08_eh(error_ptr,code,what_ptr,opt_ptr) bind(C)
438
+ type(c_ptr), value :: error_ptr
439
+ integer(kind=c_int), value :: code
440
+ type(c_ptr), value :: what_ptr
441
+ type(c_ptr), value :: opt_ptr
442
+ type(plumed_error), pointer :: error
443
+ character(len=1, kind=C_CHAR), pointer :: p_chars(:)
444
+ type(c_ptr), pointer :: opt(:)
445
+ character(len=1, kind=C_CHAR), pointer :: opt_key
446
+ type(c_ptr), pointer :: error_nested
447
+ integer :: i,j
448
+ call c_f_pointer(error_ptr,error)
449
+ error%code=code
450
+ if (.not. C_associated(what_ptr)) then
451
+ error%what=""
452
+ else
453
+ call C_F_pointer(what_ptr, p_chars, [huge(0)])
454
+ do i = 1, huge(0)
455
+ if (p_chars(i) == C_NULL_CHAR) exit
456
+ enddo
457
+ allocate(character(i-1) :: error%what)
458
+ do j = 1,i-1
459
+ error%what(j:j)=p_chars(j)
460
+ enddo
461
+ endif
462
+ if (C_associated(opt_ptr)) then
463
+ call C_F_pointer(opt_ptr,opt, [huge(0)])
464
+ do i = 1, huge(0),2
465
+ if (.not. c_associated(opt(i))) exit
466
+ if (c_associated(opt(i+1))) then
467
+ call C_F_pointer(opt(i),opt_key)
468
+ if (opt_key == "n") then
469
+ call C_F_pointer(opt(i+1),error_nested)
470
+ allocate(error%nested)
471
+ error_nested=c_loc(error%nested)
472
+ exit ! make sure only the first "n" pointer is used
473
+ endif
474
+ endif
475
+ enddo
476
+ endif
477
+ end subroutine plumed_f_f08_eh
478
+
479
+ ! we then define all the functions needed for overloading
480
+
481
+ subroutine plumed_f_cmd_ptr(p,key,val,const,nocopy,error)
482
+ type(cplumed), intent(in) :: p
483
+ character(kind=c_char,len=*), intent(in) :: key
484
+ type(c_ptr), intent(in) :: val
485
+ logical, intent(in) :: const
486
+ logical, intent(in) :: nocopy
487
+ type(plumed_error), optional, target, intent(out) :: error
488
+ integer(kind=c_size_t) :: pass_shape(1)
489
+ integer(kind=c_size_t) :: flags
490
+ type(cplumed_nothrow_handler) :: nothrow
491
+ integer(kind=c_size_t) :: nelem
492
+ pass_shape=[0]
493
+ nelem=0
494
+ flags=flags_ptr
495
+ if (const) flags=flags_const_ptr
496
+ if (nocopy) flags=flags+flags_nocopy
497
+ if(present(error)) then
498
+ nothrow%ptr = c_loc(error)
499
+ nothrow%handler = c_funloc(plumed_f_f08_eh)
500
+ else
501
+ nothrow%ptr = c_null_ptr
502
+ nothrow%handler=c_null_funptr
503
+ endif
504
+ call plumed_cmd_safe_nothrow(p,key, &
505
+ plumed_f_safeptr_ptr(val,nelem,pass_shape,flags,c_null_ptr),nothrow)
506
+ end subroutine plumed_f_cmd_ptr
507
+
508
+ subroutine plumed_f_cmd_char(p,key, val, const, nocopy, error)
509
+ type(cplumed), intent(in) :: p
510
+ character(kind=c_char,len=*), intent(in) :: key
511
+ character(kind=c_char,len=*), target, intent(in) :: val
512
+ logical, intent(in) :: const
513
+ logical, intent(in) :: nocopy
514
+ type(plumed_error), optional, target, intent(out) :: error
515
+ integer(kind=c_size_t) :: pass_shape(2)
516
+ integer(kind=c_size_t) :: flags
517
+ type(cplumed_nothrow_handler) :: nothrow
518
+ integer(kind=c_size_t) :: nelem
519
+ pass_shape=[len(val) ,0]
520
+ nelem=0
521
+ flags=flags_ptr
522
+ if (const) flags=flags_const_ptr
523
+ if (nocopy) flags=flags + flags_nocopy
524
+ if(present(error)) then
525
+ nothrow%ptr=c_loc(error)
526
+ nothrow%handler = c_funloc(plumed_f_f08_eh)
527
+ else
528
+ nothrow%ptr = c_null_ptr
529
+ nothrow%handler=c_null_funptr
530
+ endif
531
+ call plumed_cmd_safe_nothrow(p,key, &
532
+ plumed_f_safeptr_char(c_loc(val),nelem,pass_shape,flags,c_null_ptr),nothrow)
533
+ end subroutine plumed_f_cmd_char
534
+
535
+ subroutine plumed_f_cmd_integer_0(p, key, valptr, valshape, const, nocopy, error)
536
+ type(cplumed), intent(in) :: p
537
+ character(kind=c_char,len=*), intent(in) :: key
538
+ type(c_ptr), intent(in) :: valptr
539
+ integer, intent(in) :: valshape(:)
540
+ logical, intent(in) :: const
541
+ logical, intent(in) :: nocopy
542
+ type(plumed_error), optional, target, intent(out) :: error
543
+
544
+ integer(kind=c_size_t) :: flags
545
+ type(cplumed_nothrow_handler) :: nothrow
546
+ integer(kind=c_size_t) :: nelem
547
+ integer(kind=c_size_t) :: pass_shape(max(size(valshape) + 1, 2))
548
+
549
+ if (size(valshape) == 0) then
550
+ pass_shape(:) = [1, 0]
551
+ else
552
+ pass_shape(:) = [valshape(size(valshape):1:-1), 0]
553
+ endif
554
+ nelem=0
555
+ flags = flags_ptr
556
+ if (const) flags = flags_const_ptr
557
+ if(nocopy) flags = flags + flags_nocopy
558
+ if(present(error)) then
559
+ nothrow%ptr = c_loc(error)
560
+ nothrow%handler = c_funloc(plumed_f_f08_eh)
561
+ else
562
+ nothrow%ptr = c_null_ptr
563
+ nothrow%handler=c_null_funptr
564
+ endif
565
+ call plumed_cmd_safe_nothrow(p, key, &
566
+ plumed_f_safeptr_int(valptr, nelem, pass_shape, flags, c_null_ptr), nothrow)
567
+
568
+ end subroutine plumed_f_cmd_integer_0
569
+ subroutine plumed_f_cmd_integer_1(p, key, valptr, valshape, const, nocopy, error)
570
+ type(cplumed), intent(in) :: p
571
+ character(kind=c_char,len=*), intent(in) :: key
572
+ type(c_ptr), intent(in) :: valptr
573
+ integer, intent(in) :: valshape(:)
574
+ logical, intent(in) :: const
575
+ logical, intent(in) :: nocopy
576
+ type(plumed_error), optional, target, intent(out) :: error
577
+
578
+ integer(kind=c_size_t) :: flags
579
+ type(cplumed_nothrow_handler) :: nothrow
580
+ integer(kind=c_size_t) :: nelem
581
+ integer(kind=c_size_t) :: pass_shape(max(size(valshape) + 1, 2))
582
+
583
+ if (size(valshape) == 0) then
584
+ pass_shape(:) = [1, 0]
585
+ else
586
+ pass_shape(:) = [valshape(size(valshape):1:-1), 0]
587
+ endif
588
+ nelem=0
589
+ flags = flags_ptr
590
+ if (const) flags = flags_const_ptr
591
+ if(nocopy) flags = flags + flags_nocopy
592
+ if(present(error)) then
593
+ nothrow%ptr = c_loc(error)
594
+ nothrow%handler = c_funloc(plumed_f_f08_eh)
595
+ else
596
+ nothrow%ptr = c_null_ptr
597
+ nothrow%handler=c_null_funptr
598
+ endif
599
+ call plumed_cmd_safe_nothrow(p, key, &
600
+ plumed_f_safeptr_short(valptr, nelem, pass_shape, flags, c_null_ptr), nothrow)
601
+
602
+ end subroutine plumed_f_cmd_integer_1
603
+ subroutine plumed_f_cmd_integer_2(p, key, valptr, valshape, const, nocopy, error)
604
+ type(cplumed), intent(in) :: p
605
+ character(kind=c_char,len=*), intent(in) :: key
606
+ type(c_ptr), intent(in) :: valptr
607
+ integer, intent(in) :: valshape(:)
608
+ logical, intent(in) :: const
609
+ logical, intent(in) :: nocopy
610
+ type(plumed_error), optional, target, intent(out) :: error
611
+
612
+ integer(kind=c_size_t) :: flags
613
+ type(cplumed_nothrow_handler) :: nothrow
614
+ integer(kind=c_size_t) :: nelem
615
+ integer(kind=c_size_t) :: pass_shape(max(size(valshape) + 1, 2))
616
+
617
+ if (size(valshape) == 0) then
618
+ pass_shape(:) = [1, 0]
619
+ else
620
+ pass_shape(:) = [valshape(size(valshape):1:-1), 0]
621
+ endif
622
+ nelem=0
623
+ flags = flags_ptr
624
+ if (const) flags = flags_const_ptr
625
+ if(nocopy) flags = flags + flags_nocopy
626
+ if(present(error)) then
627
+ nothrow%ptr = c_loc(error)
628
+ nothrow%handler = c_funloc(plumed_f_f08_eh)
629
+ else
630
+ nothrow%ptr = c_null_ptr
631
+ nothrow%handler=c_null_funptr
632
+ endif
633
+ call plumed_cmd_safe_nothrow(p, key, &
634
+ plumed_f_safeptr_long(valptr, nelem, pass_shape, flags, c_null_ptr), nothrow)
635
+
636
+ end subroutine plumed_f_cmd_integer_2
637
+ subroutine plumed_f_cmd_real_0(p, key, valptr, valshape, const, nocopy, error)
638
+ type(cplumed), intent(in) :: p
639
+ character(kind=c_char,len=*), intent(in) :: key
640
+ type(c_ptr), intent(in) :: valptr
641
+ integer, intent(in) :: valshape(:)
642
+ logical, intent(in) :: const
643
+ logical, intent(in) :: nocopy
644
+ type(plumed_error), optional, target, intent(out) :: error
645
+
646
+ integer(kind=c_size_t) :: flags
647
+ type(cplumed_nothrow_handler) :: nothrow
648
+ integer(kind=c_size_t) :: nelem
649
+ integer(kind=c_size_t) :: pass_shape(max(size(valshape) + 1, 2))
650
+
651
+ if (size(valshape) == 0) then
652
+ pass_shape(:) = [1, 0]
653
+ else
654
+ pass_shape(:) = [valshape(size(valshape):1:-1), 0]
655
+ endif
656
+ nelem=0
657
+ flags = flags_ptr
658
+ if (const) flags = flags_const_ptr
659
+ if(nocopy) flags = flags + flags_nocopy
660
+ if(present(error)) then
661
+ nothrow%ptr = c_loc(error)
662
+ nothrow%handler = c_funloc(plumed_f_f08_eh)
663
+ else
664
+ nothrow%ptr = c_null_ptr
665
+ nothrow%handler=c_null_funptr
666
+ endif
667
+ call plumed_cmd_safe_nothrow(p, key, &
668
+ plumed_f_safeptr_float(valptr, nelem, pass_shape, flags, c_null_ptr), nothrow)
669
+
670
+ end subroutine plumed_f_cmd_real_0
671
+ subroutine plumed_f_cmd_real_1(p, key, valptr, valshape, const, nocopy, error)
672
+ type(cplumed), intent(in) :: p
673
+ character(kind=c_char,len=*), intent(in) :: key
674
+ type(c_ptr), intent(in) :: valptr
675
+ integer, intent(in) :: valshape(:)
676
+ logical, intent(in) :: const
677
+ logical, intent(in) :: nocopy
678
+ type(plumed_error), optional, target, intent(out) :: error
679
+
680
+ integer(kind=c_size_t) :: flags
681
+ type(cplumed_nothrow_handler) :: nothrow
682
+ integer(kind=c_size_t) :: nelem
683
+ integer(kind=c_size_t) :: pass_shape(max(size(valshape) + 1, 2))
684
+
685
+ if (size(valshape) == 0) then
686
+ pass_shape(:) = [1, 0]
687
+ else
688
+ pass_shape(:) = [valshape(size(valshape):1:-1), 0]
689
+ endif
690
+ nelem=0
691
+ flags = flags_ptr
692
+ if (const) flags = flags_const_ptr
693
+ if(nocopy) flags = flags + flags_nocopy
694
+ if(present(error)) then
695
+ nothrow%ptr = c_loc(error)
696
+ nothrow%handler = c_funloc(plumed_f_f08_eh)
697
+ else
698
+ nothrow%ptr = c_null_ptr
699
+ nothrow%handler=c_null_funptr
700
+ endif
701
+ call plumed_cmd_safe_nothrow(p, key, &
702
+ plumed_f_safeptr_double(valptr, nelem, pass_shape, flags, c_null_ptr), nothrow)
703
+
704
+ end subroutine plumed_f_cmd_real_1
705
+
706
+ ! this is a soft wrapper to a C function
707
+ function plumed_installed() result(res)
708
+ logical :: res
709
+ res=cplumed_installed()>0
710
+ end function plumed_installed
711
+
712
+ ! this is the constructor
713
+ impure elemental subroutine plumed_create(this,kernel)
714
+ type(plumed), intent(out) :: this
715
+ character(len=*), intent(in), optional :: kernel
716
+ if(present(kernel)) then
717
+ this%handle=cplumed_create_dlopen(kernel // c_null_char)
718
+ else
719
+ this%handle=cplumed_create()
720
+ endif
721
+ this%initialized=.true.
722
+ end subroutine plumed_create
723
+
724
+ ! then we define all member functions
725
+
726
+ impure elemental subroutine pl_finalize(this)
727
+ class(plumed), intent(inout) :: this
728
+ if(this%initialized) then
729
+ call cplumed_finalize(this%handle)
730
+ this%initialized=.false.
731
+ endif
732
+ end subroutine pl_finalize
733
+
734
+ impure elemental subroutine pl_incref(this)
735
+ class(plumed), intent(inout) :: this
736
+ type(cplumed) :: that
737
+ if(.not.this%initialized) then
738
+ call plumed_create(this)
739
+ endif
740
+ that=cplumed_create_reference(this%handle)
741
+ end subroutine pl_incref
742
+
743
+ impure elemental subroutine pl_decref(this,to)
744
+ class(plumed), intent(inout) :: this
745
+ integer, optional, intent(in) :: to
746
+ if(.not.this%initialized) then
747
+ call plumed_create(this)
748
+ endif
749
+ if(present(to)) then
750
+ do while(this%use_count()>to)
751
+ call cplumed_finalize(this%handle)
752
+ end do
753
+ else
754
+ call cplumed_finalize(this%handle)
755
+ endif
756
+ end subroutine pl_decref
757
+
758
+ ! "impure elemental" needed for the destructor to work on arrays
759
+ impure elemental subroutine pl_destructor(this)
760
+ type(plumed), intent(inout) :: this
761
+ call this%finalize()
762
+ end subroutine pl_destructor
763
+
764
+ impure elemental function pl_valid(this) result(valid)
765
+ class(plumed), intent(inout) :: this
766
+ logical :: valid
767
+ integer(c_int) :: i
768
+ if(.not.this%initialized) then
769
+ call plumed_create(this)
770
+ endif
771
+ valid=cplumed_valid(this%handle)>0
772
+ end function pl_valid
773
+
774
+ impure elemental function pl_use_count(this) result(use_count)
775
+ class(plumed), intent(inout) :: this
776
+ integer(c_int) :: use_count
777
+ if(.not.this%initialized) then
778
+ call plumed_create(this)
779
+ endif
780
+ use_count=cplumed_use_count(this%handle)
781
+ end function pl_use_count
782
+
783
+ impure elemental subroutine pl_assign(this,that)
784
+ class(plumed),intent(out) :: this
785
+ class(plumed),intent(in) :: that
786
+ if(that%initialized) then
787
+ this%handle=cplumed_create_reference(that%handle)
788
+ this%initialized=.true.
789
+ endif
790
+ end subroutine pl_assign
791
+
792
+ impure elemental subroutine pl_cmd(this,key,error)
793
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
794
+ character(kind=c_char,len=*), intent(in) :: key
795
+ type(plumed_error), optional, intent(out) :: error
796
+ if(.not.this%initialized) then
797
+ call plumed_create(this)
798
+ endif
799
+ call plumed_f_cmd_ptr(this%handle, key // c_null_char, c_null_ptr, const=.false.,&
800
+ & nocopy=.false., error=error)
801
+ end subroutine pl_cmd
802
+
803
+ subroutine pl_cmd_val_char(this,key,val,error)
804
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
805
+ character(kind=c_char,len=*), intent(in) :: key
806
+ character(kind=c_char,len=*), intent(in) :: val
807
+ type(plumed_error), optional, intent(out) :: error
808
+ if(.not.this%initialized) then
809
+ call plumed_create(this)
810
+ endif
811
+ call plumed_f_cmd_char(this%handle,key // c_null_char,val // c_null_char, &
812
+ & const=.true., nocopy=.true., error=error)
813
+ end subroutine pl_cmd_val_char
814
+
815
+ subroutine pl_cmd_ptr_c(this,key,val,error)
816
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
817
+ character(kind=c_char,len=*), intent(in) :: key
818
+ type(c_ptr), value :: val
819
+ type(plumed_error), optional, intent(out) :: error
820
+ if(.not.this%initialized) then
821
+ call plumed_create(this)
822
+ endif
823
+ call plumed_f_cmd_ptr(this%handle,key // c_null_char, val, const=.false., nocopy=.false.,&
824
+ & error=error)
825
+ end subroutine pl_cmd_ptr_c
826
+
827
+ subroutine pl_cmd_const_ptr_c(this,key,val,error)
828
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
829
+ character(kind=c_char,len=*), intent(in) :: key
830
+ type(c_ptr), value :: val
831
+ type(plumed_error), optional, intent(out) :: error
832
+ if(.not.this%initialized) then
833
+ call plumed_create(this)
834
+ endif
835
+ call plumed_f_cmd_ptr(this%handle,key // c_null_char,val, const=.true., nocopy=.false.,&
836
+ & error=error)
837
+ end subroutine pl_cmd_const_ptr_c
838
+
839
+
840
+ subroutine pl_cmd_val_integer_0_0(this,key,val,error)
841
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
842
+ character(kind=c_char,len=*), intent(in) :: key
843
+ integer(KIND=c_int), target, intent(in) :: val
844
+ type(plumed_error), optional, intent(out) :: error
845
+ integer :: valshape(0)
846
+ if(.not.this%initialized) then
847
+ call plumed_create(this)
848
+ endif
849
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
850
+ & const=.true., nocopy=.true., error=error)
851
+ end subroutine pl_cmd_val_integer_0_0
852
+
853
+ subroutine pl_cmd_ref_integer_0_0(this,key,val,error)
854
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
855
+ character(kind=c_char,len=*), intent(in) :: key
856
+ integer(KIND=c_int), target, intent(inout) :: val
857
+ type(plumed_error), optional, intent(out) :: error
858
+ integer :: valshape(0)
859
+ if(.not.this%initialized) then
860
+ call plumed_create(this)
861
+ endif
862
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
863
+ & const=.false., nocopy=.true., error=error)
864
+ end subroutine pl_cmd_ref_integer_0_0
865
+
866
+ subroutine pl_cmd_ptr_integer_0_0(this,key,val,error)
867
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
868
+ character(kind=c_char,len=*), intent(in) :: key
869
+ integer(KIND=c_int), pointer, intent(in) :: val
870
+ type(plumed_error), optional, intent(out) :: error
871
+ integer :: valshape(0)
872
+ if(.not.this%initialized) then
873
+ call plumed_create(this)
874
+ endif
875
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
876
+ & const=.false., nocopy=.false., error=error)
877
+ end subroutine pl_cmd_ptr_integer_0_0
878
+
879
+ subroutine pl_cmd_const_ptr_integer_0_0(this,key,val,error)
880
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
881
+ character(kind=c_char,len=*), intent(in) :: key
882
+ integer(KIND=c_int), pointer, intent(in) :: val
883
+ type(plumed_error), optional, intent(out) :: error
884
+ integer :: valshape(0)
885
+ if(.not.this%initialized) then
886
+ call plumed_create(this)
887
+ endif
888
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
889
+ & const=.true., nocopy=.false., error=error)
890
+ end subroutine pl_cmd_const_ptr_integer_0_0
891
+
892
+
893
+ subroutine pl_cmd_val_integer_0_1(this,key,val,error)
894
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
895
+ character(kind=c_char,len=*), intent(in) :: key
896
+ integer(KIND=c_int), contiguous, target, intent(in) :: val(:)
897
+ type(plumed_error), optional, intent(out) :: error
898
+ integer :: valshape(1)
899
+ if(.not.this%initialized) then
900
+ call plumed_create(this)
901
+ endif
902
+ valshape = shape(val)
903
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
904
+ & const=.true., nocopy=.true., error=error)
905
+ end subroutine pl_cmd_val_integer_0_1
906
+
907
+ subroutine pl_cmd_ref_integer_0_1(this,key,val,error)
908
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
909
+ character(kind=c_char,len=*), intent(in) :: key
910
+ integer(KIND=c_int), contiguous, target, intent(inout) :: val(:)
911
+ type(plumed_error), optional, intent(out) :: error
912
+ integer :: valshape(1)
913
+ if(.not.this%initialized) then
914
+ call plumed_create(this)
915
+ endif
916
+ valshape = shape(val)
917
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
918
+ & const=.false., nocopy=.true., error=error)
919
+ end subroutine pl_cmd_ref_integer_0_1
920
+
921
+ subroutine pl_cmd_ptr_integer_0_1(this,key,val,error)
922
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
923
+ character(kind=c_char,len=*), intent(in) :: key
924
+ integer(KIND=c_int), pointer, intent(in) :: val(:)
925
+ type(plumed_error), optional, intent(out) :: error
926
+ integer :: valshape(1)
927
+ if(.not.this%initialized) then
928
+ call plumed_create(this)
929
+ endif
930
+ if (.not. is_contiguous(val)) then
931
+ if (present(error)) then
932
+ error%code=20300
933
+ error%what="Obtained pointer to non-contiguous data"
934
+ return
935
+ else
936
+ error stop "Obtained pointer to non-contiguous data"
937
+ end if
938
+ end if
939
+ valshape = shape(val)
940
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
941
+ & const=.false., nocopy=.false., error=error)
942
+ end subroutine pl_cmd_ptr_integer_0_1
943
+
944
+ subroutine pl_cmd_const_ptr_integer_0_1(this,key,val,error)
945
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
946
+ character(kind=c_char,len=*), intent(in) :: key
947
+ integer(KIND=c_int), pointer, intent(in) :: val(:)
948
+ type(plumed_error), optional, intent(out) :: error
949
+ integer :: valshape(1)
950
+ if(.not.this%initialized) then
951
+ call plumed_create(this)
952
+ endif
953
+ if (.not. is_contiguous(val)) then
954
+ if (present(error)) then
955
+ error%code=20300
956
+ error%what="Obtained const pointer to non-contiguous data"
957
+ return
958
+ else
959
+ error stop "Obtained const pointer to non-contiguous data"
960
+ end if
961
+ end if
962
+ valshape = shape(val)
963
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
964
+ & const=.true., nocopy=.false., error=error)
965
+ end subroutine pl_cmd_const_ptr_integer_0_1
966
+
967
+
968
+ subroutine pl_cmd_val_integer_0_2(this,key,val,error)
969
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
970
+ character(kind=c_char,len=*), intent(in) :: key
971
+ integer(KIND=c_int), contiguous, target, intent(in) :: val(:,:)
972
+ type(plumed_error), optional, intent(out) :: error
973
+ integer :: valshape(2)
974
+ if(.not.this%initialized) then
975
+ call plumed_create(this)
976
+ endif
977
+ valshape = shape(val)
978
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
979
+ & const=.true., nocopy=.true., error=error)
980
+ end subroutine pl_cmd_val_integer_0_2
981
+
982
+ subroutine pl_cmd_ref_integer_0_2(this,key,val,error)
983
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
984
+ character(kind=c_char,len=*), intent(in) :: key
985
+ integer(KIND=c_int), contiguous, target, intent(inout) :: val(:,:)
986
+ type(plumed_error), optional, intent(out) :: error
987
+ integer :: valshape(2)
988
+ if(.not.this%initialized) then
989
+ call plumed_create(this)
990
+ endif
991
+ valshape = shape(val)
992
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
993
+ & const=.false., nocopy=.true., error=error)
994
+ end subroutine pl_cmd_ref_integer_0_2
995
+
996
+ subroutine pl_cmd_ptr_integer_0_2(this,key,val,error)
997
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
998
+ character(kind=c_char,len=*), intent(in) :: key
999
+ integer(KIND=c_int), pointer, intent(in) :: val(:,:)
1000
+ type(plumed_error), optional, intent(out) :: error
1001
+ integer :: valshape(2)
1002
+ if(.not.this%initialized) then
1003
+ call plumed_create(this)
1004
+ endif
1005
+ if (.not. is_contiguous(val)) then
1006
+ if (present(error)) then
1007
+ error%code=20300
1008
+ error%what="Obtained pointer to non-contiguous data"
1009
+ return
1010
+ else
1011
+ error stop "Obtained pointer to non-contiguous data"
1012
+ end if
1013
+ end if
1014
+ valshape = shape(val)
1015
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1016
+ & const=.false., nocopy=.false., error=error)
1017
+ end subroutine pl_cmd_ptr_integer_0_2
1018
+
1019
+ subroutine pl_cmd_const_ptr_integer_0_2(this,key,val,error)
1020
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1021
+ character(kind=c_char,len=*), intent(in) :: key
1022
+ integer(KIND=c_int), pointer, intent(in) :: val(:,:)
1023
+ type(plumed_error), optional, intent(out) :: error
1024
+ integer :: valshape(2)
1025
+ if(.not.this%initialized) then
1026
+ call plumed_create(this)
1027
+ endif
1028
+ if (.not. is_contiguous(val)) then
1029
+ if (present(error)) then
1030
+ error%code=20300
1031
+ error%what="Obtained const pointer to non-contiguous data"
1032
+ return
1033
+ else
1034
+ error stop "Obtained const pointer to non-contiguous data"
1035
+ end if
1036
+ end if
1037
+ valshape = shape(val)
1038
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1039
+ & const=.true., nocopy=.false., error=error)
1040
+ end subroutine pl_cmd_const_ptr_integer_0_2
1041
+
1042
+
1043
+ subroutine pl_cmd_val_integer_0_3(this,key,val,error)
1044
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1045
+ character(kind=c_char,len=*), intent(in) :: key
1046
+ integer(KIND=c_int), contiguous, target, intent(in) :: val(:,:,:)
1047
+ type(plumed_error), optional, intent(out) :: error
1048
+ integer :: valshape(3)
1049
+ if(.not.this%initialized) then
1050
+ call plumed_create(this)
1051
+ endif
1052
+ valshape = shape(val)
1053
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1054
+ & const=.true., nocopy=.true., error=error)
1055
+ end subroutine pl_cmd_val_integer_0_3
1056
+
1057
+ subroutine pl_cmd_ref_integer_0_3(this,key,val,error)
1058
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1059
+ character(kind=c_char,len=*), intent(in) :: key
1060
+ integer(KIND=c_int), contiguous, target, intent(inout) :: val(:,:,:)
1061
+ type(plumed_error), optional, intent(out) :: error
1062
+ integer :: valshape(3)
1063
+ if(.not.this%initialized) then
1064
+ call plumed_create(this)
1065
+ endif
1066
+ valshape = shape(val)
1067
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1068
+ & const=.false., nocopy=.true., error=error)
1069
+ end subroutine pl_cmd_ref_integer_0_3
1070
+
1071
+ subroutine pl_cmd_ptr_integer_0_3(this,key,val,error)
1072
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1073
+ character(kind=c_char,len=*), intent(in) :: key
1074
+ integer(KIND=c_int), pointer, intent(in) :: val(:,:,:)
1075
+ type(plumed_error), optional, intent(out) :: error
1076
+ integer :: valshape(3)
1077
+ if(.not.this%initialized) then
1078
+ call plumed_create(this)
1079
+ endif
1080
+ if (.not. is_contiguous(val)) then
1081
+ if (present(error)) then
1082
+ error%code=20300
1083
+ error%what="Obtained pointer to non-contiguous data"
1084
+ return
1085
+ else
1086
+ error stop "Obtained pointer to non-contiguous data"
1087
+ end if
1088
+ end if
1089
+ valshape = shape(val)
1090
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1091
+ & const=.false., nocopy=.false., error=error)
1092
+ end subroutine pl_cmd_ptr_integer_0_3
1093
+
1094
+ subroutine pl_cmd_const_ptr_integer_0_3(this,key,val,error)
1095
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1096
+ character(kind=c_char,len=*), intent(in) :: key
1097
+ integer(KIND=c_int), pointer, intent(in) :: val(:,:,:)
1098
+ type(plumed_error), optional, intent(out) :: error
1099
+ integer :: valshape(3)
1100
+ if(.not.this%initialized) then
1101
+ call plumed_create(this)
1102
+ endif
1103
+ if (.not. is_contiguous(val)) then
1104
+ if (present(error)) then
1105
+ error%code=20300
1106
+ error%what="Obtained const pointer to non-contiguous data"
1107
+ return
1108
+ else
1109
+ error stop "Obtained const pointer to non-contiguous data"
1110
+ end if
1111
+ end if
1112
+ valshape = shape(val)
1113
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1114
+ & const=.true., nocopy=.false., error=error)
1115
+ end subroutine pl_cmd_const_ptr_integer_0_3
1116
+
1117
+
1118
+ subroutine pl_cmd_val_integer_0_4(this,key,val,error)
1119
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1120
+ character(kind=c_char,len=*), intent(in) :: key
1121
+ integer(KIND=c_int), contiguous, target, intent(in) :: val(:,:,:,:)
1122
+ type(plumed_error), optional, intent(out) :: error
1123
+ integer :: valshape(4)
1124
+ if(.not.this%initialized) then
1125
+ call plumed_create(this)
1126
+ endif
1127
+ valshape = shape(val)
1128
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1129
+ & const=.true., nocopy=.true., error=error)
1130
+ end subroutine pl_cmd_val_integer_0_4
1131
+
1132
+ subroutine pl_cmd_ref_integer_0_4(this,key,val,error)
1133
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1134
+ character(kind=c_char,len=*), intent(in) :: key
1135
+ integer(KIND=c_int), contiguous, target, intent(inout) :: val(:,:,:,:)
1136
+ type(plumed_error), optional, intent(out) :: error
1137
+ integer :: valshape(4)
1138
+ if(.not.this%initialized) then
1139
+ call plumed_create(this)
1140
+ endif
1141
+ valshape = shape(val)
1142
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1143
+ & const=.false., nocopy=.true., error=error)
1144
+ end subroutine pl_cmd_ref_integer_0_4
1145
+
1146
+ subroutine pl_cmd_ptr_integer_0_4(this,key,val,error)
1147
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1148
+ character(kind=c_char,len=*), intent(in) :: key
1149
+ integer(KIND=c_int), pointer, intent(in) :: val(:,:,:,:)
1150
+ type(plumed_error), optional, intent(out) :: error
1151
+ integer :: valshape(4)
1152
+ if(.not.this%initialized) then
1153
+ call plumed_create(this)
1154
+ endif
1155
+ if (.not. is_contiguous(val)) then
1156
+ if (present(error)) then
1157
+ error%code=20300
1158
+ error%what="Obtained pointer to non-contiguous data"
1159
+ return
1160
+ else
1161
+ error stop "Obtained pointer to non-contiguous data"
1162
+ end if
1163
+ end if
1164
+ valshape = shape(val)
1165
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1166
+ & const=.false., nocopy=.false., error=error)
1167
+ end subroutine pl_cmd_ptr_integer_0_4
1168
+
1169
+ subroutine pl_cmd_const_ptr_integer_0_4(this,key,val,error)
1170
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1171
+ character(kind=c_char,len=*), intent(in) :: key
1172
+ integer(KIND=c_int), pointer, intent(in) :: val(:,:,:,:)
1173
+ type(plumed_error), optional, intent(out) :: error
1174
+ integer :: valshape(4)
1175
+ if(.not.this%initialized) then
1176
+ call plumed_create(this)
1177
+ endif
1178
+ if (.not. is_contiguous(val)) then
1179
+ if (present(error)) then
1180
+ error%code=20300
1181
+ error%what="Obtained const pointer to non-contiguous data"
1182
+ return
1183
+ else
1184
+ error stop "Obtained const pointer to non-contiguous data"
1185
+ end if
1186
+ end if
1187
+ valshape = shape(val)
1188
+ call plumed_f_cmd_integer_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1189
+ & const=.true., nocopy=.false., error=error)
1190
+ end subroutine pl_cmd_const_ptr_integer_0_4
1191
+
1192
+
1193
+ subroutine pl_cmd_val_integer_1_0(this,key,val,error)
1194
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1195
+ character(kind=c_char,len=*), intent(in) :: key
1196
+ integer(KIND=c_short), target, intent(in) :: val
1197
+ type(plumed_error), optional, intent(out) :: error
1198
+ integer :: valshape(0)
1199
+ if(.not.this%initialized) then
1200
+ call plumed_create(this)
1201
+ endif
1202
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1203
+ & const=.true., nocopy=.true., error=error)
1204
+ end subroutine pl_cmd_val_integer_1_0
1205
+
1206
+ subroutine pl_cmd_ref_integer_1_0(this,key,val,error)
1207
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1208
+ character(kind=c_char,len=*), intent(in) :: key
1209
+ integer(KIND=c_short), target, intent(inout) :: val
1210
+ type(plumed_error), optional, intent(out) :: error
1211
+ integer :: valshape(0)
1212
+ if(.not.this%initialized) then
1213
+ call plumed_create(this)
1214
+ endif
1215
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1216
+ & const=.false., nocopy=.true., error=error)
1217
+ end subroutine pl_cmd_ref_integer_1_0
1218
+
1219
+ subroutine pl_cmd_ptr_integer_1_0(this,key,val,error)
1220
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1221
+ character(kind=c_char,len=*), intent(in) :: key
1222
+ integer(KIND=c_short), pointer, intent(in) :: val
1223
+ type(plumed_error), optional, intent(out) :: error
1224
+ integer :: valshape(0)
1225
+ if(.not.this%initialized) then
1226
+ call plumed_create(this)
1227
+ endif
1228
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1229
+ & const=.false., nocopy=.false., error=error)
1230
+ end subroutine pl_cmd_ptr_integer_1_0
1231
+
1232
+ subroutine pl_cmd_const_ptr_integer_1_0(this,key,val,error)
1233
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1234
+ character(kind=c_char,len=*), intent(in) :: key
1235
+ integer(KIND=c_short), pointer, intent(in) :: val
1236
+ type(plumed_error), optional, intent(out) :: error
1237
+ integer :: valshape(0)
1238
+ if(.not.this%initialized) then
1239
+ call plumed_create(this)
1240
+ endif
1241
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1242
+ & const=.true., nocopy=.false., error=error)
1243
+ end subroutine pl_cmd_const_ptr_integer_1_0
1244
+
1245
+
1246
+ subroutine pl_cmd_val_integer_1_1(this,key,val,error)
1247
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1248
+ character(kind=c_char,len=*), intent(in) :: key
1249
+ integer(KIND=c_short), contiguous, target, intent(in) :: val(:)
1250
+ type(plumed_error), optional, intent(out) :: error
1251
+ integer :: valshape(1)
1252
+ if(.not.this%initialized) then
1253
+ call plumed_create(this)
1254
+ endif
1255
+ valshape = shape(val)
1256
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1257
+ & const=.true., nocopy=.true., error=error)
1258
+ end subroutine pl_cmd_val_integer_1_1
1259
+
1260
+ subroutine pl_cmd_ref_integer_1_1(this,key,val,error)
1261
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1262
+ character(kind=c_char,len=*), intent(in) :: key
1263
+ integer(KIND=c_short), contiguous, target, intent(inout) :: val(:)
1264
+ type(plumed_error), optional, intent(out) :: error
1265
+ integer :: valshape(1)
1266
+ if(.not.this%initialized) then
1267
+ call plumed_create(this)
1268
+ endif
1269
+ valshape = shape(val)
1270
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1271
+ & const=.false., nocopy=.true., error=error)
1272
+ end subroutine pl_cmd_ref_integer_1_1
1273
+
1274
+ subroutine pl_cmd_ptr_integer_1_1(this,key,val,error)
1275
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1276
+ character(kind=c_char,len=*), intent(in) :: key
1277
+ integer(KIND=c_short), pointer, intent(in) :: val(:)
1278
+ type(plumed_error), optional, intent(out) :: error
1279
+ integer :: valshape(1)
1280
+ if(.not.this%initialized) then
1281
+ call plumed_create(this)
1282
+ endif
1283
+ if (.not. is_contiguous(val)) then
1284
+ if (present(error)) then
1285
+ error%code=20300
1286
+ error%what="Obtained pointer to non-contiguous data"
1287
+ return
1288
+ else
1289
+ error stop "Obtained pointer to non-contiguous data"
1290
+ end if
1291
+ end if
1292
+ valshape = shape(val)
1293
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1294
+ & const=.false., nocopy=.false., error=error)
1295
+ end subroutine pl_cmd_ptr_integer_1_1
1296
+
1297
+ subroutine pl_cmd_const_ptr_integer_1_1(this,key,val,error)
1298
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1299
+ character(kind=c_char,len=*), intent(in) :: key
1300
+ integer(KIND=c_short), pointer, intent(in) :: val(:)
1301
+ type(plumed_error), optional, intent(out) :: error
1302
+ integer :: valshape(1)
1303
+ if(.not.this%initialized) then
1304
+ call plumed_create(this)
1305
+ endif
1306
+ if (.not. is_contiguous(val)) then
1307
+ if (present(error)) then
1308
+ error%code=20300
1309
+ error%what="Obtained const pointer to non-contiguous data"
1310
+ return
1311
+ else
1312
+ error stop "Obtained const pointer to non-contiguous data"
1313
+ end if
1314
+ end if
1315
+ valshape = shape(val)
1316
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1317
+ & const=.true., nocopy=.false., error=error)
1318
+ end subroutine pl_cmd_const_ptr_integer_1_1
1319
+
1320
+
1321
+ subroutine pl_cmd_val_integer_1_2(this,key,val,error)
1322
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1323
+ character(kind=c_char,len=*), intent(in) :: key
1324
+ integer(KIND=c_short), contiguous, target, intent(in) :: val(:,:)
1325
+ type(plumed_error), optional, intent(out) :: error
1326
+ integer :: valshape(2)
1327
+ if(.not.this%initialized) then
1328
+ call plumed_create(this)
1329
+ endif
1330
+ valshape = shape(val)
1331
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1332
+ & const=.true., nocopy=.true., error=error)
1333
+ end subroutine pl_cmd_val_integer_1_2
1334
+
1335
+ subroutine pl_cmd_ref_integer_1_2(this,key,val,error)
1336
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1337
+ character(kind=c_char,len=*), intent(in) :: key
1338
+ integer(KIND=c_short), contiguous, target, intent(inout) :: val(:,:)
1339
+ type(plumed_error), optional, intent(out) :: error
1340
+ integer :: valshape(2)
1341
+ if(.not.this%initialized) then
1342
+ call plumed_create(this)
1343
+ endif
1344
+ valshape = shape(val)
1345
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1346
+ & const=.false., nocopy=.true., error=error)
1347
+ end subroutine pl_cmd_ref_integer_1_2
1348
+
1349
+ subroutine pl_cmd_ptr_integer_1_2(this,key,val,error)
1350
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1351
+ character(kind=c_char,len=*), intent(in) :: key
1352
+ integer(KIND=c_short), pointer, intent(in) :: val(:,:)
1353
+ type(plumed_error), optional, intent(out) :: error
1354
+ integer :: valshape(2)
1355
+ if(.not.this%initialized) then
1356
+ call plumed_create(this)
1357
+ endif
1358
+ if (.not. is_contiguous(val)) then
1359
+ if (present(error)) then
1360
+ error%code=20300
1361
+ error%what="Obtained pointer to non-contiguous data"
1362
+ return
1363
+ else
1364
+ error stop "Obtained pointer to non-contiguous data"
1365
+ end if
1366
+ end if
1367
+ valshape = shape(val)
1368
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1369
+ & const=.false., nocopy=.false., error=error)
1370
+ end subroutine pl_cmd_ptr_integer_1_2
1371
+
1372
+ subroutine pl_cmd_const_ptr_integer_1_2(this,key,val,error)
1373
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1374
+ character(kind=c_char,len=*), intent(in) :: key
1375
+ integer(KIND=c_short), pointer, intent(in) :: val(:,:)
1376
+ type(plumed_error), optional, intent(out) :: error
1377
+ integer :: valshape(2)
1378
+ if(.not.this%initialized) then
1379
+ call plumed_create(this)
1380
+ endif
1381
+ if (.not. is_contiguous(val)) then
1382
+ if (present(error)) then
1383
+ error%code=20300
1384
+ error%what="Obtained const pointer to non-contiguous data"
1385
+ return
1386
+ else
1387
+ error stop "Obtained const pointer to non-contiguous data"
1388
+ end if
1389
+ end if
1390
+ valshape = shape(val)
1391
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1392
+ & const=.true., nocopy=.false., error=error)
1393
+ end subroutine pl_cmd_const_ptr_integer_1_2
1394
+
1395
+
1396
+ subroutine pl_cmd_val_integer_1_3(this,key,val,error)
1397
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1398
+ character(kind=c_char,len=*), intent(in) :: key
1399
+ integer(KIND=c_short), contiguous, target, intent(in) :: val(:,:,:)
1400
+ type(plumed_error), optional, intent(out) :: error
1401
+ integer :: valshape(3)
1402
+ if(.not.this%initialized) then
1403
+ call plumed_create(this)
1404
+ endif
1405
+ valshape = shape(val)
1406
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1407
+ & const=.true., nocopy=.true., error=error)
1408
+ end subroutine pl_cmd_val_integer_1_3
1409
+
1410
+ subroutine pl_cmd_ref_integer_1_3(this,key,val,error)
1411
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1412
+ character(kind=c_char,len=*), intent(in) :: key
1413
+ integer(KIND=c_short), contiguous, target, intent(inout) :: val(:,:,:)
1414
+ type(plumed_error), optional, intent(out) :: error
1415
+ integer :: valshape(3)
1416
+ if(.not.this%initialized) then
1417
+ call plumed_create(this)
1418
+ endif
1419
+ valshape = shape(val)
1420
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1421
+ & const=.false., nocopy=.true., error=error)
1422
+ end subroutine pl_cmd_ref_integer_1_3
1423
+
1424
+ subroutine pl_cmd_ptr_integer_1_3(this,key,val,error)
1425
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1426
+ character(kind=c_char,len=*), intent(in) :: key
1427
+ integer(KIND=c_short), pointer, intent(in) :: val(:,:,:)
1428
+ type(plumed_error), optional, intent(out) :: error
1429
+ integer :: valshape(3)
1430
+ if(.not.this%initialized) then
1431
+ call plumed_create(this)
1432
+ endif
1433
+ if (.not. is_contiguous(val)) then
1434
+ if (present(error)) then
1435
+ error%code=20300
1436
+ error%what="Obtained pointer to non-contiguous data"
1437
+ return
1438
+ else
1439
+ error stop "Obtained pointer to non-contiguous data"
1440
+ end if
1441
+ end if
1442
+ valshape = shape(val)
1443
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1444
+ & const=.false., nocopy=.false., error=error)
1445
+ end subroutine pl_cmd_ptr_integer_1_3
1446
+
1447
+ subroutine pl_cmd_const_ptr_integer_1_3(this,key,val,error)
1448
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1449
+ character(kind=c_char,len=*), intent(in) :: key
1450
+ integer(KIND=c_short), pointer, intent(in) :: val(:,:,:)
1451
+ type(plumed_error), optional, intent(out) :: error
1452
+ integer :: valshape(3)
1453
+ if(.not.this%initialized) then
1454
+ call plumed_create(this)
1455
+ endif
1456
+ if (.not. is_contiguous(val)) then
1457
+ if (present(error)) then
1458
+ error%code=20300
1459
+ error%what="Obtained const pointer to non-contiguous data"
1460
+ return
1461
+ else
1462
+ error stop "Obtained const pointer to non-contiguous data"
1463
+ end if
1464
+ end if
1465
+ valshape = shape(val)
1466
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1467
+ & const=.true., nocopy=.false., error=error)
1468
+ end subroutine pl_cmd_const_ptr_integer_1_3
1469
+
1470
+
1471
+ subroutine pl_cmd_val_integer_1_4(this,key,val,error)
1472
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1473
+ character(kind=c_char,len=*), intent(in) :: key
1474
+ integer(KIND=c_short), contiguous, target, intent(in) :: val(:,:,:,:)
1475
+ type(plumed_error), optional, intent(out) :: error
1476
+ integer :: valshape(4)
1477
+ if(.not.this%initialized) then
1478
+ call plumed_create(this)
1479
+ endif
1480
+ valshape = shape(val)
1481
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1482
+ & const=.true., nocopy=.true., error=error)
1483
+ end subroutine pl_cmd_val_integer_1_4
1484
+
1485
+ subroutine pl_cmd_ref_integer_1_4(this,key,val,error)
1486
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1487
+ character(kind=c_char,len=*), intent(in) :: key
1488
+ integer(KIND=c_short), contiguous, target, intent(inout) :: val(:,:,:,:)
1489
+ type(plumed_error), optional, intent(out) :: error
1490
+ integer :: valshape(4)
1491
+ if(.not.this%initialized) then
1492
+ call plumed_create(this)
1493
+ endif
1494
+ valshape = shape(val)
1495
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1496
+ & const=.false., nocopy=.true., error=error)
1497
+ end subroutine pl_cmd_ref_integer_1_4
1498
+
1499
+ subroutine pl_cmd_ptr_integer_1_4(this,key,val,error)
1500
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1501
+ character(kind=c_char,len=*), intent(in) :: key
1502
+ integer(KIND=c_short), pointer, intent(in) :: val(:,:,:,:)
1503
+ type(plumed_error), optional, intent(out) :: error
1504
+ integer :: valshape(4)
1505
+ if(.not.this%initialized) then
1506
+ call plumed_create(this)
1507
+ endif
1508
+ if (.not. is_contiguous(val)) then
1509
+ if (present(error)) then
1510
+ error%code=20300
1511
+ error%what="Obtained pointer to non-contiguous data"
1512
+ return
1513
+ else
1514
+ error stop "Obtained pointer to non-contiguous data"
1515
+ end if
1516
+ end if
1517
+ valshape = shape(val)
1518
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1519
+ & const=.false., nocopy=.false., error=error)
1520
+ end subroutine pl_cmd_ptr_integer_1_4
1521
+
1522
+ subroutine pl_cmd_const_ptr_integer_1_4(this,key,val,error)
1523
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1524
+ character(kind=c_char,len=*), intent(in) :: key
1525
+ integer(KIND=c_short), pointer, intent(in) :: val(:,:,:,:)
1526
+ type(plumed_error), optional, intent(out) :: error
1527
+ integer :: valshape(4)
1528
+ if(.not.this%initialized) then
1529
+ call plumed_create(this)
1530
+ endif
1531
+ if (.not. is_contiguous(val)) then
1532
+ if (present(error)) then
1533
+ error%code=20300
1534
+ error%what="Obtained const pointer to non-contiguous data"
1535
+ return
1536
+ else
1537
+ error stop "Obtained const pointer to non-contiguous data"
1538
+ end if
1539
+ end if
1540
+ valshape = shape(val)
1541
+ call plumed_f_cmd_integer_1(this%handle, key // c_null_char, c_loc(val), valshape,&
1542
+ & const=.true., nocopy=.false., error=error)
1543
+ end subroutine pl_cmd_const_ptr_integer_1_4
1544
+
1545
+
1546
+ subroutine pl_cmd_val_integer_2_0(this,key,val,error)
1547
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1548
+ character(kind=c_char,len=*), intent(in) :: key
1549
+ integer(KIND=c_long), target, intent(in) :: val
1550
+ type(plumed_error), optional, intent(out) :: error
1551
+ integer :: valshape(0)
1552
+ if(.not.this%initialized) then
1553
+ call plumed_create(this)
1554
+ endif
1555
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1556
+ & const=.true., nocopy=.true., error=error)
1557
+ end subroutine pl_cmd_val_integer_2_0
1558
+
1559
+ subroutine pl_cmd_ref_integer_2_0(this,key,val,error)
1560
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1561
+ character(kind=c_char,len=*), intent(in) :: key
1562
+ integer(KIND=c_long), target, intent(inout) :: val
1563
+ type(plumed_error), optional, intent(out) :: error
1564
+ integer :: valshape(0)
1565
+ if(.not.this%initialized) then
1566
+ call plumed_create(this)
1567
+ endif
1568
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1569
+ & const=.false., nocopy=.true., error=error)
1570
+ end subroutine pl_cmd_ref_integer_2_0
1571
+
1572
+ subroutine pl_cmd_ptr_integer_2_0(this,key,val,error)
1573
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1574
+ character(kind=c_char,len=*), intent(in) :: key
1575
+ integer(KIND=c_long), pointer, intent(in) :: val
1576
+ type(plumed_error), optional, intent(out) :: error
1577
+ integer :: valshape(0)
1578
+ if(.not.this%initialized) then
1579
+ call plumed_create(this)
1580
+ endif
1581
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1582
+ & const=.false., nocopy=.false., error=error)
1583
+ end subroutine pl_cmd_ptr_integer_2_0
1584
+
1585
+ subroutine pl_cmd_const_ptr_integer_2_0(this,key,val,error)
1586
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1587
+ character(kind=c_char,len=*), intent(in) :: key
1588
+ integer(KIND=c_long), pointer, intent(in) :: val
1589
+ type(plumed_error), optional, intent(out) :: error
1590
+ integer :: valshape(0)
1591
+ if(.not.this%initialized) then
1592
+ call plumed_create(this)
1593
+ endif
1594
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1595
+ & const=.true., nocopy=.false., error=error)
1596
+ end subroutine pl_cmd_const_ptr_integer_2_0
1597
+
1598
+
1599
+ subroutine pl_cmd_val_integer_2_1(this,key,val,error)
1600
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1601
+ character(kind=c_char,len=*), intent(in) :: key
1602
+ integer(KIND=c_long), contiguous, target, intent(in) :: val(:)
1603
+ type(plumed_error), optional, intent(out) :: error
1604
+ integer :: valshape(1)
1605
+ if(.not.this%initialized) then
1606
+ call plumed_create(this)
1607
+ endif
1608
+ valshape = shape(val)
1609
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1610
+ & const=.true., nocopy=.true., error=error)
1611
+ end subroutine pl_cmd_val_integer_2_1
1612
+
1613
+ subroutine pl_cmd_ref_integer_2_1(this,key,val,error)
1614
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1615
+ character(kind=c_char,len=*), intent(in) :: key
1616
+ integer(KIND=c_long), contiguous, target, intent(inout) :: val(:)
1617
+ type(plumed_error), optional, intent(out) :: error
1618
+ integer :: valshape(1)
1619
+ if(.not.this%initialized) then
1620
+ call plumed_create(this)
1621
+ endif
1622
+ valshape = shape(val)
1623
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1624
+ & const=.false., nocopy=.true., error=error)
1625
+ end subroutine pl_cmd_ref_integer_2_1
1626
+
1627
+ subroutine pl_cmd_ptr_integer_2_1(this,key,val,error)
1628
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1629
+ character(kind=c_char,len=*), intent(in) :: key
1630
+ integer(KIND=c_long), pointer, intent(in) :: val(:)
1631
+ type(plumed_error), optional, intent(out) :: error
1632
+ integer :: valshape(1)
1633
+ if(.not.this%initialized) then
1634
+ call plumed_create(this)
1635
+ endif
1636
+ if (.not. is_contiguous(val)) then
1637
+ if (present(error)) then
1638
+ error%code=20300
1639
+ error%what="Obtained pointer to non-contiguous data"
1640
+ return
1641
+ else
1642
+ error stop "Obtained pointer to non-contiguous data"
1643
+ end if
1644
+ end if
1645
+ valshape = shape(val)
1646
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1647
+ & const=.false., nocopy=.false., error=error)
1648
+ end subroutine pl_cmd_ptr_integer_2_1
1649
+
1650
+ subroutine pl_cmd_const_ptr_integer_2_1(this,key,val,error)
1651
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1652
+ character(kind=c_char,len=*), intent(in) :: key
1653
+ integer(KIND=c_long), pointer, intent(in) :: val(:)
1654
+ type(plumed_error), optional, intent(out) :: error
1655
+ integer :: valshape(1)
1656
+ if(.not.this%initialized) then
1657
+ call plumed_create(this)
1658
+ endif
1659
+ if (.not. is_contiguous(val)) then
1660
+ if (present(error)) then
1661
+ error%code=20300
1662
+ error%what="Obtained const pointer to non-contiguous data"
1663
+ return
1664
+ else
1665
+ error stop "Obtained const pointer to non-contiguous data"
1666
+ end if
1667
+ end if
1668
+ valshape = shape(val)
1669
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1670
+ & const=.true., nocopy=.false., error=error)
1671
+ end subroutine pl_cmd_const_ptr_integer_2_1
1672
+
1673
+
1674
+ subroutine pl_cmd_val_integer_2_2(this,key,val,error)
1675
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1676
+ character(kind=c_char,len=*), intent(in) :: key
1677
+ integer(KIND=c_long), contiguous, target, intent(in) :: val(:,:)
1678
+ type(plumed_error), optional, intent(out) :: error
1679
+ integer :: valshape(2)
1680
+ if(.not.this%initialized) then
1681
+ call plumed_create(this)
1682
+ endif
1683
+ valshape = shape(val)
1684
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1685
+ & const=.true., nocopy=.true., error=error)
1686
+ end subroutine pl_cmd_val_integer_2_2
1687
+
1688
+ subroutine pl_cmd_ref_integer_2_2(this,key,val,error)
1689
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1690
+ character(kind=c_char,len=*), intent(in) :: key
1691
+ integer(KIND=c_long), contiguous, target, intent(inout) :: val(:,:)
1692
+ type(plumed_error), optional, intent(out) :: error
1693
+ integer :: valshape(2)
1694
+ if(.not.this%initialized) then
1695
+ call plumed_create(this)
1696
+ endif
1697
+ valshape = shape(val)
1698
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1699
+ & const=.false., nocopy=.true., error=error)
1700
+ end subroutine pl_cmd_ref_integer_2_2
1701
+
1702
+ subroutine pl_cmd_ptr_integer_2_2(this,key,val,error)
1703
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1704
+ character(kind=c_char,len=*), intent(in) :: key
1705
+ integer(KIND=c_long), pointer, intent(in) :: val(:,:)
1706
+ type(plumed_error), optional, intent(out) :: error
1707
+ integer :: valshape(2)
1708
+ if(.not.this%initialized) then
1709
+ call plumed_create(this)
1710
+ endif
1711
+ if (.not. is_contiguous(val)) then
1712
+ if (present(error)) then
1713
+ error%code=20300
1714
+ error%what="Obtained pointer to non-contiguous data"
1715
+ return
1716
+ else
1717
+ error stop "Obtained pointer to non-contiguous data"
1718
+ end if
1719
+ end if
1720
+ valshape = shape(val)
1721
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1722
+ & const=.false., nocopy=.false., error=error)
1723
+ end subroutine pl_cmd_ptr_integer_2_2
1724
+
1725
+ subroutine pl_cmd_const_ptr_integer_2_2(this,key,val,error)
1726
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1727
+ character(kind=c_char,len=*), intent(in) :: key
1728
+ integer(KIND=c_long), pointer, intent(in) :: val(:,:)
1729
+ type(plumed_error), optional, intent(out) :: error
1730
+ integer :: valshape(2)
1731
+ if(.not.this%initialized) then
1732
+ call plumed_create(this)
1733
+ endif
1734
+ if (.not. is_contiguous(val)) then
1735
+ if (present(error)) then
1736
+ error%code=20300
1737
+ error%what="Obtained const pointer to non-contiguous data"
1738
+ return
1739
+ else
1740
+ error stop "Obtained const pointer to non-contiguous data"
1741
+ end if
1742
+ end if
1743
+ valshape = shape(val)
1744
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1745
+ & const=.true., nocopy=.false., error=error)
1746
+ end subroutine pl_cmd_const_ptr_integer_2_2
1747
+
1748
+
1749
+ subroutine pl_cmd_val_integer_2_3(this,key,val,error)
1750
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1751
+ character(kind=c_char,len=*), intent(in) :: key
1752
+ integer(KIND=c_long), contiguous, target, intent(in) :: val(:,:,:)
1753
+ type(plumed_error), optional, intent(out) :: error
1754
+ integer :: valshape(3)
1755
+ if(.not.this%initialized) then
1756
+ call plumed_create(this)
1757
+ endif
1758
+ valshape = shape(val)
1759
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1760
+ & const=.true., nocopy=.true., error=error)
1761
+ end subroutine pl_cmd_val_integer_2_3
1762
+
1763
+ subroutine pl_cmd_ref_integer_2_3(this,key,val,error)
1764
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1765
+ character(kind=c_char,len=*), intent(in) :: key
1766
+ integer(KIND=c_long), contiguous, target, intent(inout) :: val(:,:,:)
1767
+ type(plumed_error), optional, intent(out) :: error
1768
+ integer :: valshape(3)
1769
+ if(.not.this%initialized) then
1770
+ call plumed_create(this)
1771
+ endif
1772
+ valshape = shape(val)
1773
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1774
+ & const=.false., nocopy=.true., error=error)
1775
+ end subroutine pl_cmd_ref_integer_2_3
1776
+
1777
+ subroutine pl_cmd_ptr_integer_2_3(this,key,val,error)
1778
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1779
+ character(kind=c_char,len=*), intent(in) :: key
1780
+ integer(KIND=c_long), pointer, intent(in) :: val(:,:,:)
1781
+ type(plumed_error), optional, intent(out) :: error
1782
+ integer :: valshape(3)
1783
+ if(.not.this%initialized) then
1784
+ call plumed_create(this)
1785
+ endif
1786
+ if (.not. is_contiguous(val)) then
1787
+ if (present(error)) then
1788
+ error%code=20300
1789
+ error%what="Obtained pointer to non-contiguous data"
1790
+ return
1791
+ else
1792
+ error stop "Obtained pointer to non-contiguous data"
1793
+ end if
1794
+ end if
1795
+ valshape = shape(val)
1796
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1797
+ & const=.false., nocopy=.false., error=error)
1798
+ end subroutine pl_cmd_ptr_integer_2_3
1799
+
1800
+ subroutine pl_cmd_const_ptr_integer_2_3(this,key,val,error)
1801
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1802
+ character(kind=c_char,len=*), intent(in) :: key
1803
+ integer(KIND=c_long), pointer, intent(in) :: val(:,:,:)
1804
+ type(plumed_error), optional, intent(out) :: error
1805
+ integer :: valshape(3)
1806
+ if(.not.this%initialized) then
1807
+ call plumed_create(this)
1808
+ endif
1809
+ if (.not. is_contiguous(val)) then
1810
+ if (present(error)) then
1811
+ error%code=20300
1812
+ error%what="Obtained const pointer to non-contiguous data"
1813
+ return
1814
+ else
1815
+ error stop "Obtained const pointer to non-contiguous data"
1816
+ end if
1817
+ end if
1818
+ valshape = shape(val)
1819
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1820
+ & const=.true., nocopy=.false., error=error)
1821
+ end subroutine pl_cmd_const_ptr_integer_2_3
1822
+
1823
+
1824
+ subroutine pl_cmd_val_integer_2_4(this,key,val,error)
1825
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1826
+ character(kind=c_char,len=*), intent(in) :: key
1827
+ integer(KIND=c_long), contiguous, target, intent(in) :: val(:,:,:,:)
1828
+ type(plumed_error), optional, intent(out) :: error
1829
+ integer :: valshape(4)
1830
+ if(.not.this%initialized) then
1831
+ call plumed_create(this)
1832
+ endif
1833
+ valshape = shape(val)
1834
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1835
+ & const=.true., nocopy=.true., error=error)
1836
+ end subroutine pl_cmd_val_integer_2_4
1837
+
1838
+ subroutine pl_cmd_ref_integer_2_4(this,key,val,error)
1839
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1840
+ character(kind=c_char,len=*), intent(in) :: key
1841
+ integer(KIND=c_long), contiguous, target, intent(inout) :: val(:,:,:,:)
1842
+ type(plumed_error), optional, intent(out) :: error
1843
+ integer :: valshape(4)
1844
+ if(.not.this%initialized) then
1845
+ call plumed_create(this)
1846
+ endif
1847
+ valshape = shape(val)
1848
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1849
+ & const=.false., nocopy=.true., error=error)
1850
+ end subroutine pl_cmd_ref_integer_2_4
1851
+
1852
+ subroutine pl_cmd_ptr_integer_2_4(this,key,val,error)
1853
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1854
+ character(kind=c_char,len=*), intent(in) :: key
1855
+ integer(KIND=c_long), pointer, intent(in) :: val(:,:,:,:)
1856
+ type(plumed_error), optional, intent(out) :: error
1857
+ integer :: valshape(4)
1858
+ if(.not.this%initialized) then
1859
+ call plumed_create(this)
1860
+ endif
1861
+ if (.not. is_contiguous(val)) then
1862
+ if (present(error)) then
1863
+ error%code=20300
1864
+ error%what="Obtained pointer to non-contiguous data"
1865
+ return
1866
+ else
1867
+ error stop "Obtained pointer to non-contiguous data"
1868
+ end if
1869
+ end if
1870
+ valshape = shape(val)
1871
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1872
+ & const=.false., nocopy=.false., error=error)
1873
+ end subroutine pl_cmd_ptr_integer_2_4
1874
+
1875
+ subroutine pl_cmd_const_ptr_integer_2_4(this,key,val,error)
1876
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1877
+ character(kind=c_char,len=*), intent(in) :: key
1878
+ integer(KIND=c_long), pointer, intent(in) :: val(:,:,:,:)
1879
+ type(plumed_error), optional, intent(out) :: error
1880
+ integer :: valshape(4)
1881
+ if(.not.this%initialized) then
1882
+ call plumed_create(this)
1883
+ endif
1884
+ if (.not. is_contiguous(val)) then
1885
+ if (present(error)) then
1886
+ error%code=20300
1887
+ error%what="Obtained const pointer to non-contiguous data"
1888
+ return
1889
+ else
1890
+ error stop "Obtained const pointer to non-contiguous data"
1891
+ end if
1892
+ end if
1893
+ valshape = shape(val)
1894
+ call plumed_f_cmd_integer_2(this%handle, key // c_null_char, c_loc(val), valshape,&
1895
+ & const=.true., nocopy=.false., error=error)
1896
+ end subroutine pl_cmd_const_ptr_integer_2_4
1897
+
1898
+
1899
+ subroutine pl_cmd_val_real_0_0(this,key,val,error)
1900
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1901
+ character(kind=c_char,len=*), intent(in) :: key
1902
+ real(KIND=c_float), target, intent(in) :: val
1903
+ type(plumed_error), optional, intent(out) :: error
1904
+ integer :: valshape(0)
1905
+ if(.not.this%initialized) then
1906
+ call plumed_create(this)
1907
+ endif
1908
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1909
+ & const=.true., nocopy=.true., error=error)
1910
+ end subroutine pl_cmd_val_real_0_0
1911
+
1912
+ subroutine pl_cmd_ref_real_0_0(this,key,val,error)
1913
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1914
+ character(kind=c_char,len=*), intent(in) :: key
1915
+ real(KIND=c_float), target, intent(inout) :: val
1916
+ type(plumed_error), optional, intent(out) :: error
1917
+ integer :: valshape(0)
1918
+ if(.not.this%initialized) then
1919
+ call plumed_create(this)
1920
+ endif
1921
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1922
+ & const=.false., nocopy=.true., error=error)
1923
+ end subroutine pl_cmd_ref_real_0_0
1924
+
1925
+ subroutine pl_cmd_ptr_real_0_0(this,key,val,error)
1926
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1927
+ character(kind=c_char,len=*), intent(in) :: key
1928
+ real(KIND=c_float), pointer, intent(in) :: val
1929
+ type(plumed_error), optional, intent(out) :: error
1930
+ integer :: valshape(0)
1931
+ if(.not.this%initialized) then
1932
+ call plumed_create(this)
1933
+ endif
1934
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1935
+ & const=.false., nocopy=.false., error=error)
1936
+ end subroutine pl_cmd_ptr_real_0_0
1937
+
1938
+ subroutine pl_cmd_const_ptr_real_0_0(this,key,val,error)
1939
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1940
+ character(kind=c_char,len=*), intent(in) :: key
1941
+ real(KIND=c_float), pointer, intent(in) :: val
1942
+ type(plumed_error), optional, intent(out) :: error
1943
+ integer :: valshape(0)
1944
+ if(.not.this%initialized) then
1945
+ call plumed_create(this)
1946
+ endif
1947
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1948
+ & const=.true., nocopy=.false., error=error)
1949
+ end subroutine pl_cmd_const_ptr_real_0_0
1950
+
1951
+
1952
+ subroutine pl_cmd_val_real_0_1(this,key,val,error)
1953
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1954
+ character(kind=c_char,len=*), intent(in) :: key
1955
+ real(KIND=c_float), contiguous, target, intent(in) :: val(:)
1956
+ type(plumed_error), optional, intent(out) :: error
1957
+ integer :: valshape(1)
1958
+ if(.not.this%initialized) then
1959
+ call plumed_create(this)
1960
+ endif
1961
+ valshape = shape(val)
1962
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1963
+ & const=.true., nocopy=.true., error=error)
1964
+ end subroutine pl_cmd_val_real_0_1
1965
+
1966
+ subroutine pl_cmd_ref_real_0_1(this,key,val,error)
1967
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1968
+ character(kind=c_char,len=*), intent(in) :: key
1969
+ real(KIND=c_float), contiguous, target, intent(inout) :: val(:)
1970
+ type(plumed_error), optional, intent(out) :: error
1971
+ integer :: valshape(1)
1972
+ if(.not.this%initialized) then
1973
+ call plumed_create(this)
1974
+ endif
1975
+ valshape = shape(val)
1976
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
1977
+ & const=.false., nocopy=.true., error=error)
1978
+ end subroutine pl_cmd_ref_real_0_1
1979
+
1980
+ subroutine pl_cmd_ptr_real_0_1(this,key,val,error)
1981
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
1982
+ character(kind=c_char,len=*), intent(in) :: key
1983
+ real(KIND=c_float), pointer, intent(in) :: val(:)
1984
+ type(plumed_error), optional, intent(out) :: error
1985
+ integer :: valshape(1)
1986
+ if(.not.this%initialized) then
1987
+ call plumed_create(this)
1988
+ endif
1989
+ if (.not. is_contiguous(val)) then
1990
+ if (present(error)) then
1991
+ error%code=20300
1992
+ error%what="Obtained pointer to non-contiguous data"
1993
+ return
1994
+ else
1995
+ error stop "Obtained pointer to non-contiguous data"
1996
+ end if
1997
+ end if
1998
+ valshape = shape(val)
1999
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2000
+ & const=.false., nocopy=.false., error=error)
2001
+ end subroutine pl_cmd_ptr_real_0_1
2002
+
2003
+ subroutine pl_cmd_const_ptr_real_0_1(this,key,val,error)
2004
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2005
+ character(kind=c_char,len=*), intent(in) :: key
2006
+ real(KIND=c_float), pointer, intent(in) :: val(:)
2007
+ type(plumed_error), optional, intent(out) :: error
2008
+ integer :: valshape(1)
2009
+ if(.not.this%initialized) then
2010
+ call plumed_create(this)
2011
+ endif
2012
+ if (.not. is_contiguous(val)) then
2013
+ if (present(error)) then
2014
+ error%code=20300
2015
+ error%what="Obtained const pointer to non-contiguous data"
2016
+ return
2017
+ else
2018
+ error stop "Obtained const pointer to non-contiguous data"
2019
+ end if
2020
+ end if
2021
+ valshape = shape(val)
2022
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2023
+ & const=.true., nocopy=.false., error=error)
2024
+ end subroutine pl_cmd_const_ptr_real_0_1
2025
+
2026
+
2027
+ subroutine pl_cmd_val_real_0_2(this,key,val,error)
2028
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2029
+ character(kind=c_char,len=*), intent(in) :: key
2030
+ real(KIND=c_float), contiguous, target, intent(in) :: val(:,:)
2031
+ type(plumed_error), optional, intent(out) :: error
2032
+ integer :: valshape(2)
2033
+ if(.not.this%initialized) then
2034
+ call plumed_create(this)
2035
+ endif
2036
+ valshape = shape(val)
2037
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2038
+ & const=.true., nocopy=.true., error=error)
2039
+ end subroutine pl_cmd_val_real_0_2
2040
+
2041
+ subroutine pl_cmd_ref_real_0_2(this,key,val,error)
2042
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2043
+ character(kind=c_char,len=*), intent(in) :: key
2044
+ real(KIND=c_float), contiguous, target, intent(inout) :: val(:,:)
2045
+ type(plumed_error), optional, intent(out) :: error
2046
+ integer :: valshape(2)
2047
+ if(.not.this%initialized) then
2048
+ call plumed_create(this)
2049
+ endif
2050
+ valshape = shape(val)
2051
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2052
+ & const=.false., nocopy=.true., error=error)
2053
+ end subroutine pl_cmd_ref_real_0_2
2054
+
2055
+ subroutine pl_cmd_ptr_real_0_2(this,key,val,error)
2056
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2057
+ character(kind=c_char,len=*), intent(in) :: key
2058
+ real(KIND=c_float), pointer, intent(in) :: val(:,:)
2059
+ type(plumed_error), optional, intent(out) :: error
2060
+ integer :: valshape(2)
2061
+ if(.not.this%initialized) then
2062
+ call plumed_create(this)
2063
+ endif
2064
+ if (.not. is_contiguous(val)) then
2065
+ if (present(error)) then
2066
+ error%code=20300
2067
+ error%what="Obtained pointer to non-contiguous data"
2068
+ return
2069
+ else
2070
+ error stop "Obtained pointer to non-contiguous data"
2071
+ end if
2072
+ end if
2073
+ valshape = shape(val)
2074
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2075
+ & const=.false., nocopy=.false., error=error)
2076
+ end subroutine pl_cmd_ptr_real_0_2
2077
+
2078
+ subroutine pl_cmd_const_ptr_real_0_2(this,key,val,error)
2079
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2080
+ character(kind=c_char,len=*), intent(in) :: key
2081
+ real(KIND=c_float), pointer, intent(in) :: val(:,:)
2082
+ type(plumed_error), optional, intent(out) :: error
2083
+ integer :: valshape(2)
2084
+ if(.not.this%initialized) then
2085
+ call plumed_create(this)
2086
+ endif
2087
+ if (.not. is_contiguous(val)) then
2088
+ if (present(error)) then
2089
+ error%code=20300
2090
+ error%what="Obtained const pointer to non-contiguous data"
2091
+ return
2092
+ else
2093
+ error stop "Obtained const pointer to non-contiguous data"
2094
+ end if
2095
+ end if
2096
+ valshape = shape(val)
2097
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2098
+ & const=.true., nocopy=.false., error=error)
2099
+ end subroutine pl_cmd_const_ptr_real_0_2
2100
+
2101
+
2102
+ subroutine pl_cmd_val_real_0_3(this,key,val,error)
2103
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2104
+ character(kind=c_char,len=*), intent(in) :: key
2105
+ real(KIND=c_float), contiguous, target, intent(in) :: val(:,:,:)
2106
+ type(plumed_error), optional, intent(out) :: error
2107
+ integer :: valshape(3)
2108
+ if(.not.this%initialized) then
2109
+ call plumed_create(this)
2110
+ endif
2111
+ valshape = shape(val)
2112
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2113
+ & const=.true., nocopy=.true., error=error)
2114
+ end subroutine pl_cmd_val_real_0_3
2115
+
2116
+ subroutine pl_cmd_ref_real_0_3(this,key,val,error)
2117
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2118
+ character(kind=c_char,len=*), intent(in) :: key
2119
+ real(KIND=c_float), contiguous, target, intent(inout) :: val(:,:,:)
2120
+ type(plumed_error), optional, intent(out) :: error
2121
+ integer :: valshape(3)
2122
+ if(.not.this%initialized) then
2123
+ call plumed_create(this)
2124
+ endif
2125
+ valshape = shape(val)
2126
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2127
+ & const=.false., nocopy=.true., error=error)
2128
+ end subroutine pl_cmd_ref_real_0_3
2129
+
2130
+ subroutine pl_cmd_ptr_real_0_3(this,key,val,error)
2131
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2132
+ character(kind=c_char,len=*), intent(in) :: key
2133
+ real(KIND=c_float), pointer, intent(in) :: val(:,:,:)
2134
+ type(plumed_error), optional, intent(out) :: error
2135
+ integer :: valshape(3)
2136
+ if(.not.this%initialized) then
2137
+ call plumed_create(this)
2138
+ endif
2139
+ if (.not. is_contiguous(val)) then
2140
+ if (present(error)) then
2141
+ error%code=20300
2142
+ error%what="Obtained pointer to non-contiguous data"
2143
+ return
2144
+ else
2145
+ error stop "Obtained pointer to non-contiguous data"
2146
+ end if
2147
+ end if
2148
+ valshape = shape(val)
2149
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2150
+ & const=.false., nocopy=.false., error=error)
2151
+ end subroutine pl_cmd_ptr_real_0_3
2152
+
2153
+ subroutine pl_cmd_const_ptr_real_0_3(this,key,val,error)
2154
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2155
+ character(kind=c_char,len=*), intent(in) :: key
2156
+ real(KIND=c_float), pointer, intent(in) :: val(:,:,:)
2157
+ type(plumed_error), optional, intent(out) :: error
2158
+ integer :: valshape(3)
2159
+ if(.not.this%initialized) then
2160
+ call plumed_create(this)
2161
+ endif
2162
+ if (.not. is_contiguous(val)) then
2163
+ if (present(error)) then
2164
+ error%code=20300
2165
+ error%what="Obtained const pointer to non-contiguous data"
2166
+ return
2167
+ else
2168
+ error stop "Obtained const pointer to non-contiguous data"
2169
+ end if
2170
+ end if
2171
+ valshape = shape(val)
2172
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2173
+ & const=.true., nocopy=.false., error=error)
2174
+ end subroutine pl_cmd_const_ptr_real_0_3
2175
+
2176
+
2177
+ subroutine pl_cmd_val_real_0_4(this,key,val,error)
2178
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2179
+ character(kind=c_char,len=*), intent(in) :: key
2180
+ real(KIND=c_float), contiguous, target, intent(in) :: val(:,:,:,:)
2181
+ type(plumed_error), optional, intent(out) :: error
2182
+ integer :: valshape(4)
2183
+ if(.not.this%initialized) then
2184
+ call plumed_create(this)
2185
+ endif
2186
+ valshape = shape(val)
2187
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2188
+ & const=.true., nocopy=.true., error=error)
2189
+ end subroutine pl_cmd_val_real_0_4
2190
+
2191
+ subroutine pl_cmd_ref_real_0_4(this,key,val,error)
2192
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2193
+ character(kind=c_char,len=*), intent(in) :: key
2194
+ real(KIND=c_float), contiguous, target, intent(inout) :: val(:,:,:,:)
2195
+ type(plumed_error), optional, intent(out) :: error
2196
+ integer :: valshape(4)
2197
+ if(.not.this%initialized) then
2198
+ call plumed_create(this)
2199
+ endif
2200
+ valshape = shape(val)
2201
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2202
+ & const=.false., nocopy=.true., error=error)
2203
+ end subroutine pl_cmd_ref_real_0_4
2204
+
2205
+ subroutine pl_cmd_ptr_real_0_4(this,key,val,error)
2206
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2207
+ character(kind=c_char,len=*), intent(in) :: key
2208
+ real(KIND=c_float), pointer, intent(in) :: val(:,:,:,:)
2209
+ type(plumed_error), optional, intent(out) :: error
2210
+ integer :: valshape(4)
2211
+ if(.not.this%initialized) then
2212
+ call plumed_create(this)
2213
+ endif
2214
+ if (.not. is_contiguous(val)) then
2215
+ if (present(error)) then
2216
+ error%code=20300
2217
+ error%what="Obtained pointer to non-contiguous data"
2218
+ return
2219
+ else
2220
+ error stop "Obtained pointer to non-contiguous data"
2221
+ end if
2222
+ end if
2223
+ valshape = shape(val)
2224
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2225
+ & const=.false., nocopy=.false., error=error)
2226
+ end subroutine pl_cmd_ptr_real_0_4
2227
+
2228
+ subroutine pl_cmd_const_ptr_real_0_4(this,key,val,error)
2229
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2230
+ character(kind=c_char,len=*), intent(in) :: key
2231
+ real(KIND=c_float), pointer, intent(in) :: val(:,:,:,:)
2232
+ type(plumed_error), optional, intent(out) :: error
2233
+ integer :: valshape(4)
2234
+ if(.not.this%initialized) then
2235
+ call plumed_create(this)
2236
+ endif
2237
+ if (.not. is_contiguous(val)) then
2238
+ if (present(error)) then
2239
+ error%code=20300
2240
+ error%what="Obtained const pointer to non-contiguous data"
2241
+ return
2242
+ else
2243
+ error stop "Obtained const pointer to non-contiguous data"
2244
+ end if
2245
+ end if
2246
+ valshape = shape(val)
2247
+ call plumed_f_cmd_real_0(this%handle, key // c_null_char, c_loc(val), valshape,&
2248
+ & const=.true., nocopy=.false., error=error)
2249
+ end subroutine pl_cmd_const_ptr_real_0_4
2250
+
2251
+
2252
+ subroutine pl_cmd_val_real_1_0(this,key,val,error)
2253
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2254
+ character(kind=c_char,len=*), intent(in) :: key
2255
+ real(KIND=c_double), target, intent(in) :: val
2256
+ type(plumed_error), optional, intent(out) :: error
2257
+ integer :: valshape(0)
2258
+ if(.not.this%initialized) then
2259
+ call plumed_create(this)
2260
+ endif
2261
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2262
+ & const=.true., nocopy=.true., error=error)
2263
+ end subroutine pl_cmd_val_real_1_0
2264
+
2265
+ subroutine pl_cmd_ref_real_1_0(this,key,val,error)
2266
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2267
+ character(kind=c_char,len=*), intent(in) :: key
2268
+ real(KIND=c_double), target, intent(inout) :: val
2269
+ type(plumed_error), optional, intent(out) :: error
2270
+ integer :: valshape(0)
2271
+ if(.not.this%initialized) then
2272
+ call plumed_create(this)
2273
+ endif
2274
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2275
+ & const=.false., nocopy=.true., error=error)
2276
+ end subroutine pl_cmd_ref_real_1_0
2277
+
2278
+ subroutine pl_cmd_ptr_real_1_0(this,key,val,error)
2279
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2280
+ character(kind=c_char,len=*), intent(in) :: key
2281
+ real(KIND=c_double), pointer, intent(in) :: val
2282
+ type(plumed_error), optional, intent(out) :: error
2283
+ integer :: valshape(0)
2284
+ if(.not.this%initialized) then
2285
+ call plumed_create(this)
2286
+ endif
2287
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2288
+ & const=.false., nocopy=.false., error=error)
2289
+ end subroutine pl_cmd_ptr_real_1_0
2290
+
2291
+ subroutine pl_cmd_const_ptr_real_1_0(this,key,val,error)
2292
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2293
+ character(kind=c_char,len=*), intent(in) :: key
2294
+ real(KIND=c_double), pointer, intent(in) :: val
2295
+ type(plumed_error), optional, intent(out) :: error
2296
+ integer :: valshape(0)
2297
+ if(.not.this%initialized) then
2298
+ call plumed_create(this)
2299
+ endif
2300
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2301
+ & const=.true., nocopy=.false., error=error)
2302
+ end subroutine pl_cmd_const_ptr_real_1_0
2303
+
2304
+
2305
+ subroutine pl_cmd_val_real_1_1(this,key,val,error)
2306
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2307
+ character(kind=c_char,len=*), intent(in) :: key
2308
+ real(KIND=c_double), contiguous, target, intent(in) :: val(:)
2309
+ type(plumed_error), optional, intent(out) :: error
2310
+ integer :: valshape(1)
2311
+ if(.not.this%initialized) then
2312
+ call plumed_create(this)
2313
+ endif
2314
+ valshape = shape(val)
2315
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2316
+ & const=.true., nocopy=.true., error=error)
2317
+ end subroutine pl_cmd_val_real_1_1
2318
+
2319
+ subroutine pl_cmd_ref_real_1_1(this,key,val,error)
2320
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2321
+ character(kind=c_char,len=*), intent(in) :: key
2322
+ real(KIND=c_double), contiguous, target, intent(inout) :: val(:)
2323
+ type(plumed_error), optional, intent(out) :: error
2324
+ integer :: valshape(1)
2325
+ if(.not.this%initialized) then
2326
+ call plumed_create(this)
2327
+ endif
2328
+ valshape = shape(val)
2329
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2330
+ & const=.false., nocopy=.true., error=error)
2331
+ end subroutine pl_cmd_ref_real_1_1
2332
+
2333
+ subroutine pl_cmd_ptr_real_1_1(this,key,val,error)
2334
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2335
+ character(kind=c_char,len=*), intent(in) :: key
2336
+ real(KIND=c_double), pointer, intent(in) :: val(:)
2337
+ type(plumed_error), optional, intent(out) :: error
2338
+ integer :: valshape(1)
2339
+ if(.not.this%initialized) then
2340
+ call plumed_create(this)
2341
+ endif
2342
+ if (.not. is_contiguous(val)) then
2343
+ if (present(error)) then
2344
+ error%code=20300
2345
+ error%what="Obtained pointer to non-contiguous data"
2346
+ return
2347
+ else
2348
+ error stop "Obtained pointer to non-contiguous data"
2349
+ end if
2350
+ end if
2351
+ valshape = shape(val)
2352
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2353
+ & const=.false., nocopy=.false., error=error)
2354
+ end subroutine pl_cmd_ptr_real_1_1
2355
+
2356
+ subroutine pl_cmd_const_ptr_real_1_1(this,key,val,error)
2357
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2358
+ character(kind=c_char,len=*), intent(in) :: key
2359
+ real(KIND=c_double), pointer, intent(in) :: val(:)
2360
+ type(plumed_error), optional, intent(out) :: error
2361
+ integer :: valshape(1)
2362
+ if(.not.this%initialized) then
2363
+ call plumed_create(this)
2364
+ endif
2365
+ if (.not. is_contiguous(val)) then
2366
+ if (present(error)) then
2367
+ error%code=20300
2368
+ error%what="Obtained const pointer to non-contiguous data"
2369
+ return
2370
+ else
2371
+ error stop "Obtained const pointer to non-contiguous data"
2372
+ end if
2373
+ end if
2374
+ valshape = shape(val)
2375
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2376
+ & const=.true., nocopy=.false., error=error)
2377
+ end subroutine pl_cmd_const_ptr_real_1_1
2378
+
2379
+
2380
+ subroutine pl_cmd_val_real_1_2(this,key,val,error)
2381
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2382
+ character(kind=c_char,len=*), intent(in) :: key
2383
+ real(KIND=c_double), contiguous, target, intent(in) :: val(:,:)
2384
+ type(plumed_error), optional, intent(out) :: error
2385
+ integer :: valshape(2)
2386
+ if(.not.this%initialized) then
2387
+ call plumed_create(this)
2388
+ endif
2389
+ valshape = shape(val)
2390
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2391
+ & const=.true., nocopy=.true., error=error)
2392
+ end subroutine pl_cmd_val_real_1_2
2393
+
2394
+ subroutine pl_cmd_ref_real_1_2(this,key,val,error)
2395
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2396
+ character(kind=c_char,len=*), intent(in) :: key
2397
+ real(KIND=c_double), contiguous, target, intent(inout) :: val(:,:)
2398
+ type(plumed_error), optional, intent(out) :: error
2399
+ integer :: valshape(2)
2400
+ if(.not.this%initialized) then
2401
+ call plumed_create(this)
2402
+ endif
2403
+ valshape = shape(val)
2404
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2405
+ & const=.false., nocopy=.true., error=error)
2406
+ end subroutine pl_cmd_ref_real_1_2
2407
+
2408
+ subroutine pl_cmd_ptr_real_1_2(this,key,val,error)
2409
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2410
+ character(kind=c_char,len=*), intent(in) :: key
2411
+ real(KIND=c_double), pointer, intent(in) :: val(:,:)
2412
+ type(plumed_error), optional, intent(out) :: error
2413
+ integer :: valshape(2)
2414
+ if(.not.this%initialized) then
2415
+ call plumed_create(this)
2416
+ endif
2417
+ if (.not. is_contiguous(val)) then
2418
+ if (present(error)) then
2419
+ error%code=20300
2420
+ error%what="Obtained pointer to non-contiguous data"
2421
+ return
2422
+ else
2423
+ error stop "Obtained pointer to non-contiguous data"
2424
+ end if
2425
+ end if
2426
+ valshape = shape(val)
2427
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2428
+ & const=.false., nocopy=.false., error=error)
2429
+ end subroutine pl_cmd_ptr_real_1_2
2430
+
2431
+ subroutine pl_cmd_const_ptr_real_1_2(this,key,val,error)
2432
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2433
+ character(kind=c_char,len=*), intent(in) :: key
2434
+ real(KIND=c_double), pointer, intent(in) :: val(:,:)
2435
+ type(plumed_error), optional, intent(out) :: error
2436
+ integer :: valshape(2)
2437
+ if(.not.this%initialized) then
2438
+ call plumed_create(this)
2439
+ endif
2440
+ if (.not. is_contiguous(val)) then
2441
+ if (present(error)) then
2442
+ error%code=20300
2443
+ error%what="Obtained const pointer to non-contiguous data"
2444
+ return
2445
+ else
2446
+ error stop "Obtained const pointer to non-contiguous data"
2447
+ end if
2448
+ end if
2449
+ valshape = shape(val)
2450
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2451
+ & const=.true., nocopy=.false., error=error)
2452
+ end subroutine pl_cmd_const_ptr_real_1_2
2453
+
2454
+
2455
+ subroutine pl_cmd_val_real_1_3(this,key,val,error)
2456
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2457
+ character(kind=c_char,len=*), intent(in) :: key
2458
+ real(KIND=c_double), contiguous, target, intent(in) :: val(:,:,:)
2459
+ type(plumed_error), optional, intent(out) :: error
2460
+ integer :: valshape(3)
2461
+ if(.not.this%initialized) then
2462
+ call plumed_create(this)
2463
+ endif
2464
+ valshape = shape(val)
2465
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2466
+ & const=.true., nocopy=.true., error=error)
2467
+ end subroutine pl_cmd_val_real_1_3
2468
+
2469
+ subroutine pl_cmd_ref_real_1_3(this,key,val,error)
2470
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2471
+ character(kind=c_char,len=*), intent(in) :: key
2472
+ real(KIND=c_double), contiguous, target, intent(inout) :: val(:,:,:)
2473
+ type(plumed_error), optional, intent(out) :: error
2474
+ integer :: valshape(3)
2475
+ if(.not.this%initialized) then
2476
+ call plumed_create(this)
2477
+ endif
2478
+ valshape = shape(val)
2479
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2480
+ & const=.false., nocopy=.true., error=error)
2481
+ end subroutine pl_cmd_ref_real_1_3
2482
+
2483
+ subroutine pl_cmd_ptr_real_1_3(this,key,val,error)
2484
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2485
+ character(kind=c_char,len=*), intent(in) :: key
2486
+ real(KIND=c_double), pointer, intent(in) :: val(:,:,:)
2487
+ type(plumed_error), optional, intent(out) :: error
2488
+ integer :: valshape(3)
2489
+ if(.not.this%initialized) then
2490
+ call plumed_create(this)
2491
+ endif
2492
+ if (.not. is_contiguous(val)) then
2493
+ if (present(error)) then
2494
+ error%code=20300
2495
+ error%what="Obtained pointer to non-contiguous data"
2496
+ return
2497
+ else
2498
+ error stop "Obtained pointer to non-contiguous data"
2499
+ end if
2500
+ end if
2501
+ valshape = shape(val)
2502
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2503
+ & const=.false., nocopy=.false., error=error)
2504
+ end subroutine pl_cmd_ptr_real_1_3
2505
+
2506
+ subroutine pl_cmd_const_ptr_real_1_3(this,key,val,error)
2507
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2508
+ character(kind=c_char,len=*), intent(in) :: key
2509
+ real(KIND=c_double), pointer, intent(in) :: val(:,:,:)
2510
+ type(plumed_error), optional, intent(out) :: error
2511
+ integer :: valshape(3)
2512
+ if(.not.this%initialized) then
2513
+ call plumed_create(this)
2514
+ endif
2515
+ if (.not. is_contiguous(val)) then
2516
+ if (present(error)) then
2517
+ error%code=20300
2518
+ error%what="Obtained const pointer to non-contiguous data"
2519
+ return
2520
+ else
2521
+ error stop "Obtained const pointer to non-contiguous data"
2522
+ end if
2523
+ end if
2524
+ valshape = shape(val)
2525
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2526
+ & const=.true., nocopy=.false., error=error)
2527
+ end subroutine pl_cmd_const_ptr_real_1_3
2528
+
2529
+
2530
+ subroutine pl_cmd_val_real_1_4(this,key,val,error)
2531
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2532
+ character(kind=c_char,len=*), intent(in) :: key
2533
+ real(KIND=c_double), contiguous, target, intent(in) :: val(:,:,:,:)
2534
+ type(plumed_error), optional, intent(out) :: error
2535
+ integer :: valshape(4)
2536
+ if(.not.this%initialized) then
2537
+ call plumed_create(this)
2538
+ endif
2539
+ valshape = shape(val)
2540
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2541
+ & const=.true., nocopy=.true., error=error)
2542
+ end subroutine pl_cmd_val_real_1_4
2543
+
2544
+ subroutine pl_cmd_ref_real_1_4(this,key,val,error)
2545
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2546
+ character(kind=c_char,len=*), intent(in) :: key
2547
+ real(KIND=c_double), contiguous, target, intent(inout) :: val(:,:,:,:)
2548
+ type(plumed_error), optional, intent(out) :: error
2549
+ integer :: valshape(4)
2550
+ if(.not.this%initialized) then
2551
+ call plumed_create(this)
2552
+ endif
2553
+ valshape = shape(val)
2554
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2555
+ & const=.false., nocopy=.true., error=error)
2556
+ end subroutine pl_cmd_ref_real_1_4
2557
+
2558
+ subroutine pl_cmd_ptr_real_1_4(this,key,val,error)
2559
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2560
+ character(kind=c_char,len=*), intent(in) :: key
2561
+ real(KIND=c_double), pointer, intent(in) :: val(:,:,:,:)
2562
+ type(plumed_error), optional, intent(out) :: error
2563
+ integer :: valshape(4)
2564
+ if(.not.this%initialized) then
2565
+ call plumed_create(this)
2566
+ endif
2567
+ if (.not. is_contiguous(val)) then
2568
+ if (present(error)) then
2569
+ error%code=20300
2570
+ error%what="Obtained pointer to non-contiguous data"
2571
+ return
2572
+ else
2573
+ error stop "Obtained pointer to non-contiguous data"
2574
+ end if
2575
+ end if
2576
+ valshape = shape(val)
2577
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2578
+ & const=.false., nocopy=.false., error=error)
2579
+ end subroutine pl_cmd_ptr_real_1_4
2580
+
2581
+ subroutine pl_cmd_const_ptr_real_1_4(this,key,val,error)
2582
+ class(plumed), intent(inout) :: this ! inout to allow for initialization
2583
+ character(kind=c_char,len=*), intent(in) :: key
2584
+ real(KIND=c_double), pointer, intent(in) :: val(:,:,:,:)
2585
+ type(plumed_error), optional, intent(out) :: error
2586
+ integer :: valshape(4)
2587
+ if(.not.this%initialized) then
2588
+ call plumed_create(this)
2589
+ endif
2590
+ if (.not. is_contiguous(val)) then
2591
+ if (present(error)) then
2592
+ error%code=20300
2593
+ error%what="Obtained const pointer to non-contiguous data"
2594
+ return
2595
+ else
2596
+ error stop "Obtained const pointer to non-contiguous data"
2597
+ end if
2598
+ end if
2599
+ valshape = shape(val)
2600
+ call plumed_f_cmd_real_1(this%handle, key // c_null_char, c_loc(val), valshape,&
2601
+ & const=.true., nocopy=.false., error=error)
2602
+ end subroutine pl_cmd_const_ptr_real_1_4
2603
+
2604
+
2605
+ ! copy, including deep copy of nested errors
2606
+ ! this should be fortran default copy but
2607
+ ! fails on gfortran, so it is reimplemented here
2608
+ ! see https://godbolt.org/z/9dM6vj5bo
2609
+ impure elemental subroutine pl_error_assign(this,that)
2610
+ class(plumed_error),target,intent(out) :: this
2611
+ class(plumed_error),target,intent(in) :: that
2612
+ type(plumed_error), pointer :: that_ptr, this_ptr
2613
+ that_ptr => that
2614
+ this_ptr => this
2615
+ do
2616
+ this_ptr%code = that_ptr%code
2617
+ this_ptr%what = that_ptr%what
2618
+ if(.not. allocated(that_ptr%nested)) exit
2619
+ allocate(this_ptr%nested)
2620
+ this_ptr => this_ptr%nested
2621
+ that_ptr => that_ptr%nested
2622
+ end do
2623
+ end subroutine pl_error_assign
2624
+
2625
+ end module plumed_f08_module