aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/data.hh
Commit message (Collapse)AuthorAge
* CarpetLib: Reorganise prolongation and restriction operatorsErik Schnetter2007-01-12
| | | | | | | | | | | | | | | | | | | | | | | | Reorganise prolongation and restriction operators. This is a major implementation change. Most operators are now written as C++ templates instead of as Fortran 77 code. This simplifies the code, since C++ routines can be called more easily, and they also have access to CarpetLib's high-level data structures. Previously, the operators combined temporal and spatial interpolation. Now, time interpolation and space interpolation are handled separately. This may be less efficient, but simplifies the code significantly, since there are now N+M instead of N*M routines, for N time interpolation and M space interpolation methods. Remove the minmod prolongation operator, which was previously disabled. Add support for cell centering, using a method described by Simon Hern, and suggested for Carpet by Ian Hawke. darcs-hash:20070112205812-dae7b-5329795aa698e7bbc3671b1504134885dd830238.gz
* CarpetLib: Don't include <iosfwd> into data.hhErik Schnetter2005-11-19
| | | | darcs-hash:20051119203113-dae7b-837c1382a1c39767bf998a8c78c96310d4d28754.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
* 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
* 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
* CarpetLib: Forbid copying data<T> objectsErik Schnetter2005-04-11
| | | | darcs-hash:20050411183135-891bb-5d2ced682685fb55a00da1864560e54bd113f765.gz
* CarpetLib: Correct errors in handling mem<T> objectsErik Schnetter2005-04-11
| | | | | | | I think there were some errors in handling the mem<T> objects, but I'm not completely sure. darcs-hash:20050411183030-891bb-f1b5510bb4866c8d4bab48a7b320cb6de71b1121.gz
* CarpetLib: Remove unused function transfer_fromErik Schnetter2005-04-11
| | | | darcs-hash:20050411182954-891bb-6f141054635439136d978f98f528af1204919199.gz
* CarpetLib: Introduce new class mem<T> for memory managementErik Schnetter2005-03-05
| | | | | | | | | | | | | | | | | | | Introduce a new class mem<T> for memory management. Memory management has become sufficiently complicated to move into its own class. The class mem<T> features: 1. Allocating nelem items of type T 2. Managing contiguous regions of memory for several data<T> objects for vector groups 3. Allowing a pointer to a memory region to be passed in, which is used instead of allocating memory through new 4. Reference counting, so that the mem<T> object only goes away once the last using data<T> object does not need it any more. This makes it unnecessary to delete the first data<T> objects for a grid function group last. darcs-hash:20050305174647-891bb-e1f53adca34e5a668af96c662845cca0f259f8e6.gz
* CarpetLib: make fill_bbox_arrays() a static non-template function in data.cctradke2005-03-16
| | | | darcs-hash:20050316130144-3fd61-1f95c63b76c29de63f212546b5e4fa226afe7299.gz
* CarpetLib: Small cleanups to vector group storage handlingErik Schnetter2005-03-03
| | | | darcs-hash:20050303101420-891bb-6c23d70652146f074a392970443190966c909d10.gz
* CarpetLib: Whitespace changesErik Schnetter2005-03-03
| | | | darcs-hash:20050303101349-891bb-251f1432b873c898f73e0315ed63a7764f8714e8.gz
* CarpetLib: Restructure lightweight communication buffersErik Schnetter2005-01-03
| | | | | | | Restructure the lightweight communication buffers. Use lightweight communication buffers for interpolation as well. darcs-hash:20050103200712-891bb-7e42816d3b8d667916084e3f32527c8f35327d7f.gz
* CarpetLib: Rename data::interpolate_in_time to ↵Erik Schnetter2005-01-03
| | | | | | data::try_without_time_interpolation darcs-hash:20050103135332-891bb-e92a19212dfbadde889fda0760232f5b7749aac3.gz
* CarpetLib: Add lightweight communication buffers (untested)Erik Schnetter2005-01-02
| | | | | | | | | | | Lightweight communication buffers use essentially only a vector<T> instead of a data<T> to transfer data between processors. This should reduce the computational overhead. Set the parameter "use_lightweight_buffers" to use this feature. This feature is completely untested. darcs-hash:20050102173524-891bb-6a3999cbd63e367c8520c175c8078374d294eaa8.gz
* CarpetLib: Remove many this-> prefixes in class dataErik Schnetter2005-01-01
| | | | darcs-hash:20050101185718-891bb-143c84dacf00f458eed1b9c985900bbaf5e3b98b.gz
* global: Turn CarpetLib templates into classesErik Schnetter2005-01-01
| | | | | | | | | | | | | | | | | | | Turn most of the templates in CarpetLib, which used to have the form template<int D> class XXX into classes, i.e., into something like class XXX by setting D to the new global integer constant dim, which in turn is set to 3. The templates gf and data, which used to be of the form template<typename T, int D> class XXX are now of the form template<typename T> class XXX The templates vect, bbox, and bboxset remain templates. This change simplifies the code somewhat. darcs-hash:20050101182234-891bb-c3063528841f0d078b12cc506309ea27d8ce730d.gz
* global: Remove $Header$ keywords from Carpet arrangementErik Schnetter2005-01-01
| | | | darcs-hash:20050101162121-891bb-ac9d070faecc19f91b4b57389d3507bfc6c6e5ee.gz
* CarpetLib: Make data class conform closer to C++ standardErik Schnetter2004-12-28
| | | | | | | | Add missing this-> prefixes Declare template specialisation before definigg it Rename some local variables to avoid name clashes darcs-hash:20041228183523-891bb-acc5a1a8c1f247512a38dba56ff5419d96280fa3.gz
* CarpetLib: Clean up fill_box_array functionErik Schnetter2004-12-25
| | | | | | | | | | Rename it to fill_bbox_array. Declare it in a better place in the header file. Make it not virtual. Change pointer arguments to arrays. Change hard-coded number 3 to D. darcs-hash:20041225202612-891bb-e6249d004fdf0b3d8d24cbf8e5a4ae713786bdfb.gz
* CarpetLib: Introduce parameter to post MPI_Irecv and MPI_Isend at the same timeErik Schnetter2004-12-08
| | | | | | | | | Introduce parameter a parameter to post MPI_Irecv and MPI_Isend at the same time. Use two queues instead of one vector to store the MPI_Requests. darcs-hash:20041208222541-891bb-c7c8994a0c41b6cfb37f6dc023bc1172238f3619.gz
* CarpetLib/src/data.* interpolate_from_innerloop breakdownswhite2004-12-09
| | | | | | | | | | | | | | | | | Broke down monster function data::interpolate_from_innerloop to make its overall logic visible. Added three functions void data::Check_that_the_times_are_consistent bool data::interpolate_in_time void data::interpolate_prolongate void data::interpolate_restrict Made constant 'eps' to be static file scope. Got rid of another nasty surprise return. darcs-hash:20041209121013-32473-e3164f151ce8a67871459c847e1f779a1f6d40fc.gz
* data_fill_box_arraysswhite2004-11-29
| | | | | | | | | | | | | Pulled out repeated code into single routine data::fill_box_arrays. While this is an improvement, I don't like the fact that I've had to expose the ugly funciton in the data.hh interface, even as private. It was necessary because the inappropriate declaration of ibbox as an internal type (of inexplicit access) of the data class. Down the road, make a separate ibbox declaration. darcs-hash:20041129175753-32473-a0f983bbaf22ff404cd89a0db814faca0a8f0a7b.gz
* CarpetLib: Implement using MPI_Waitall for communicatingErik Schnetter2004-11-24
| | | | | | | | Add a parameter CarpetLib::use_waitall that switches from using a series of MPI_Wait statements to using a single MPI_Waitall statement. This might improve performance on many processors. darcs-hash:20041124235118-891bb-034efea054db236a187022b1858e4574da867fa3.gz
* Remove CVS header tagsErik Schnetter2004-09-18
| | | | | | Replace all CVS header tags with the standard "$Header:$". darcs-hash:20040918132147-891bb-dea889bdd94a479ec412d14d08e9efca63e5c24d.gz
* Correct wrong comment.schnetter2004-06-08
| | | | darcs-hash:20040608205722-07bb3-9e14f4d2c51a9ae07887c911270fe8329b0b6ed5.gz
* Ensure that vector leaders are handled consistentlyschnetter2004-04-22
| | | | darcs-hash:20040422121713-07bb3-1ef5a3ac1752f5f05d3e010bf9390bc6cff7ea79.gz
* Commentschnetter2004-04-13
| | | | darcs-hash:20040413091349-07bb3-52f2c2f87c5c51b61b6cc2d609d985b1e24a846b.gz
* Abort with an error message if CarpetLib cannot allocate memory forschnetter2004-04-08
| | | | | | | Abort with an error message if CarpetLib cannot allocate memory for grid functions. Also track how much memory is already used. darcs-hash:20040408091635-07bb3-3385e3472c428b3aa562d6ab76f2f6ca32b77f19.gz
* Fix indentationschnetter2004-03-23
| | | | darcs-hash:20040323143721-07bb3-82c87a31b23f2fe7d42708f1415fb413b50733c8.gz
* Implement vector groups correctlyschnetter2004-03-23
| | | | darcs-hash:20040323114027-07bb3-1ac44b7b144e8936307942bc999d54ecb579719f.gz
* Move MPI request and tag handling from data to gdataschnetter2004-03-23
| | | | darcs-hash:20040323111429-07bb3-08a8c6b8d729eb0efc5b757b61401b14712d790c.gz
* Import the recently announced changes:schnetter2004-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import the recently announced changes: 1. Carpet has now an infrastructure for multiple maps (aka "grid patches"). Instead of a single grid hierarchy there can now be several. This is largely untested, because the remainder of Cactus cannot handle multiple coordinate systems. 2. The order in which the schedule bins are called has changed. As Ian Hawke pointed out, the previous order during time evolution was inconsistent. The initial data ordering did not allow for recovering and was not usable for progressively solving elliptic equations for initial data. 3. Carpet now supports convergence levels. The convergence level specifies by how many factors of two the resolution in the parameter file should be coarsened (or refined, if negative). This should make convergence tests and test runs much easier. It is, in principle, also possible to run several convergence levels at once. This has not been tested because the remainder of Cactus cannot handle multiple resolutions. This will be necessary for a multigrid solver, and also for having a shadow hierarchy to determine where to refine adaptively. 4. Carpet works together with the new CoordBase domain specification parameters. Without these, using convergence levels will lead to very strange results. 5. The "modes" have changed. There are now: meta mode: the whole simulation global mode: one convergence level level mode: one refinement level singlemap mode: one map on one refinement level local mode: as previously The whole mode handling has been cleaned up. 6. The regridding thorn has been cleaned up. 7. The kind of prolongation stencil is now determined in Carpet, i.e. at a fairly hight level, instead of in CarpetLib. 8. The low-order prolongation operators have been made much more efficient (as have previously the higher-order ones). 9. Assorted smaller changes. For Carpet users, there should be no major incompatibilities. The major improvements are 3 and 4 combined. Here is an example: CoordBase::domainsize = extent CoordBase::spacing = gridspacing CoordBase::zero_origin_x = yes CoordBase::zero_origin_y = yes CoordBase::zero_origin_z = yes CoordBase::xextent = 20.0 CoordBase::yextent = 20.0 CoordBase::zextent = 20.0 CoordBase::dx = 1.0 CoordBase::dy = 1.0 CoordBase::dz = 1.0 CoordBase::boundary_shiftout_x_lower = 1 CoordBase::boundary_shiftout_y_lower = 1 CoordBase::boundary_shiftout_z_lower = 1 Carpet::domain_from_coordbase = yes Carpet::convergence_level = 0 grid::type = coordbase grid::domain = octant grid::avoid_origin = no This gives you a grid that extends from the origin ("zero_origin") up to 20.0 with a grid spacing of 1.0. Symmetry zones and boundary zones are added automatically. The "shiftout" says that there is no boundary point on the origin. The staggering parameters (not shown) default to "no". In order to change the resolution, only the convergence level has to be adjusted. Note that the old way of specifying the domain extent still works. For Carpet developers, one major change is the new mode handling. As described in 5, the looping macros (that loop over all refinement levels, or all components) have changed. darcs-hash:20040125135727-07bb3-51c9647c1b5080e7e180b52a1b81fa155cfd19e9.gz
* Many changes that accumulated while Cactus and Carpet diverged.schnetter2003-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many changes that accumulated while Cactus and Carpet diverged. Add processor splitting mechanism "along-dir" that splits along a specified direction. Rename group PostRestrict to bin POSTRESTRICT. Prolongate initial data only when desired. This saves much time. Sorry, Ian. Fix bug in time level cycling of grid arrays. (Note: grid arrays should not have time levels.) Fix time_t bug on IRIX. Make sure that there is no integer overflow when there are many refinement levels. Always put parentheses around (maxreflevelfact/reflevelfact). Fix typo in Carpet verbose output. Add debug output in processor splitting. Communicate in three stages: Irecv, (work), Isend, Wait. This might be more efficient. Much more, potentially. Fix bug in processor layout of grid arrays. Sorry, Ian. Make the interpolator interpolate between time levels. Untested. Fix bug in processor communication in interpolator. Sorry, Ian. Rewrite prolongation operators to make them twice as fast. There you are, Ian. Move prolongation operator kind handling from data to gdata. Add official hyperslabbing interfaces to CarpetSlab. Adapt to new cGH * handling. darcs-hash:20031105151837-07bb3-758a87ff0355dba053269df4b7d7d79bea018669.gz
* Make gf and data objects store a Cactus variable index that thisschnetter2003-10-14
| | | | | | | | Make gf and data objects store a Cactus variable index that this object is associated with. This can be used to access various kinds of information, e.g. variable names. darcs-hash:20031014143916-07bb3-678d114393008db7790b5ed72d6462673414c06a.gz
* Track the C++ standard.schnetter2003-08-28
| | | | | | | | | Track the C++ standard. Derived template classes do not have their template parent classes in scope; one has to explicitly use "this->" to access parent class elements. darcs-hash:20030828192703-07bb3-09c0c6267bffab1dee6bc3a4cfd4b156b51e39b0.gz
* Removed the "dimgeneric_*" data types from CarpetLib. They were neverschnetter2003-01-03
| | | | | | | | | | | | | Removed the "dimgeneric_*" data types from CarpetLib. They were never really used anyway. Changed "th" into "th<D>". Renamed "generic_*" to "g*". Propagated these changes to all other places. darcs-hash:20030103144936-07bb3-c4d74d2d94a56a898f9bb735666eefc01e2610e2.gz
* Changed the variable types for the time from int to real. This allowsschnetter2002-09-25
| | | | | | | | | | | | | Changed the variable types for the time from int to real. This allows more flexibility for time interpolation. The time interpolators now accept an explicit argument for the current time, instead of using the current time from the time hierarchy. This allows arbitrary current times, which are necessary for the intermediate time steps for time interpolators. The times that are interpolated _from_ still come from the time hierarchy. darcs-hash:20020925134915-07bb3-26927a425ca5c0b52a2ca02bc54673c4b9e1781e.gz
* Removed user choice of C++ template instantiation model. In myschnetter2002-05-05
| | | | | | | | | | | | | | | | | Removed user choice of C++ template instantiation model. In my experience, only one model works, namely explicit template instantiaion. No need to pretend that the other things work with Cactus. (Don't complain to me -- I also think it's a shame that something that calls itself "compiler" isn't able to do this automatically. Many other compilers for many other languages do this kind of thing without even mentioning it. So there's either something fundamentally wrong with the C++ standard, or with the C++ compiler writers, or with the perceived wishlists of C++ users. And I would bet an arm and a leg that it's not the second of these.) darcs-hash:20020505201656-07bb3-a1b8dfc5587d59c718ad25ce89d0c8973c2b3e6f.gz
* Moved ASCII output from CarpetLib (where it never belonged) toschnetter2002-01-09
| | | | | | | | | Moved ASCII output from CarpetLib (where it never belonged) to CarpetIOASCII. Added parameter to not output the ghost zones for ASCII output. darcs-hash:20020109224240-07bb3-457f3768c8aee0b68db6a7a85741ccd9191ee39e.gz
* Changed handling of interpolation orders; they are now stored in theschnetter2001-12-09
| | | | | | | | | Changed handling of interpolation orders; they are now stored in the grid functions and don't have to be passed around. Speeded up some prolongation operators. They are still slow. darcs-hash:20011209154308-07bb3-caa74a89a87c290852f2b59160ed26d9361f3cf1.gz
* Changed ofstream to ostream.eschnett2001-03-29
| | | | darcs-hash:20010329225020-f6438-288c9cfa79334ab72eb8d034f9d2840f5eb99810.gz
* Made Carpet compile on IRIX.eschnett2001-03-27
| | | | darcs-hash:20010327202631-f6438-d70466b15bf2224f3ce20968622c77a3cca37a73.gz
* Added support for higher-order interpolation in space and time.eschnett2001-03-24
| | | | darcs-hash:20010324213842-f6438-3ccfdd7797b28055f08d28b77e33205c69c60e27.gz
* Brought in latest differences from the SGI version. This is workeschnett2001-03-22
| | | | | | | Brought in latest differences from the SGI version. This is work towards a code that compiles on both architectures. darcs-hash:20010322174200-f6438-23ab5f26cf84d2666312791c6bdb5a0fc1d0390a.gz
* Carpet now passes the Cart3d test suite. This required a rewrite ofeschnett2001-03-10
| | | | | | | | | | | | | | | | | Carpet now passes the Cart3d test suite. This required a rewrite of CarpetSlabe, which now uses the data<> class instead of doing things its own way. This in turn required some updates to data<>. CarpetSlab now ignores (i. e. does not use) boundaries, except outer boundaries. For that to work, the dh<> class has been given the notion of an outer boundary. In order to increase performance, the cctk_bbox[] information in Carpet is not set correctly. As an approximation, it just reflects whether the current grid component lies at the outer boundary, as calculated using cctk_lbnd, cctk_ubnd, and cctk_gsh. darcs-hash:20010310195459-f6438-8ee874d722de4df717e5eb3002722ceb8d4a9bb7.gz
* Created a generic routine for ASCII output. This should reduce code size.eschnett2001-03-05
| | | | darcs-hash:20010305133103-f6438-b07009b56bf38b955fb2ca8476292ab2e47fdac2.gz
* Initial revisioneschnett2001-03-01
| | | | darcs-hash:20010301124010-f6438-fca5ed1e25f84efd816aa0d13fc23b58add7195d.gz
* Initial revisioneschnett2001-03-01
darcs-hash:20010301114010-f6438-12fb8a9ffcc80e86c0a97e37b5b0dae0dbc59b79.gz