aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Carpet: bugfix in synchronisation of grid arraysThomas Radke2005-10-21
| | | | darcs-hash:20051021170144-776a0-9ddbd39fc898bd30408dcf1f4c9dd00376785789.gz
* Carpet: Correct processor distribution when a local grid size is specifiedErik Schnetter2005-10-14
| | | | darcs-hash:20051014131935-891bb-a9f41272a64fa41882449afc3ab7a57c08f7f6c2.gz
* Carpet: Add TODO comment to processor distributionErik Schnetter2005-10-14
| | | | darcs-hash:20051014131917-891bb-18350ca8878fd5666c3bc647dc18639a542f6571.gz
* Carpet: Remove duplicate statements in grid setupErik Schnetter2005-10-14
| | | | darcs-hash:20051014131842-891bb-947630797abbac665f0c0728179c6edbbd83dfa0.gz
* Carpet: Output model name of current processorErik Schnetter2005-10-14
| | | | darcs-hash:20051014131820-891bb-261b636cb367ff307ba0410af929b047a93e9974.gz
* CarpetInterp: Assert that all output arrays are distinctErik Schnetter2005-10-12
| | | | darcs-hash:20051012154607-891bb-b57ce420a1e16fd201bb9503812b4dfac3af1ea0.gz
* CarpetInterp: Take delta_time into account when calculating time derivativesErik Schnetter2005-10-12
| | | | darcs-hash:20051012154424-891bb-b7e49cb929704962757c372f5648b9424592ee34.gz
* CarpetIOHDF5: implement "out_unchunked" option for individual variables to ↵Thomas Radke2005-10-05
| | | | | | | | | | be output Apart from setting the parameter IO::out_unchunked to choose the output mode for all variables, this can be overridden for individual variables in an option string appended to the variable's name in the IOHDF5::out_vars parameter. darcs-hash:20051005100152-776a0-9f6f2e4b691a46b12aefab555440625f39836aaf.gz
* CarpetTest: fix names for grid array sizesThomas Radke2005-09-26
| | | | | | | | The (internal) variable names as passed in CCTK_ARGUMENTS to specify CCTK array grid sizes have changed recently. This patch fixes carpettest_check_arguments.F77 to follow the new naming scheme. darcs-hash:20050926114726-776a0-5ecc42489aabdc6a3324e0829f7a0f46a44e0021.gz
* CarpetLib: permute order of member initializers in comm_state::procbufdesc() ↵Jonathan Thornburg2005-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constructor to match declaration order Long comment for this patch =========================== C++ guarantees that an object's members will be destroyed in the reverse order from the order in which they were constructed. (This is A Good Thing; if nothing else, it's essential for exception-safety, since it's possible for an exception to be thrown part-way through the construction of an object.) Since there might be multiple constructors, and it would be expensive (slow!) to keep a run-time record of the actual order in which various constructors constructed things, C++ fixes a standard order, namely the order in which the members are declared, and always uses that. (Hence C++ destructors, including ones automagically generated by the compiler, always destroy members in reverse-declaration order.) That is, if you declare a class (or struct) class foo { int A, B, C; foo(); }; then the 3 members will ALWAYS be initialized in the order A,B,C, and destroyed in the order C,B,A, whether you write the constructor like this foo::foo: A(69), B(105), C(42) { } // version 1 or like this foo::foo: B(105), C(42), A(69) { } // version 2 So far all is well. But look what happens if you use one member in the calculation of another member's initializer, eg foo::foo: A(69), B(A+36), C(42) { } // version 3 This is still ok... but if we now use a different order for the member initializers, foo::foo: B(105), C(42), A(B-36) { } // version 4 then disaster strikes: As explained above, even though they were written in the order B,C,A, these initializers will actuallly be executed in the order the members were delcared, i.e. A,B,C. This means that the A initializer will use the not-yet-initialized (and hence garbage) value of B , and hence will initialize A to a garbage value. Alternatively, starting with the version 3 constructor, if someone now permutes the declarations of A, B, and C such that B is declared before A, then the same disaster will strike again (B will be "initialized" to garbage). There are two standard rules of C++ style which exist precisely to avoid this problem: 1. ALWAYS write member initializers in the same order as the members are declared. Many C++ compilers will in fact give a warning if you violate this rule. 2. Prefer to not use the value of any member in the calculation of the initializer for any other member. If you need to violate this rule, there should be a comment on both the declaration of the members, and on the initializers, that the code relies on a particular ordering. For more details see, for example, item 13 in Meyeres "Effective C++". Ok, given all this explanation... the purpose of *this* patch is to fix the comm_state::procbufdesc() constructor to comply with rule #1 (in this case the code is still correct even when violating that rule, but it's cleaner style to always comply.) Previously g++ had warned of the violation: In file included from /home/jonathan/cactus/Cactus/arrangements/Carpet/CarpetLib/src/gdata.hh:13, from /home/jonathan/cactus/Cactus/arrangements/Carpet/CarpetLib/src/data.hh:14, from /home/jonathan/cactus/Cactus/configs/gzmultipatch-tofu-mp/bindings/include/data.hh:4, from /home/jonathan/cactus/Cactus/arrangements/Carpet/Carpet/src/variables.hh:21, from /home/jonathan/cactus/Cactus/arrangements/Carpet/Carpet/src/carpet_public.hh:11, from /home/jonathan/cactus/Cactus/configs/gzmultipatch-tofu-mp/bindings/include/carpet.hh:4, from /home/jonathan/cactus/Cactus/configs/gzmultipatch-tofu-mp/build/GZPatchSystem/patch/angular_interpatch_ghost_zone.cc:45: /home/jonathan/cactus/Cactus/arrangements/Carpet/CarpetLib/src/commstate.hh: In constructor `comm_state::procbufdesc::procbufdesc()': /home/jonathan/cactus/Cactus/arrangements/Carpet/CarpetLib/src/commstate.hh:93: warning: ` comm_state::procbufdesc::recvbuf' will be initialized after /home/jonathan/cactus/Cactus/arrangements/Carpet/CarpetLib/src/commstate.hh:83: warning: `char*comm_state::procbufdesc::sendbufbase' darcs-hash:20050921145044-b0a3f-b59f991ea43729fd06fca6a5ea5d7397cefebbc3.gz
* CarpetIOHDF5: respect setting of out_unchunked parameter also in ↵Thomas Radke2005-09-18
| | | | | | | | | | single-processor runs For single-processor runs, CarpetIOHDF5 unconditionally wrote HDF5 output files in unchunked format. Like for multi-processor runs, the user can now choose between chunked and unchunked through the out_unchunked parameter. darcs-hash:20050918214401-776a0-882e8b1e6dcee4d25330bc11d4b6973e297f1a52.gz
* CarpetReduce: tag CarpetReduce::weight with 'checkpoint="no"'Thomas Radke2005-09-13
| | | | | | The weight is set up at basegrid so it doesn't need to be checkpointed/recovered. darcs-hash:20050913163020-776a0-a171ae3372b9e38ad521a7db85470a8741088b46.gz
* CarpetIOHDF5: don't checkpoint variables tagged as 'checkpoint="no"'Thomas Radke2005-09-13
| | | | darcs-hash:20050913162936-776a0-7b3fa7d3f08c37321b6ea836178168131fa98964.gz
* CarpetIOHDF5: update thorn documentationThomas Radke2005-09-13
| | | | | | | | | Document that when invoking the CarpetIOHDF5 output method via the flesh API this must be done in level mode. Also document how to trigger the output of the same variable at intermediate timesteps. darcs-hash:20050913162656-776a0-bdc0dda2138176f9aea3baee6586070455e2dbc5.gz
* CarpetIOHDF5: fixed a problem with IOHDF5::use_reflevels_from_checkpoint = ↵Thomas Radke2005-09-06
| | | | | | | | | | | "yes" during recovery When IOHDF5::use_reflevels_from_checkpoint is set, the parameter CarpetLib::refinement_levels is steered to take the number of levels found in the checkpoint. This steering used to happen during parameter recovery where it didn't have any effect if the parameter had been set in the parfile already. Now it's done in a separate routine scheduled at STARTUP. darcs-hash:20050906140808-776a0-bae608c103b161ac67690da2a8803bdff84cf2f4.gz
* CarpetLib: forward-declare output operatorswhite2005-08-29
| | | | | | | Made to compile under g++ 4.1.0, which is fussy about declaration of template members. darcs-hash:20050829213105-32473-7c353b607f09ae254eb7327b32deda6045539fc5.gz
* CarpetInterp: bugfix in routine which maps points onto componentsThomas Radke2005-08-29
| | | | darcs-hash:20050829151032-776a0-95a8c84bd10d434d1dee4c47894ab2f4276836ae.gz
* CarpetInterp: copy interpolation results directly into output arrays, ↵Thomas Radke2005-08-27
| | | | | | without requiring an intermediate copy operation darcs-hash:20050827111420-776a0-1e41fee0c43d1e7f7eda3c26450fff250035ea7c.gz
* Carpet: Always output all model names for multi-modelErik Schnetter2005-08-26
| | | | darcs-hash:20050826144658-891bb-ea391305e2eddae6d2f615119db97cbadb427f43.gz
* Carpet: Remove some unnecessary static_castsErik Schnetter2005-08-26
| | | | darcs-hash:20050826144641-891bb-1649b226dc652d71322f4339a55db82c578f88a4.gz
* Carpet: Pass MPI communicators as pointers instead of intsErik Schnetter2005-08-26
| | | | | | | | | Pass MPI communicators as pointers instead of ints because they may not be implemented as ints. Use MPI_COMM_NULL instead of -1 as illegal communicator. darcs-hash:20050826144511-891bb-324a5d22efcbbd53cac35899e30559b06cfdfdb6.gz
* CarpetInterp: optimise global interpolator communication schemeThomas Radke2005-08-26
| | | | | | | | | | | | CarpetInterp used to use CarpetLib's data class to exchange interpolation information (interpolation coordinates and a source map as inputs, interpolation results and status/return codes as outputs) between processors. This point-to-point communication has been replaced by explicit collective MPI operations which should now make global interpolations faster. For a general overview on the implementation see CarpetInterp's thorn documentation. darcs-hash:20050826115157-776a0-d910b51d7a26cef12e13408a79f11ed2826f5ed1.gz
* Carpet: Allow multi-model simulationsErik Schnetter2005-08-25
| | | | | | | | | | Split MPI_COMM_WORLD according to a new parameter Carpet::model into different sets, and evolve these sets independently. Add aliased functions to query the MPI communicators for this simulation and for all models. darcs-hash:20050825084739-891bb-7f102b46ec495f884be5197eaf077eef93f89dac.gz
* CarpetLib: Initialise Carpet's MPI communicator with an arbitrary communicatorErik Schnetter2005-08-25
| | | | | | | Initialise Carpet's MPI communicator not with MPI_COMM_WORLD, but with a communicator that is passed in. darcs-hash:20050825084335-891bb-38744ff9cbfb5349e34676897dba3356ef7e462e.gz
* CarpetWeb: Update link to Whisky web pagesErik Schnetter2005-08-24
| | | | darcs-hash:20050824145010-891bb-0173d254969a5c9123aae3882f461d03434f936c.gz
* CarpetWeb: Add August 2005 status reportErik Schnetter2005-08-24
| | | | darcs-hash:20050824144936-891bb-4519b3de89acb2fa1a0fe82443fab9cece3d0549.gz
* CarpetInterp: Remove commented out assertErik Schnetter2005-08-24
| | | | darcs-hash:20050824113516-891bb-b3b73b0c0bc89ad54bd64d6919621e7a76d6accc.gz
* CarpetIOHDF5: bugfix for outputting the same variable into multiple filesThomas Radke2005-08-23
| | | | | | | | | | Before a variable is output it is checked whether it has been output already during the current iteration (eg. due to triggers). This check was only variable-based and therefore caused problems when the same variable was to be output to multiple files (using different alias names). Now the check has been extended to also take the output filenames into account. darcs-hash:20050823135345-776a0-1555987b4aee34bb646e67f491375dbcc44dddad.gz
* CarpetLib: bugfix in collective commbuffer schemeThomas Radke2005-08-16
| | | | | | | | | The low-level routine gdata::change_processor() wasn't aware of the collective commbuffers communication scheme. This caused problems with CarpetInterp which still uses this function in order to communicate data. But not for long anymore, another patch is waiting already to be pushed. darcs-hash:20050816135442-776a0-60371ebba14505a9d402bb08a9b0696d4b3d4702.gz
* Carpet*: generalise the comm_state class for collective buffer communicationsThomas Radke2005-08-15
| | | | | | | | | CarpetLib's comm_state class (actually, it's still just a struct) has been extended to handle collective buffer communications for all possible C datatypes at the same time. This makes it unnecessary for the higher-level communication routines to loop over each individual datatype separately. darcs-hash:20050815150023-776a0-dddc1aca7ccaebae872f9f451b2c3595cd951fed.gz
* CarpetEvolutionMask: Handle outer buffer zonesErik Schnetter2005-08-12
| | | | | | Do not shrink the domain if the buffer zones are outer. darcs-hash:20050812143317-891bb-5e95257cd7a5685fbcc02985e5802e3f1e070a78.gz
* CarpetLib: Implement fast recomposingErik Schnetter2005-08-11
| | | | | | | | For each refinement level that is to be recomposed, check whether it has the same structure as before, and if so, do nothing. This is controlled by a new flag CarpetLib::fast_recomposing. darcs-hash:20050811120347-891bb-f937c21ddeac7d909cae41d487e9fd74a5ce8cc8.gz
* CarpetInterp: Remove support for optional argument "interpolation_times"Erik Schnetter2005-08-11
| | | | | | | | | | The optional argument "interpolation_times" allowed interpolating not at the current time (cctk_time), but at a slightly earlier time, if there were enough time levels present. This feature was unused and broken. darcs-hash:20050811170146-891bb-db58ea38ca8160729f9c8a53d17db2381dc27535.gz
* CarpetInterp: Test also time derivatives in the test casesErik Schnetter2005-08-11
| | | | darcs-hash:20050811163508-891bb-a25e3c59937a75684218fde1cf4fafd19087f2c9.gz
* CarpetInterp: Update waveinterp test casesErik Schnetter2005-08-11
| | | | | | | Update the waveinterp test cases after correcting three timelevel initialisation. darcs-hash:20050811113402-891bb-b40f5401b44d626bda9611de2622a77395c16295.gz
* Carpet: Clean up outer-buffers.par fileErik Schnetter2005-08-10
| | | | darcs-hash:20050810192718-891bb-91b71ce58755065f6846a5bd40686c9953f3d1a6.gz
* Carpet: Correct three timelevel initialisationErik Schnetter2005-08-10
| | | | | | | | There was another error in the three timelevel initialisation. The first backwards time step did not have enought coarser level time steps for the necessary prolongation operations. darcs-hash:20050810192602-891bb-ba9ed7d58dea6a3ddbf59be0fa6baa1ede509963.gz
* CarpetInterp: Use explicit source map specifications even in single map modeErik Schnetter2005-08-10
| | | | darcs-hash:20050810170009-891bb-168facf88ab10cc5c1732d037527a66bc134453c.gz
* CarpetInterp: Make time_deriv_order per output array instead of per grid pointErik Schnetter2005-08-10
| | | | | | | Interpret the option table parameter time_deriv_order per output array instead of per grid point. darcs-hash:20050810165758-891bb-a4b84c90771da42c20878ebd59a797ef44a29b78.gz
* CarpetInterp: Remove commented out codeErik Schnetter2005-08-10
| | | | darcs-hash:20050810170107-891bb-bc5b8fa8a90d7289c0c7d76f3ad4a00aa3c1038f.gz
* CarpetEvolutionMask: New thornErik Schnetter2005-08-10
| | | | | | | | Provide a grid function "evolution_mask" which is zero for all grid points that do not need to be evolved because they are going to be restrict from a finer grid. darcs-hash:20050810125908-891bb-3a6441b6cd41b7bafda6a42c672925ac98fbb668.gz
* CarpetLib: typo in push of << operatorSteve White2005-08-09
| | | | | | | | | This fixes a typo in the previous push. I also took the opportunity to bring the patch into better compliance with the coding style. darcs-hash:20050809143402-90671-5feae89e34e29f1648b31a66d97d578a5b283f1b.gz
* CarpetInterp: Correct time interpolation stencilsErik Schnetter2005-08-11
| | | | darcs-hash:20050811170351-891bb-b7c586cb8494f23fac7254f169a1a2aeec523f97.gz
* CarpetLib: give data an << operatorSteve White2005-08-09
| | | | | | | | | | Added a ostream & << operator for the data class. Made an explicit instantiation for CCTK_REAL. Usually the amount of data renders such an operator useless, but in test programs it is handy to be able to just print the data values. darcs-hash:20050809093318-90671-dd30c55dc8757efa96a9bfbe90a48ff445e26f07.gz
* Carpet: Add test case for outer buffer zonesErik Schnetter2005-08-09
| | | | darcs-hash:20050809093357-891bb-88b8f8019ddd2c088e8fbe326f45a9d0eea34114.gz
* Carpet: Use outer buffer zonesErik Schnetter2005-08-09
| | | | | | | | | | | | | | | | Deprecated the previous buffer zone mechanism. Introduce new parameters Carpet::use_outer_buffer_zones and Carpet::num_integrator_substeps. The number of buffer zones are then calculated automatically, and are added to the outer edge of the grid instead of reducing the domain. Adapt to the API change of the dh class. Both new and old style buffer zones can exist at the same time, although I would not do that. darcs-hash:20050809091707-891bb-c25d68de3b04b03c06078aaee39f389b67f1416a.gz
* CarpetLib: Add outer buffer zonesErik Schnetter2005-08-08
| | | | | | | | | | | | | | | | | | | | | Rename the previous buffer zones to "inner buffer zones". Introduce additional "outer buffer zones". Their meaning is the same, except that inner buffer zones are taken from the computational domain, making it smaller, while outer buffer zones are added to the outside, similar to ghost zones. This makes them easier to handle, both internally in Carpet and for the end user. This changes the API of the dh class. There is a new field "is_interproc" in the "dboxes" structure; it specifies whether the whole boundary is an interprocessor boundary. (Note that boundaries can be partly interprocessor and partly refinement boundaries.) Both kinds of buffer zones can exist at the same time, although I would not do that. darcs-hash:20050808200647-891bb-9d9a8eefaf7bcb665d09869a8b564f3769d2ecc2.gz
* Carpet: Correct problems with negative time stepsErik Schnetter2005-08-09
| | | | | | | | | | | | When converting from physicsl time steps (delta_time) to Carpet's time steps (th::delta_time), do not divide by abs(delta_time), but by delta_time instead. When evolving backwards in time while initialising three time levels, change the sign of the physical time steps only, not the sign of Carpet's time steps. darcs-hash:20050809084940-891bb-2517b1568696c71278a98db6261515817a90247a.gz
* Carpet: Handle negative time steps correctly during prolongationErik Schnetter2005-08-08
| | | | darcs-hash:20050808194745-891bb-74c3f74d1b5a5886ea63e11671aa7f425d5a8daa.gz
* CarpetIOASCII: Repair outputting all time levelsErik Schnetter2005-08-08
| | | | | | Use positive time levels when outputtting all time levels. darcs-hash:20050808180907-891bb-7fdf3f70084dbcd9bc49d6b50869de8774032805.gz