aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib
Commit message (Collapse)AuthorAge
* CarpetLib: Introduce pseudoregion classErik Schnetter2007-02-04
| | | | | | | | | | | | | A pseudoregion is almost a region; it is a bbox that lives on a certain processor. Pseudoregions are a compact way to store information about what processors needs to send data to what other processor during synchronisation or regridding. Introduce a class pseudoregion. Add additional pseudoregion fields to the dh class. Use these fields when communicating; this is faster than walking the original data structures. darcs-hash:20070204184339-dae7b-3bd90a48b77cf0623e3df3a7ca4edd9d5c7053f8.gz
* CarpetLib: Cleanup in data classErik Schnetter2007-02-04
| | | | | | Remove code that was commented out. darcs-hash:20070204181108-dae7b-b732d25bb1ab5e2ffcb3baa916f3bb97c2b5cfb6.gz
* CarpetLib: Rename ggf::recompose_free to ggf::recompose_free_oldErik Schnetter2007-02-04
| | | | | | | Rename ggf::recompose_free to ggf::recompose_free_old. Remove code that was commented out. darcs-hash:20070204180937-dae7b-0c0c9f5b5007d416ec16da8a6781950a4f1406e5.gz
* CarpetLib: Add _storage field to gdata classErik Schnetter2007-02-04
| | | | | | | Add a field "void * _storage" to the gdata class to speed up its storage() member function. darcs-hash:20070204175843-dae7b-644ade82e1432b82384baf64f55aeb2482032fdf.gz
* CarpetLib: Clean up transport operatorsErik Schnetter2007-02-04
| | | | | | | | | | | | Remove unused, #ifdef'ed out code from the operators. Since the operators use now the bbox class, this checking is already performed there. Remove unused debugging code in the cell-centered operators. Use the restrict qualifier in the prototypes. darcs-hash:20070204174027-dae7b-743583b30d52646219411c98ad99486d10445e52.gz
* CarpetLib: Remove commented out code for complex variablesErik Schnetter2007-02-04
| | | | | | | | | CarpetLib contained special code that used std::complex instead of Cactus's CCTK_COMPLEX for complex variables. A very similar feature is now supposed to go into the flesh, and hence this (unused) code is being removed. darcs-hash:20070204172854-dae7b-af7b7aca42988195846220dd7f45827549f5caf9.gz
* CarpetLib: Improve timersErik Schnetter2007-02-03
| | | | | | | | | | | | Implement a second timer based on Intel's rdtsc instruction, which is much faster and much more accurate than MPI_Wtime. Place the timer classes into the CarpetLib namespace. Create a TimerSet class. Make the Timer class automatically register all timers with a singleton object, removing all global variables. darcs-hash:20070203211128-dae7b-42765e79446eda6a2337ba22cd390869055c555a.gz
* CarpetLib: Correct error in bbox::sizeErik Schnetter2007-02-03
| | | | darcs-hash:20070203204005-dae7b-dc38364001baecd4b7073e6dc92077cf1f756b70.gz
* CarpetLib: Use AT to index std::vectorErik Schnetter2007-02-03
| | | | | | | | Define a macro AT() to index into std::vector. Depending on the macro NDEBUG, AT() is defined either as at(), providing index checking, or as operator[], providing no checking. darcs-hash:20070203205854-dae7b-a1999c88c95ba12b1ee66505f712aefdd67d7e6f.gz
* CarpetLib: Define constant eolErik Schnetter2007-02-03
| | | | | | | Define a constant eol containing a newline character. Unlike endl, it does not flush the I/O stream. darcs-hash:20070203185434-dae7b-1f057e593cc45b3d5cf1b067b247b6de071230da.gz
* CarpetLib: Optimise bbox and bboxset classes for speedErik Schnetter2007-02-03
| | | | | | | | | | | | | Use std::list instead of std::set to store the bboxes internally. Define some functions as inline. Perform some checking only when NDEBUG is not defined. Optimise the algorithms for normalising bboxsets and for calculating the set difference. darcs-hash:20070203172717-dae7b-1e77f0a810f786913cd2a1aaed1ea1a5fde604cf.gz
* CarpetLib: Support restrict qualifierErik Schnetter2007-01-15
| | | | darcs-hash:20070115175330-dae7b-ae3dd3c47931ad57b3a5cca9429b3f223c9e834c.gz
* CarpetLib: Ensure that the strides are compatible with the refinement factorsErik Schnetter2007-01-12
| | | | | | | Ensure that the strides of each refinement level are compatible with the refinement factor of this level. darcs-hash:20070112211111-dae7b-5136e494c4d7a6dd446c096646a601ca2791a6be.gz
* CarpetLib: Make some routines and destructores non-virtualErik Schnetter2007-01-12
| | | | | | | Make some routines and destructores non-virtual. They belong to classes which used to form a type hierarchy but are now flat. darcs-hash:20070112211017-dae7b-cffc83b94bf43c3b8665f6115021827e9d61717a.gz
* CarpetLib: Ensure that the bboxes are aligned with the base extentErik Schnetter2007-01-12
| | | | | | Ensure that the bboxes are aligned with the base extent in the dh class. darcs-hash:20070112210924-dae7b-b0cd213087916602753565ecb6317692d65139e0.gz
* CarpetLib: Add consume() routine for stringsErik Schnetter2007-01-12
| | | | | | | Add a routine consume() which reads a whole string, not only a single character. darcs-hash:20070112210808-dae7b-dc1e0be61cefe8af390d9f598bfdac314dd7aeac.gz
* 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: Updates to vect classErik Schnetter2007-01-12
| | | | | | | | Add some new functions to make the vect class more convenient. Remove some unused functions. Instantiate some more templates. darcs-hash:20070112205505-dae7b-12a0ea160b9740cdbe60d89d9e9100fc06a1faa7.gz
* CarpetLib: Add new datatype region_tErik Schnetter2007-01-12
| | | | | | | | | | | | | | | | | | | | | | | The new datatype region_t combines an extent (a bbox), an outer boundary descriptor, a refinement descriptor, and a processor number: struct region_t { ibbox extent; // extent b2vect outer_boundaries; // outer boundaries b2vect refinement_boundaries; // refinement boundaries int map; // map to which this // region belongs int processor; // processor number }; These quantities are often used together, and combining them into a single datatype simplifies the code significantly. Adapt gh, dh, etc. to use this new datatype. This is a major API change. darcs-hash:20070112204130-dae7b-92cad546187b0fe499e8cfc38b2e26614a4f608c.gz
* CarpetLib: Make many MPI experiments configurableErik Schnetter2006-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new parameters: BOOLEAN interleave_communications: Try to interleave communications with each other; each processor begins to communicate with its 'right neighbour' in rank, instead of with the root processor BOOLEAN vary_tags: Use different tags for each communication BOOLEAN barrier_between_stages: Add a barrier between the communication stages (slows down, but may make timing numbers easier to interpret) BOOLEAN combine_sends: Send data together and in order of processor ranks BOOLEAN reduce_mpi_waitall: Call MPI_Waitall only for requests that are not null BOOLEAN use_mpi_send: Use MPI_Send instead of MPI_Isend BOOLEAN use_mpi_ssend: Use MPI_Ssend instead of MPI_Isend darcs-hash:20061206165333-dae7b-8ba40bd19fb1733336e60cb7e6bfa0ebfe0d546d.gz
* CarpetLib: Add placeholders for "const" and "pure" attributes to vect<T>Erik Schnetter2006-07-31
| | | | | | | | | Add __attribute__((const)) and __attribute__((pure)) to vect<T> functions where appropriate. These attributes are not active, because it is not clear that this really improves performance, and errors could lead to wrong code. darcs-hash:20060731152218-dae7b-20c523f60890b2ad611157764e0b993bfb185c8d.gz
* CarpetLib: Replace CHKIDX macros with calls to checkindexErik Schnetter2006-12-12
| | | | darcs-hash:20061212160245-dae7b-19df81c29d911d9c77ae0aaa99ae999a0f6d27c9.gz
* CarpetLib: Initialise dh::is_interproc correctlyErik Schnetter2006-12-06
| | | | darcs-hash:20061206165743-dae7b-00a12e7ebcf48f2f54ee439ea662ab0018485915.gz
* CarpetLib: Use better algorithm to combine bboxes in bboxset's normalize()Erik Schnetter2006-12-05
| | | | | | | | | The new algorithm always finds the same canonical configuration of bboxes, independent of how the bboxset is split into bboxes. There is no guarantee that the new representation uses the minimum number of bboxes, since that would be too difficult. darcs-hash:20061205211342-dae7b-2eee2ac16cea06b3ee4fc623deb086d380d5ed37.gz
* CarpetLib: Correct the way prolongation boundaries are determinedErik Schnetter2006-11-13
| | | | | | | | | | | Correc the way in which it is determined which points are boundary prolongated and which are synchronised. For this, introduce a new field "owned" to the dh class that determines which grid points a processor owns for interprocessor communication. darcs-hash:20061113214128-dae7b-34a520f7e461173d0042acde68cb48cd670b167a.gz
* CarpetLib: Correct error in determining whether a grid structure changedErik Schnetter2006-09-28
| | | | | | Correct serious error in determining whether a grid structure changed. darcs-hash:20060928033543-dae7b-950620f6f66b1708929e1432d9158d2354ebe41e.gz
* CarpetLib: Avoid nans in timer outputErik Schnetter2006-09-25
| | | | | | | Avoid nans in timer output; instead of dividing by zero, set the result to zero. darcs-hash:20060925214858-dae7b-0c82bb1a3dc1a3080955b86324487e4a7efc044e.gz
* CarpetLib: Add timers for each prolongation operatorErik Schnetter2006-09-25
| | | | | | Add more timers, one timer for each kind of prolongation operator. darcs-hash:20060925214744-dae7b-00f47d74c2cdccdd8d5ee05a88973543116678e9.gz
* CarpetLib: When recomposing, return whether a refinement level was changedErik Schnetter2006-09-25
| | | | | | | When recomposing a refinement level level of the grid hierarchy, return whether the level's structure changed. darcs-hash:20060925214438-dae7b-e204a6fffdccc3f900b72a3e5ae82f84f0ee5d8e.gz
* CarpetLib: Clarify definition of ggf::timelevels_Erik Schnetter2006-09-25
| | | | darcs-hash:20060925214246-dae7b-1d3ad6e009dcaa1654644808d762af545c597766.gz
* CarpetLib: Use C++ comments for OMIT_F90 conditionalsErik Schnetter2006-09-25
| | | | darcs-hash:20060925214157-dae7b-e963052677829366ed96876a2bf7043d3d71ebf9.gz
* CarpetLib: Clean up data.ccErik Schnetter2006-09-25
| | | | darcs-hash:20060925214029-dae7b-9d9d5a3fec2f33f85f739bd850f156ab4c4151b7.gz
* CarpetLib: Write timer output to filesErik Schnetter2006-09-11
| | | | | | | | Write the CarpetLib timer output to files instead of to screen; the output is lengthy, difficult to interpret, and output from all processors is needed. darcs-hash:20060911025609-dae7b-c1d812ae44dfdb3f8e8daae09f06a8ed3476e73f.gz
* CarpetLib: Split recompose functions into regrid and recomposeErik Schnetter2006-09-04
| | | | | | | | | | | | | | | Split recompose functions into two stages, regrid and recompose. The first stage, regrid, changes the grid structure in the gh and dh classes. The second stage, recompose, changes the values of the actual grid functions, i.e., changes the gf<T> and data<T> objects. The second stage has to be called individually for every refinement level. This is necessary since the boundary conditions need to be applied after recomposing one refinement level, before the next fine refinement level can be recomposed. darcs-hash:20060904230433-dae7b-3ba1982460f57b34da11a6fbb6b4b524dc5b348f.gz
* CarpetLib: Correct errors in array index checking codeErik Schnetter2006-09-25
| | | | | | Correct errors in array index checking code for the copy operators. darcs-hash:20060925213952-dae7b-632a2159ea9f676e88ec4e27d16d2c5134b09f4f.gz
* CarpetLib: Collect more timing informationErik Schnetter2006-09-04
| | | | | | | Extend the CarpetLib timers so that they also count the number of bytes transmitted in addition to the wall time. darcs-hash:20060904020649-dae7b-7a18c2fbe2de09d662b4154a3ae2e553ad57c12b.gz
* CarpetLib: Poison communications buffers as wellErik Schnetter2006-09-04
| | | | | | | When CarpetLib::poison_new_memory is set, poison communications buffers as well. darcs-hash:20060904020453-dae7b-762dfc46dcaea77cdff48fcd5e63805bf14e6dc0.gz
* CarpetLib: Replace "!" by "not"Erik Schnetter2006-09-04
| | | | darcs-hash:20060904020213-dae7b-778fdfeb662280630d1c5af50fcedde2a78e9137.gz
* CarpetLib: Reformat commentsErik Schnetter2006-09-04
| | | | darcs-hash:20060904020202-dae7b-b02b1eb0b44431d2b0e31840ac8bd8f000ac1514.gz
* [CarpetLib] add option to omit Fortran 90 files by adding -DOMIT_F90 to ↵Jonathan Thornburg2006-08-29
| | | | | | | | | | | | | | | | | | | | | | | | compiler flags Carpet is _almost_ entirely written in C, C++, and Fortran 77, but there are a few Fortran 90 files in CarpetLib defining the ENO and WENO prolongation operators. This patch allows Carpet to be compiled without a Fortran 90 compiler if these (ENO/WENO) operators are not needed, by defining the C preprocessor symbol OMIT_F90. For example, you could do this by putting CFLAGS=-DOMIT_F90 CXXFLAGS=-DOMIT_F90 F77FLAGS=-DOMIT_F90 F90FLAGS=-DOMIT_F90 in a ~/.cactus/config file. I emphasize that in the default case, where OMIT_F90 is not defined, this patch is a no-op: the ENO and WENO prolongation operators are still defined, a Fortran 90 compiler is still needed to compile CarpetLib, you still pass go, you still collect $200. :) This patch only changes the behavior of Carpet in the non-default case where OMIT_F90 is defined. darcs-hash:20060829170502-b0a3f-0d423f190bd7388faa9e1a6e0a980694b044516b.gz
* CarpetLib: fix prolongate_3d_real8_minmod.F77 to fortran77 standardsbaiotti2006-08-09
| | | | | | The fortran77 standards require that a "function" must be ended by "end" and not by "end function". The non-standard syntax is accepted by several compilers, but not by the Portland compiler. darcs-hash:20060809133700-d5812-14616fe5ee7f5e75087f09ae7cc9d83acd27bd42.gz
* CarpetLib: Extend timing statisticsErik Schnetter2006-07-31
| | | | | | | | | | Add timers for the new communication infrastructure. Enhance the timers to also track the minimum and maximum time spent. Add a parameter to output timing information to files. darcs-hash:20060731152618-dae7b-1d049b2b37397610c14648078fd0ee92f252ca2a.gz
* CarpetLib: Rename default memory statistics fileErik Schnetter2006-07-31
| | | | darcs-hash:20060731152547-dae7b-c56f2acaf72d2d21d2e4bdee00691866568af6fc.gz
* CarpetLib: Poison newly allocated memory if desiredErik Schnetter2006-07-31
| | | | | | | | | Poison newly allocated memory if desired. This is potentially more thorough that Carpet's poisoning, since it is applied to all allocated memory. It is not applied after time level cycling, though, so it cannot replace Carpet's poisoning. darcs-hash:20060731152325-dae7b-d039ee958161690c9430e70a8051d400273b819e.gz
* CarpetLib: Use double instead of size_t for memory statisticsErik Schnetter2006-07-31
| | | | | | | | | Use double instead of size_t for memory statistics. size_t works fine for keeping statistics on a single processor, but there can be overflow on multiple processors. double may be inexact, but will not overflow. darcs-hash:20060731152039-dae7b-51a07bfa276c18a59b400a4aef09ab3f2cfc1490.gz
* CarpetLib: Cast unsigned values explicitly to (int)Erik Schnetter2006-07-31
| | | | darcs-hash:20060731151456-dae7b-3f905340dc34295d2e00fe58995ebc5b4d6690f7.gz
* CarpetLib: Correct typographical error in commentErik Schnetter2006-07-31
| | | | darcs-hash:20060731151355-dae7b-fa5ddb6af45a3eec44780b7bff81e8a07a1aa861.gz
* CarpetLib: Correct grammatical error in parameter descriptionErik Schnetter2006-07-31
| | | | darcs-hash:20060731151302-dae7b-555810bfd094f8acb70b3dc90c2775ab84a20ef7.gz
* CarpetLib: Change #ifdef CCTK_* to #ifdef HAVE_CCTK_*Erik Schnetter2006-06-13
| | | | darcs-hash:20060613170802-dae7b-9f69116a70acbac95c7b7b4afa4282330b065602.gz
* CarpetLib: Allow more than one prolongation source boxesErik Schnetter2006-06-13
| | | | | | | | If two refinement boxes sit next to each other in an L (ell) shape, then the region where the boxes have prolongation boundaries may not have the shape of a single box. Therefore allow arbitrary many boxes. darcs-hash:20060613170952-dae7b-a1579f5ec53ad4a36bd44c9ab1d4f07f46a1160e.gz