Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome
Guest
Forum Home
Login
Register
PhreeqcUsers Discussion Forum
»
Processes
»
Reactive transport modelling
»
Readring DumpString in PhreeqcRM
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Readring DumpString in PhreeqcRM (Read 1778 times)
bsh14
Contributor
Posts: 1
Readring DumpString in PhreeqcRM
«
on:
16/08/19 20:17 »
Hello,
We are trying to couple a transport code with PhreeqcRM where we need to retrieve the DumpString in the transient loop. In one of the previous threads in the Forum following appraoch was proposed by Dr. Parkhurst when using IPhreeqc:
SetDumpStringOn(true);
RunString("DUMP; -all");
mydump = new std::string(GetMyDumpString());
...
RunString(mydump.c_str())
We were wondering how can we implement this in PhreeqcRM in a way that we can save and retrieve state more efficiently?
Thank you for your time,
Logged
dlparkhurst
Global Moderator
Posts: 4067
Re: Readring DumpString in PhreeqcRM
«
Reply #1 on:
17/08/19 03:26 »
There is not a method for producing a dump string in PhreeqcRM. There is only a method to dump the state to a file with the DumpModule method. It can be either a compressed .gz file if PhreeqcRM is compiled with the USE_GZ ifdef, or a straight text file if the USE_GZ is not defined for the compilation.
If you are not running in parallel--only a single worker IPhreeqc object--it is possible to get the the pointer to the IPhreeqc object and use the IPhreeqc method GetDumpString.
If you are using parallelization with OpenMP, you can get pointers to all of the worker IPhreeqc instances, and use the IPhreeqc method do dump each IPhreeqc in sequence.
The DumpModule method is in PhreeqcRM.cpp. There are different methods for parallelization by MPI and OpenMP, but the basic idea is to dump the data from each worker, retrieving from the multiple processes if using MPI, and saving the data in StorageBin objects. The StorageBin objects are then written to file sequentially. It would not be too difficult to write similar methods that write the StorageBin objects to a string.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
PhreeqcUsers Discussion Forum
»
Processes
»
Reactive transport modelling
»
Readring DumpString in PhreeqcRM